Author Topic: Transitioning from TI-Basic to Axe Basic  (Read 10931 times)

0 Members and 1 Guest are viewing this topic.

SirCmpwn

  • Guest
Transitioning from TI-Basic to Axe Basic
« on: April 08, 2010, 09:05:47 pm »
Hello,
Another tutorial, this one by request.
Axe Basic gives you a lot of new functions for TI-Basic, but does not support a lot of the old ones yet.  This guide should get you off the ground with Axe.  This guide applies to version 0.1.4.  It isn't meant to replace the manual, but to compare.

Major Differences
|-------------------------------------------------------------------------------|
|TI-Basic Version                       |Axe Version                            |
|---------------------------------------+---------------------------------------|
|===Lists===                            |===RAM Areas===                        |
|Lists in TI-Basic are simply lists of  |Axe does not have lists, but rather    |
|numbers.  You can store to them like   |gives you areas of RAM to store in.    |
|so: 5→L1(1) or {5→L1.                  |                                       |
|---------------------------------------+---------------------------------------|
|===Real Numbers===                     |===Unsigned Integers===                |
|In TI-Basic, you can store numbers as  |In Axe, you can store either one or two|
|large as you like, assuming there is   |bytes of data, for a maximum value of  |
|enough memory.                         |255 and 65536 respectively.            |
|---------------------------------------+---------------------------------------|
|===Graphing===                         |===Plotting===                         |
|In TI-Basic, you can graph pixels      |In Axe, you can only plot pixels based |
|according to the window settings.      |on the dimensions of the screen, from  |
|                                       |96 to 64.                              |
|---------------------------------------+---------------------------------------|
|===Sprites===                          |===Sprites===                          |
|You can use text sprites or assembly   |Axe has sprite support built-in.       |
|libraries.                             |                                       |
|---------------------------------------+---------------------------------------|
|===Data===                             |===Data===                             |
|In TI-Basic, you could copy a list or  |All data is embedded into the source   |
|matrix, or save a picture, or the like.|using the [] tokens.                   |
|-------------------------------------------------------------------------------|

Feel free to add to the above.

Common Tasks in Axe Basic

Storing Numbers to Lists
You have two options for storing numbers: 1 byte and 2 byte.  Storing one byte values (0-255) is easy:
Code: (Axe Basic) [Select]
5→{L1}The trouble comes when you want to store to the next element in the list, which you can do like so:
Code: (Axe Basic) [Select]
5→{L1+1} // List name + offset
To store 2 byte nubmers (normal numbers):
Code: (Axe Basic) [Select]
5→{L1}ᴿ
However, storing two byte numbers has an important requirement: offsetting by two.  This is because each two byte number takes up two slots in the list.  So, to store to the second element while using two byte numbers, you should do this:
Code: (Axe Basic) [Select]
5→{L1+2}ᴿ // List name + offset * 2
I have to leave now, but I will keep editing this with more information as time progresses.  Please feel free to post questions about any of this in the topic.
« Last Edit: April 08, 2010, 11:06:39 pm by SirCmpwn »

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Transitioning from TI-Basic to Axe Basic
« Reply #1 on: April 08, 2010, 09:35:13 pm »
Great comparisons! Looks cool.
« Last Edit: April 08, 2010, 09:35:31 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Transitioning from TI-Basic to Axe Basic
« Reply #2 on: April 08, 2010, 10:35:36 pm »
Nice, should help even more :)

Axe is pretty similar to TI-BASIC, but it's important to know the differences.

I love how Axe is still so close to TI-BASIC in terms of syntax compared to any other TI-83 language, though.

Offline indubitably

  • LV2 Member (Next: 40)
  • **
  • Posts: 35
  • Rating: +1/-0
    • View Profile
Re: Transitioning from TI-Basic to Axe Basic
« Reply #3 on: April 09, 2010, 09:41:59 am »
Thank you this is very helpful, I'll be checking back every now and the for updates.

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Transitioning from TI-Basic to Axe Basic
« Reply #4 on: April 27, 2010, 12:51:44 am »
Wow this stuff is great, I like how Axe has so many tutorials on it already rofl.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Transitioning from TI-Basic to Axe Basic
« Reply #5 on: April 27, 2010, 02:07:34 am »
yeah, it's a really great language, especially for people who are used to TI-BASIC. I barely learned it before and only did a small pixelating routine with the help of people, and now I ventured more into it and managed to make an entire game already (altough it's quite simple lol)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Transitioning from TI-Basic to Axe Basic
« Reply #6 on: April 27, 2010, 02:31:21 am »
What is the game?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Transitioning from TI-Basic to Axe Basic
« Reply #7 on: April 27, 2010, 02:47:42 am »
See topic I just posted

Altough this isn't the official version, lol

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Transitioning from TI-Basic to Axe Basic
« Reply #8 on: April 27, 2010, 02:57:02 am »
Haha ya I just saw that, nice :D Rick Roll in the back ground is awesome :P
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Transitioning from TI-Basic to Axe Basic
« Reply #9 on: April 27, 2010, 03:02:23 am »
yeah I just saw that we could have static grayscale backgrounds while everything in black on the screen can move and stuff, so I thought: hey! Why not put a text rickroll in there? :P

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Transitioning from TI-Basic to Axe Basic
« Reply #10 on: April 27, 2010, 03:19:10 am »
Nice :P
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Transitioning from TI-Basic to Axe Basic
« Reply #11 on: April 30, 2010, 12:20:40 am »
Btw just to tell how I am so used to TI-BASIC, even thought I know pointers are written like {L1+A}, in one occasion I still wrote L1(A) x.x then spent 10 minutes debugging lol

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Transitioning from TI-Basic to Axe Basic
« Reply #12 on: April 30, 2010, 05:37:29 pm »
Hmm... Axe seems to be more strict about closing parentheses, brackets, curly brackets, and whatnot.
BASIC habits keep getting me Axe errors. I wonder how difficult it would be to have an option for the compiler to be a bit more syntactically lax...
At any rate, yeah, Axe is definitely a good language. Now if only someone would write an on-calc assembler in assembly instead of BASIC...
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Transitioning from TI-Basic to Axe Basic
« Reply #13 on: April 30, 2010, 05:42:57 pm »
I think that is what SirCmpwn is doing with Mosaic. I'm not sure though.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

_player1537

  • Guest
Re: Transitioning from TI-Basic to Axe Basic
« Reply #14 on: April 30, 2010, 05:48:49 pm »
yes, SIr is making Mosaic for that (I believe he said he might change the name).  He says it will currently assemble anything without wildcards ("ld hl,1337" uses the wildcard 1337, xor A will compile)