Author Topic: Token Display  (Read 8173 times)

0 Members and 1 Guest are viewing this topic.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Token Display
« 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?

SirCmpwn

  • Guest
Re: Token Display
« Reply #1 on: June 22, 2010, 11:01:47 pm »
You can do it with Axe by storing the value of the token to a variable and using the >Char (>Frac) command:
Code: [Select]
Disp A>Char
Old Axe:
Disp A>Frac

Assembly is the same story, but with register A and the PutC command.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Token Display
« Reply #2 on: June 22, 2010, 11:06:29 pm »
I'm not talking about ASCII characters, I'm talking about tokens. Things like DiagnosticOff, For(, Str0, etc.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Token Display
« Reply #3 on: June 22, 2010, 11:08:46 pm »
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.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Token Display
« Reply #4 on: June 22, 2010, 11:18:01 pm »
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.

Code: [Select]
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 :)

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: Token Display
« Reply #5 on: June 22, 2010, 11:18:47 pm »
Does this require inline ASM HEX code?

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Token Display
« Reply #6 on: June 22, 2010, 11:20:38 pm »
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.
« Last Edit: June 22, 2010, 11:21:40 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Token Display
« Reply #7 on: June 22, 2010, 11:25:48 pm »
Uncomment it! ;D

SirCmpwn

  • Guest
Re: Token Display
« Reply #8 on: June 22, 2010, 11:43:33 pm »
^++
Please!

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Token Display
« Reply #9 on: June 22, 2010, 11:44:55 pm »
I agree, this could be rather useful. But yes, what token to use as a quote?
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Token Display
« Reply #10 on: June 22, 2010, 11:48:09 pm »
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.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Token Display
« Reply #11 on: June 22, 2010, 11:55:04 pm »
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. ;)