Author Topic: [Axe Parser] Bytes?  (Read 19654 times)

0 Members and 1 Guest are viewing this topic.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [Axe Parser] Bytes?
« Reply #30 on: March 23, 2010, 07:03:17 pm »
Ohhhhhhhhhhhhhhhhhhhhhh, so basically this is just about storing numbers to variables then?
Spoiler For Spoiler:



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

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [Axe Parser] Bytes?
« Reply #31 on: March 23, 2010, 07:06:48 pm »
Right, if you wanted to store 10 to A, you could do

10->A

Or you could do

'0A->A

Because in Axe, the ' token means that you are in Hex, and 0A in Hex = 10 in Dec :).  Currently the only way to store data into Ram is by Hex, like this:

[010AFF]->Str1

which ends up looking like this in Ram

{1,10,255}

Hopefully in the future you will be able to input data like this as well :) But no matter how you put the data in, it is always extracted as Decimal.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [Axe Parser] Bytes?
« Reply #32 on: March 23, 2010, 07:09:39 pm »
Ok, that makes this topic make a lot more sense to me :) Thanks Builderboy. What exactly do you mean storing data into RAM though? (Celtic III does something like this too? (Thought I remember something like that being said somewhere.))
Spoiler For Spoiler:



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

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [Axe Parser] Bytes?
« Reply #33 on: March 23, 2010, 07:17:51 pm »
Well since Axe compiles to Assembly, it means you have control over the entire calc, including allll the Ram ;) All the ram is is really just a long list of numbers.  Each number ranges from 0 to 255 and there are thousands of these numbers in your Ram.  Think of it like a list in Basic, except its a very very large List :) Well in order to access this list, all you need to do is do

{N}

And you will be able to store to or access the Nth byte in Ram, yay! 

BUT WAIT!!!

Th calculator needs a lot of this Ram for itself, so that it can continue to run, so that there is someplace safe to store all your programs, and so that there is somewhere safe to store the current program.  So you can't just go storing numbers to {0} you'll probably crash your calc :P.  Luckily Axe provides us with some safe locations that are known to be safe to use.  These locations are stored in L1-L6.  So if you say 5->{L1}, you are actually storing to location 34594, but you would never know that it was safe to store there without being an asm guru :P So Axe provides you with these locations in the big List of Ram elements that it is safe to store to, and thats there you can keep all your bytes ^^

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [Axe Parser] Bytes?
« Reply #34 on: March 23, 2010, 07:31:23 pm »
So basically doing {L1} is the same as doing {34594}? But one thing I don't get is why do you need to store to RAM exactly? Couldn't you just store to variable like "A" or is this different or what?
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: [Axe Parser] Bytes?
« Reply #35 on: March 23, 2010, 07:32:23 pm »
Except L3 through L6 are not as safe as L1 and L2. You need to read the doc carefully before using them, in case

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: [Axe Parser] Bytes?
« Reply #36 on: March 23, 2010, 07:33:07 pm »
So basically doing {L1} is the same as doing {34594}? But one thing I don't get is why do you need to store to RAM exactly? Couldn't you just store to variable like "A" or is this different or what?
If you want to make a list of numbers, it won't work too well to use A-Z to hold them. That's what all that RAM is for.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [Axe Parser] Bytes?
« Reply #37 on: March 23, 2010, 07:36:24 pm »
Well actually A is a number in RAM just like all the other variables.  (Well its a combination of 2 numbers in RAM since its 16 bit, not 8 bit) And indeed you can store numbers to A or any of the other variables if you want :) But for circumstances where you need a variable amount of number (like an undefined amount of bullets on the screen) you would need a lot more numbers than just A-Z, and an easier way to access them.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [Axe Parser] Bytes?
« Reply #38 on: March 23, 2010, 07:42:52 pm »
Well now I'm a little confused again. Because from what calc84 said it sounded like RAM is used as like a list and variable in one. But then you, Builderboy, made it sound like its just like obtaining more variables to use. (I really need to learn more about this stuff some how haha.)

By the way, thanks you guys for help explaining this stuff :)
Spoiler For Spoiler:



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

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [Axe Parser] Bytes?
« Reply #39 on: March 23, 2010, 07:48:31 pm »
Hah, well then we're on the right track because it could be used as both :)

If you were already using 26 variables and needed more, we could easily substitute {L1} as a variable, and {L1+1} as another ect...

BUT

If you wanted a list, you could do {L1+N} where N is the element of your List (starting at 0) to access a lot of different numbers in the range from L1 to about L1+700.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: [Axe Parser] Bytes?
« Reply #40 on: March 23, 2010, 08:03:10 pm »
Question.
Is there a way to make a file or a variable that will stay alive after the program dies?
Basically, is there a way to make a savefile?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [Axe Parser] Bytes?
« Reply #41 on: March 23, 2010, 08:05:11 pm »
Not yet (officially) but there is something that does write back on all stored Hex data so that it stays the same between excecutions.  Its in another thread somewhere...

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6266
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: [Axe Parser] Bytes?
« Reply #42 on: March 23, 2010, 08:05:16 pm »
not yet really, but it's going to be added soon
although you can implement program writeback (see routines thread)
EDIT: ninja!
« Last Edit: March 23, 2010, 08:06:21 pm by Eeems »
/e

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [Axe Parser] Bytes?
« Reply #43 on: March 23, 2010, 08:17:59 pm »
Oh ok, that makes sense :)
Spoiler For Spoiler:



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

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: [Axe Parser] Bytes?
« Reply #44 on: March 23, 2010, 08:47:54 pm »
So, since I'm still a noob on bytes and Axe...
Could someone show me a way or a workaround for save files...?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm