Author Topic: Modifying real numbers from ram ---AXE PARSER  (Read 4562 times)

0 Members and 1 Guest are viewing this topic.

Offline calcprogrammera

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Modifying real numbers from ram ---AXE PARSER
« on: October 09, 2011, 12:14:26 am »
Hey I have a question about the Axe Parser
How would I create a program that modifies and changes real numbers from RAM?
I figure that creating an assembly program that can mass store and manipulate data and store it back into ram would be useful in some purposes.  For instance, storing 5 to Real Number A, 8 to B, 1 to C, 12 to D, and so on.

I don't understand how to apply pointers to real numbers; so far this is what I have
"varA" > Str1
GetCalc(Str1) > B
5 > {B}r
The problem is that this stores the value 0.5 to A instead of 5.  Im confused.  Please help!
« Last Edit: October 09, 2011, 12:16:46 am by calcprogrammera »

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Modifying real numbers from ram ---AXE PARSER
« Reply #1 on: October 09, 2011, 12:42:23 am »
try 5 > float{B}
that way, it converts 5 to a real number before storing it to address B

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Modifying real numbers from ram ---AXE PARSER
« Reply #2 on: October 09, 2011, 12:44:11 am »
Hey, welcome to Omnimaga!

That code doesn't work because TI uses its own format for numbers. You can convert an integer to a TI real number like this: 5→float{B}

I hope that helps!

Edit: Ninja'd :P
Also, 2048 posts woot
« Last Edit: October 09, 2011, 12:44:48 am by calc84maniac »
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: Modifying real numbers from ram ---AXE PARSER
« Reply #3 on: October 09, 2011, 02:34:17 am »
Axe doesn't (to my knowledge) have a proper library for using the EOS's massive floating-point library; there are literally hundreds of routines. (It is called a "calculator.") There are even routines for applying an operation to every element in a list or matrix. Plus, there are lots of other (albeit slow) system routines that would be useful for what you want to do.
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline calcprogrammera

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Re: Modifying real numbers from ram ---AXE PARSER
« Reply #4 on: October 12, 2011, 07:03:42 pm »
Hmm... so how would i get the address of, say the real number A.  I tried the following code on Wabbitmu and my calculator:
"varA" → Str1
GetCalc(Str1) → B
5 → float{B}

My guess is that the address that I am trying to store the value 5 to is incorrect.  For some reason the number 5 isnt being stored into the Ram into the real number A.  Any guesses on what could be wrong?

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Modifying real numbers from ram ---AXE PARSER
« Reply #5 on: October 12, 2011, 07:10:01 pm »
Hmm... so how would i get the address of, say the real number A.  I tried the following code on Wabbitmu and my calculator:
"varA" → Str1
GetCalc(Str1) → B
5 → float{B}

My guess is that the address that I am trying to store the value 5 to is incorrect.  For some reason the number 5 isnt being stored into the Ram into the real number A.  Any guesses on what could be wrong?
What version of Axe are you using? If it's prior to 0.5.3 for some reason, then the offset should be float{B-2}.

Otherwise, what is the error? Is it storing an incorrect number, or is the real var A not being created?


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline calcprogrammera

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Re: Modifying real numbers from ram ---AXE PARSER
« Reply #6 on: October 12, 2011, 07:11:44 pm »
the variable A isnt being created! thanks! the version of axe that I was using was an older version haha