Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: spud2451 on May 24, 2014, 03:57:40 pm
-
How do store a 0 terminated string to a program in AXE. I want to do this because I'm making the libraries for fiddle 3.0 and need to be able to run user inputted code. I'm currently thinking that all I have to do is store the code to a program then run the program. That's what I did for fiddle 2.0 and 2.5 so it should work in a similar setting.
I currently have this code:
INPUT() -> A #this is a self written input routine
GetCalc("prgmTEMP",{A-2}r) -> B
Copy(A,B,{A-2}r)
With this code it creates the program "TEMP" but then just write a whole bunch of question marks and jibberish.
Does anyone know what im doing wrong here?
-
Are you sure its even being stored into A? You should store it into L1 instead.
-
Why L1?
-
Well, this code should work so long as {A-2}^^r holds the size of the data to copy. Keep in mind you have to use tokens and not characters for programs.
Also ClrDraw : A just holds a pointer here. ;)
-
The tokens might be what I'm doing wrong. I think its just a normal string not a string of tokens Thanks!
EDIT:
Thanks that worked!