Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: spud2451 on May 24, 2014, 03:57:40 pm

Title: How do I store a string to to a program in AXE?
Post 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:
Code: [Select]
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?
Title: Re: How do I store a string to to a program in AXE?
Post by: ClrDraw on May 24, 2014, 04:08:41 pm
Are you sure its even being stored into A? You should store it into L1 instead.
Title: Re: How do I store a string to to a program in AXE?
Post by: spud2451 on May 24, 2014, 04:09:33 pm
Why L1?
Title: Re: How do I store a string to to a program in AXE?
Post by: Streetwalrus on May 24, 2014, 04:09:41 pm
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. ;)
Title: Re: How do I store a string to to a program in AXE?
Post by: spud2451 on May 24, 2014, 04:12:59 pm
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!