• Axe Parser 5 1
Currently:

### Author Topic: Axe Parser  (Read 229203 times)

0 Members and 1 Guest are viewing this topic.

#### Quigibo

• The Executioner
• CoT Emeritus
• LV11 Super Veteran (Next: 3000)
• Posts: 2031
• Rating: +1075/-24
##### Axe Parser
« on: February 01, 2010, 03:52:51 am »
Axe Parser
Alpha 0.0.1

WARNING:
This is still an alpha version.  It is not stable and you should not run this on any calculator that has anything intellectually valuable in the RAM.  Just for liability reasons, I will also add that there is a non-zero possibility your archive might not be safe either.

Description:
It is a new programming language for the calculator.  It is typed directly into a program just like BASIC and with a similar syntax.  Unlike BASIC however, this is a compiled language, not an interpreted one.  The program gets compiled into an assembly program.  In the future you will be able to make Ion, MirageOS, and Doors programs; possibly apps too.

You basically get the simplicity of BASIC programming but with nearly the same size, speed, and compatibility of assembly programs.  You won’t need “Shells” or “Libraries” to run the programs.  They are just like any other assembly program.

Syntax:
It is similar to BASIC, but also very different.  First, it has an extremely loose syntax.  You know how you can leave the end parenthesis off of BASIC commands and do multiple same-line DelVars?  It’s like that on steroids (if you so choose).  For instance: the store “->” can be used in expressions like A+B->C+1->D so now C holds A+B and D holds A+B+1.

Differences With BASIC:

I will be re-defining a lot of commands.  Most are usually unused anyway, but some are not.  For instance, “DiagnosticOff” turns off the run indicator.  But “sub()” now runs a subroutine since you will be able to take characters from a string the same way you do with lists in the future.

Variables and Numbers:
All numbers and letters A-Z are 16-bit unsigned integers.  Unlike BASIC variables, they don’t reside in the user ram so they take up zero memory.  You might want to read about unsigned numbers on Wikipedia or something if you are not familiar with it.

User Defined Variables:
Things like strings, lists, sprites, and floats will be defined by the user.  However, I haven’t gotten to that point yet, but expect that soon.

There is no UI right now.  Select your program, which must be in RAM, from the list, which is not in alphabetical order, and it will compile into a program called “LOL”, you can’t name it right now.  I figured I’d get the compiler working before I get back to the UI.  I’ve also attached a document with the complete instruction set so far.

I’d like to hear your thoughts
I have too many ideas right now to put on paper.
« Last Edit: May 21, 2010, 05:42:55 pm by Axe Parser »
___Axe_Parser___
Today the calculator, tomorrow the world!

#### DJ Omnimaga

• Now active at https://codewalr.us
• CoT Emeritus
• LV15 Omnimagician (Next: --)
• Posts: 55821
• Rating: +3151/-232
• CodeWalrus founder & retired Omnimaga founder
##### Re: Axe Parser
« Reply #1 on: February 01, 2010, 04:14:52 am »
This is really nice. I also like that this programming language went further than planning stages so far, unlike many others I've seen in the TI community before. It also seems to be quite functional alerady so it's quite promising. I always dreamed of a TI-BASIC alike (or close) language that could be compiled into ASM code. I am sure a lot of people would use this for smaller games too, because not only they could easily do fast games, but they wouldn't even need to learn a new language from scratch, just some minor differences in yours. Plus the fact it uses the on-calc editor makes it even greater (providing they always keep a copy of their program archived or backed up on their comp in case they mess up), plus people can edit their code in TI-Graph Link or view it in SourceCoder.

Anyway, I read some of the progress so far in the past weeks when we talked on Yahoo and it's pretty promising and I am confident this project will reach states where we can build entire games with it and maybe even get finished. As soon as I heard about it, I told myself this is guaranteed to get a subforum when announced.
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF

#### Quigibo

• The Executioner
• CoT Emeritus
• LV11 Super Veteran (Next: 3000)
• Posts: 2031
• Rating: +1075/-24
##### Re: Axe Parser
« Reply #2 on: February 01, 2010, 04:22:06 am »
Yes, I am hoping it will be all that and more.

By the way, since this is a lot to take in, here is an example program to simply display the "getkey" codes for each key (which are different from the BASIC getkey.  Its the GetCSC codes for all you asm programmers)
___Axe_Parser___
Today the calculator, tomorrow the world!

#### DJ Omnimaga

• Now active at https://codewalr.us
• CoT Emeritus
• LV15 Omnimagician (Next: --)
• Posts: 55821
• Rating: +3151/-232
• CodeWalrus founder & retired Omnimaga founder
##### Re: Axe Parser
« Reply #3 on: February 01, 2010, 04:49:28 am »
In other words, the code in real TI-BASIC, omitting the command to disable the run indicator (since it's impossible without abusing ASM libs), would be:

Code: [Select]
ClrHome0->KWhile K=/=15Getkey->KIf K=/=0ClrHomeDisp KEnd:End
In case anyone gets a bit confused at some of the order
« Last Edit: February 01, 2010, 04:49:49 am by DJ Omnimaga »
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF

• Beta Tester
• Posts: 817
• Rating: +27/-7
##### Re: Axe Parser
« Reply #4 on: February 01, 2010, 06:41:09 am »

Amazing!
Axe Parser
Alpha 0.0.1

WARNING:
This is still an alpha version.  It is not stable and you should not run this on any calculator that has anything intellectually valuable in the RAM.  Just for liability reasons, I will also add that there is a non-zero possibility your archive might not be safe either.
Thanks for warning us, I'll try it once I backup my calc files or finish Crystal Defenders.
« Last Edit: February 01, 2010, 06:44:18 am by Silver Shadow »
Former Coder of Tomorrow

#### Galandros

• LV9 Veteran (Next: 1337)
• Posts: 1140
• Rating: +42/-10
##### Re: Axe Parser
« Reply #5 on: February 01, 2010, 09:04:44 am »
Seems promising. And is compiled, that was sort of a surprise.

Subroutines in this kind of thing are important.

You are using the TI-BASIC editor, that is neat. Although I always wanted a small font TI-BASIC editor like you see in the BBC Basic.
I am waiting for new commands.
« Last Edit: February 01, 2010, 09:20:34 am by Galandros »
Hobbing in calculator projects.

#### calc84maniac

• eZ80 Guru
• Coder Of Tomorrow
• LV11 Super Veteran (Next: 3000)
• Posts: 2897
• Rating: +467/-17
##### Re: Axe Parser
« Reply #6 on: February 01, 2010, 11:18:41 am »
Nice job man! I've never been able to get past the planning stage for anything like this

Edit: I'll be glad to write multiplication and division routines if you need me to

Edit3: Removed Edit2 for stupidity
« Last Edit: February 01, 2010, 12:20:45 pm by calc84maniac »
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

#### ztrumpet

• The Rarely Active One
• CoT Emeritus
• LV13 Extreme Addict (Next: 9001)
• Posts: 5712
• Rating: +364/-4
• If you see this, send me a PM. Just for fun.
##### Re: Axe Parser
« Reply #7 on: February 01, 2010, 04:08:42 pm »
This is awesome!  I really like this!  I can see my self programming in this language.  It's incredibly cool!  I love the fact it is compiled.

---I read through the Documentation and this is what went through my mind---
Apps?  How do you make large Apps if the source file can only be 1.25ish pages large, due to lack of RAM?
How do you use the predefined A - Z and Theta?  And what about Theta?
Comments!!!  Yay!  That's great.  Can you have comment blocks?  (Like ' ' to ' ' mabey?)
Can you include the ++ and -- operators from C++? Mabey they could be just + and - , but only take one operand.   (And if Ans works the same, can these not alter Ans?)
Does the Ans Variable work the same way as in basic?
If you Pause, and the run indicator is off, does it stay off?
YES!!!  I can Asm(Hex-Code-Here!)
I love LBL!  It's really cool!
ReturnIf == Awesome!
How does Disp work when you get to the end of a line?
Can getKey ever go back to the getKey of basic, or is it always GetScanCodes?  (I don't mind the change, but I'm wondering if others think this. )
Thanks for giving the Diagnostics commands (That in my opinion should always be on) some real purpose.   It's not that they are unused, it's just they are so seldom used and never used in games.

This is so cool! I can't wait for more commands, so we can see how much faster this is!
This is great!

Edit:  I looked at it more, and had more thoughts:
Earlier when I said ' ' it's two single qoutes. (clarification)
I love the new use of DispGraph!
While is still PreTest, and Repeat is still PostTest, right?
Can you check if sub( has a comma in it, and if so use it like it is in TiBasic? (If it dosn't have a comma, it's subroutien.)
__=Var means what equals Var?  And is the underscore a space?  Is it Ans?

Thanks!
« Last Edit: February 01, 2010, 05:28:26 pm by ztrumpet »
If I'm wrong, please correct me!
Unfinished Projects:
 Elmgon 14% Basic Movement Demo Homescreen Game Pack 80% Basic Latest Release Cube Droid Saves the Galaxy 65% Axe Demo Detonate 70% Axe
Completed Projects:
Exodus | Midnight |Drifter | Axe Snake | Jump! | Factory Theta | Spider | Plot Drop | Papi Jump | Numb3rs | Nibbler | Boost | Duel Tile Map Editor | Homescreen Map Editor | Key Group Check | Oasis

#### Quigibo

• The Executioner
• CoT Emeritus
• LV11 Super Veteran (Next: 3000)
• Posts: 2031
• Rating: +1075/-24
##### Re: Axe Parser
« Reply #8 on: February 01, 2010, 05:36:44 pm »
Okay, that's like a million questions, but I will attempt to answer them all:

Quote
Apps?  How do you make large Apps if the source file can only be 1.25ish pages large, due to lack of RAM?
When its finished, it will allow the source programs to be in archive.  You will also be able to include subprograms in your programs like the "include" feature in C.  If it compiles to an app, it will have to be a one page app since it will be too complicated to switch pages with anything that resembles basic.  But that's still 16k, which is large enough for most applications.
Quote
How do you use the predefined A - Z and Theta?  And what about Theta?
They are stored in the saveSScreen ram location.  I have not included theta yet because I am still considering using it for some other purpose.
Quote
Can you have comment blocks?
You can do single line comments, but I feel that inline comments will just make the code very unreadable.
Quote
Can you include the ++ and -- operators from C++?
I might.  A++ can save 2 bytes when assembled instead of doing A+1.
Quote
Does the Ans Variable work the same way as in basic?
No, I no longer use it, its pointless.  If you have no argument, it automatically assumes the last expression.  But it must immediately follow or it will just be garbage.
Quote
If you Pause, and the run indicator is off, does it stay off?
Yes
Quote
How does Disp work when you get to the end of a line?
Disp is not fully functional right now.  I only included it so I have some type of output to test everything.  Nothing will display at the end of the line.  It will work like it does in BASIC when its finished.
Quote
Can getKey ever go back to the getKey of basic, or is it always GetScanCodes?
Probably not, but I will have a directkey command in the future (for multiple key presses)
Quote
While is still PreTest, and Repeat is still PostTest, right?
Its pretest right now... was it post test in basic?  I've never used it before, but that would be very easy to change and also save 3 bytes.
Quote
Can you check if sub( has a comma in it, and if so use it like it is in TiBasic? (If it dosn't have a comma, it's subroutien.)
Nope.  You will be able to do substrings like this: Str(5) gets 5th character in string.
Quote
__=Var means what equals Var?  And is the underscore a space?  Is it Ans?
Yes, basically any expression, variable, number, or Ans before it.
« Last Edit: February 01, 2010, 05:45:32 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

#### ztrumpet

• The Rarely Active One
• CoT Emeritus
• LV13 Extreme Addict (Next: 9001)
• Posts: 5712
• Rating: +364/-4
• If you see this, send me a PM. Just for fun.
##### Re: Axe Parser
« Reply #9 on: February 01, 2010, 06:56:52 pm »
Quote
Okay, that's like a million questions, but I will attempt to answer them all:
Thanks!
Quote
Quote
Can getKey ever go back to the getKey of basic, or is it always GetScanCodes?
Probably not, but I will have a directkey command in the future (for multiple key presses)
That sounds great!  Does this mean you could hold down 2nd, Enter,  and Down at the same time and getKey would equal 1, 9, and 54 at the same time?
Quote
Quote
While is still PreTest, and Repeat is still PostTest, right?
Its pretest right now... was it post test in basic?  I've never used it before, but that would be very easy to change and also save 3 bytes.
Yes, it is post test in basic.
Quote
Quote
Can you check if sub( has a comma in it, and if so use it like it is in TiBasic? (If it dosn't have a comma, it's subroutien.)
Nope.  You will be able to do substrings like this: Str(5) gets 5th character in string.
How do you access multiple characters like:
sub("Name1Name2Name3",5(2)-4,5
This returns "Name2".  Can you access multiple characters in your other way.  If so, then you don't need sub( for sub.

I have another 2 questions.  That makes 1,000,002 questions. :
Can you use the operators like xor and = like "Var1=Var2" or do they need to be "Var1: =Var2"?
Do you plan to use the operator not( for anything?

Thanks!
If I'm wrong, please correct me!
Unfinished Projects:
 Elmgon 14% Basic Movement Demo Homescreen Game Pack 80% Basic Latest Release Cube Droid Saves the Galaxy 65% Axe Demo Detonate 70% Axe
Completed Projects:
Exodus | Midnight |Drifter | Axe Snake | Jump! | Factory Theta | Spider | Plot Drop | Papi Jump | Numb3rs | Nibbler | Boost | Duel Tile Map Editor | Homescreen Map Editor | Key Group Check | Oasis

#### Builderboy

• Physics Guru
• CoT Emeritus
• LV13 Extreme Addict (Next: 9001)
• Posts: 5673
• Rating: +613/-9
• Would you kindly?
##### Re: Axe Parser
« Reply #10 on: February 01, 2010, 09:56:02 pm »
Wow, this is great!  I have seen/heard things where people have tried stuff like this before, but as calc84 said, none of them ever got past planning stages.  Just the fact that you have gotten this far is amazing.  Writing an asm compiler in asm ^^.  Well i for one can't wait to try this out, although i will have to back up my calc first just to be safe

#### TIfanx1999

• ಠ_ಠ ( ͡° ͜ʖ ͡°)
• CoT Emeritus
• LV13 Extreme Addict (Next: 9001)
• Posts: 6173
• Rating: +191/-9
##### Re: Axe Parser
« Reply #11 on: February 01, 2010, 11:42:35 pm »
Quote
Can you include the ++ and -- operators from C++?
Quote
I might.  A++ can save 2 bytes when assembled instead of doing A+1.
I'm not very familiar with C++, but if I understand properly the ++ and -- commands do Variable +/-1 ==Variable? IE A++ would increment A by 1 and store the new value to A? If this is correct you could use the IS>( for ++ and DS<( for --. They are commands that aren't really used in BASIC and act somewhat similarly anyway. I should also take a moment to mention that this looks like a very promising undertaking. Can't wait to see how it develops!

#### DJ Omnimaga

• Now active at https://codewalr.us
• CoT Emeritus
• LV15 Omnimagician (Next: --)
• Posts: 55821
• Rating: +3151/-232
• CodeWalrus founder & retired Omnimaga founder
##### Re: Axe Parser
« Reply #12 on: February 02, 2010, 01:50:50 am »
Another thing I love about this project is how the produced programs are not dependent on the application. I mean, when running a FastRPL game you need the FastRPL app installed on the calc, same with BBC Basic. Since these apps are huge, this limits the amount of games or programs you can have on your calc at once. Not to mention many people like to be able to run their programs either from the PRGM menu using Asm( or from a popular shell like Ion/MirageOs

@Art_Of_Camelot: IS/DS commands were useful back in the TI-81 and first-gen Casio BASIC days, as back then For( didn't exist on these calcs
« Last Edit: February 02, 2010, 01:54:05 am by DJ Omnimaga »
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF

#### Geekboy1011

• The Oneironaut
• Donator
• LV11 Super Veteran (Next: 3000)
• Posts: 2028
• Rating: +119/-2
• Dream that Awakening dream
##### Re: Axe Parser
« Reply #13 on: February 02, 2010, 01:51:18 am »
hmm this looks amazing i think whenin get my second calc back(lent it to someone they really needed it got there other stolen X.x) i think im gonna put this on it and find ways to corrupt the os jk this really looks amazing though

#### bwang

• LV7 Elite (Next: 700)
• Posts: 634
• Rating: +30/-11
##### Re: Axe Parser
« Reply #14 on: February 02, 2010, 02:18:55 am »
Quote
Another thing I love about this project is how the produced programs are not dependent on the application. I mean, when running a FastRPL game you need the FastRPL app installed on the calc, same with BBC Basic. Since these apps are huge, this limits the amount of games or programs you can have on your calc at once. Not to mention many people like to be able to run their programs either from the PRGM menu using Asm( or from a popular shell like Ion/MirageOs
But so many people have 84+'s these days, where the 48KB doesn't really matter.