Isn't Axe Parser a sort of BASIC compiler? Because you can use alot of BASIC commands and turn it into machine code...
Axe isn't a basic compiler. It is a whole new language. It does use some of the same commands as basic, but there is no axe command that does exactly what the basic version does.
Think of AXE as piggy-backing on the BASIC editor and the function names. It interprets the source that you type, not the OS.
If you want to stop programming BASIC entirely but don't want to learn ASM, you're almost better off learning a language like Axe or Grammer. Axe is compiled and Grammer interpreted. The first is faster but produces larger code than ASM, but nowhere as large as that one BASIC to ASM program on ticalc.org (that apparently didn't work most times). Grammer is interpreted so the source code is smaller, but it's a bit slower. Also in Grammer when you distribute your games you have to send the Grammer app as well so the person can run it.
Both languages are kinda similar if I remember correctly from the syntax. In fact, some very early Axe code from 2010 almost looked identical to TI-BASIC.
Both languages are kinda similar if I remember correctly from the syntax. In fact, some very early Axe code from 2010 almost looked identical to TI-BASIC.
GinDiamond wrote:
But Axe can be classified as a "BASIC" to asm converter? Sorta-kinda?
No -- it's a completely different language with a completely different design, and only shares the aspect of using a program with system tokens to represent the source code.
Oh.
Do you mean that a BASIC program actually carries hard-coded information? I thought that a BASIC program was basically an interpreted "text" file
Do you mean that a BASIC program actually carries hard-coded information? I thought that a BASIC program was basically an interpreted "text" file
GinDiamond wrote:
Oh.
Do you mean that a BASIC program actually carries hard-coded information? I thought that a BASIC program was basically an interpreted "text" file
I'm not sure I see the distinction between the two things that you said. It carries hard-coded information in the form of tokens that are interpreted by the interpreter. Do you mean that a BASIC program actually carries hard-coded information? I thought that a BASIC program was basically an interpreted "text" file
Oh.
Okay.
I was just wondering if a regular BASIC program was like an MS-DOS Batch file, just containing text commands to be interpreted by the console, with no real machine code.
Okay.
I was just wondering if a regular BASIC program was like an MS-DOS Batch file, just containing text commands to be interpreted by the console, with no real machine code.
GinDiamond wrote:
Oh.
Okay.
I was just wondering if a regular BASIC program was like an MS-DOS Batch file, just containing text commands to be interpreted by the console, with no real machine code.
BASIC programs are indeed just commands that are interpreted, with no native code (unless you're using Hybrid BASIC). The Axe app is incapable of reading the BASIC language - programs in the Axe language just happen to be stored in the same format because it's convenient. Okay.
I was just wondering if a regular BASIC program was like an MS-DOS Batch file, just containing text commands to be interpreted by the console, with no real machine code.
I don't get it, is Axe source code and BASIC two completely different formats? I know that axe source code can have different commands, but aren't they stored the same?
They are stored exactly the same. The program editor does not know if you're programming in axe or in basic in it. The program editor just a simple text editor. What is different is what you do with it. If you run it using the prgm>exec menu, the OS runs it as basic. You can run axe source code like this too, but due to axe's header, it will error.
Axe code is always in exactly the same format as basic, till when you go to the axe app and compile it. Then you can compile it into machine code and then it becomes a different format. The one of an asm program.
To come back to your example: basic is indeed very similar to batch files, and batch files are often written in notepad. But you can write other programming languages in notepad too, like java, C, javascript, python,... Now, imagine that the computer had no extensions at the end of file names. All of those languages are saved as plain ASCII, so they have the same format. But still they are not the same. Try executing python source code as a batch file. It will give you an error. Just like how executing axe source code as a basic program gives you an error.
Axe code is always in exactly the same format as basic, till when you go to the axe app and compile it. Then you can compile it into machine code and then it becomes a different format. The one of an asm program.
To come back to your example: basic is indeed very similar to batch files, and batch files are often written in notepad. But you can write other programming languages in notepad too, like java, C, javascript, python,... Now, imagine that the computer had no extensions at the end of file names. All of those languages are saved as plain ASCII, so they have the same format. But still they are not the same. Try executing python source code as a batch file. It will give you an error. Just like how executing axe source code as a basic program gives you an error.
Excellent explanation, ben_g, thanks for that. However, GinDiamond, I must warn you once again that you're hijacking a topic. I'll split off this topic for now, but please do it yourself next time!
ben_g wrote:
To come back to your example: basic is indeed very similar to batch files, and batch files are often written in notepad. But you can write other programming languages in notepad too, like java, C, javascript, python,... Now, imagine that the computer had no extensions at the end of file names. All of those languages are saved as plain ASCII, so they have the same format. But still they are not the same. Try executing python source code as a batch file. It will give you an error. Just like how executing axe source code as a basic program gives you an error.
Good explanation!
But here's what I don't get: isn't Axe parser almost like a BASIC->ASM compiler? If we can write it for a calculator to execute, it shouldn't be a stretch to program at least an Axe compiler for a computer?
Axe is not a BASIC->ASM compiler. It's an Axe->ASM compiler--it just uses the same format as BASIC. It's an entirely separate language from BASIC. Think of it like C++ and C#. Similar name, similar syntax, both use text files as source, but different languages.
Quote:
If we can write it for a calculator to execute, it shouldn't be a stretch to program at least an Axe compiler for a computer?
Yes, you could write an on-computer compiler to compiler Axe to a calculator program. It would also be possible to do that to make a computer program, and I think there was, in fact, such a project on omnimaga.
right, but because Axe source and TI-BASIC use many similar commads that are executed in similar ways, couldn't someone make a crappy version of a BASIC->ASM compiler?
Regardless of what Axe is someone could attempt to that. That has nothing to do with Axe. People have tried, though I don't know if there were technical limitations or what that made it undesirable. Certainly for most of the mathy stuff you'd need to make use of bcalls. Ultimately, though, it seems using Axe would be the better choice.
But wouldn't it be sort of simple (maybe, I really don't know) to change up the Axe source code a bit to make it compile BASIC programs?
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
» Goto page 1, 2, 3 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 1 of 3
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement