Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Runer112 on June 22, 2010, 10:57:26 pm
-
How can you display tokens? I'm pretty sure there's no way to do it in Axe (though I may be wrong), but is there at least a way to do it with assembly?
-
You can do it with Axe by storing the value of the token to a variable and using the >Char (>Frac) command:
Disp A>Char
Old Axe:
Disp A>Frac
Assembly is the same story, but with register A and the PutC command.
-
I'm not talking about ASCII characters, I'm talking about tokens. Things like DiagnosticOff, For(, Str0, etc.
-
GetTokLen, IsA2ByteTok, PutTokString, and Get_Tok_Strng are the desired routines. Unfortunately, I can't document them right now, so at least someone can use these to help you further.
-
Actualy there is only one routine you need, i have the hex codes from my Basic Editor right here. The routine i use reads from memory though, so you need to give it the address of the token you want to read, 1 or 2 byte.
LAsm(EF 94 45 6F 26 00)
Disp e848E
848E is the location of Op1, where the string is put. You can display it directly, just use the little E thingy :)
-
Does this require inline ASM HEX code?
-
It's been on the wish-list for a while, I have all the routines written already. They were just commented out becasue I need to get the token data working first so you can actually use the feature. Like the same way you can do 'A' to get the ascii value, you would be able to use tA to get the token value. Also, like you can use the double quotes to define a string, I'm going to add some way to define a series of tokens. That will be especially useful if I decide to add a "Parse" command to execute the token data as BASIC code.
-
Uncomment it! ;D
-
^++
Please!
-
I agree, this could be rather useful. But yes, what token to use as a quote?
-
I agree, this could be rather useful. But yes, what token to use as a quote?
I will probably use the little "L" that BASIC uses for custom lists. I don't need any endquote.
-
I was actually wondering how to display tokens because one thing I enjoy doing is making tools for programming (like my sprite editor). I was actually planning on making an Axe program editor like you plan on in future versions. If I got it in good working condition, then you could even just absorb it into your Axe releases and not have to worry about all the work for it, I'd do it for you. ;)