[TI-ASM]Overwriting labels

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

So you want an awfull lot of them, for every command 1? If you're making your own editor you could just use a large LUT and replace every byte by a string..
LolBbq
New Member
Posts: 20
Joined: Thu 23 Nov, 2006 3:01 pm

Post by LolBbq »

Not for every command, but for every instruction and flag and some other ti83plus.inc equates. I think registers would also have a token associated with it, and the combination of an instruction, register, or a memory destination would be replaced with the appropriate hex or binary code.
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Sounds like a very good idea, but I fear there will be some limitation keeping you from using that much tokens :)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
LolBbq
New Member
Posts: 20
Joined: Thu 23 Nov, 2006 3:01 pm

Post by LolBbq »

Timendus wrote:Sounds like a very good idea, but I fear there will be some limitation keeping you from using that much tokens :)
Well, I still don't know how to go about making tokens, much less know about what limitations will keep me away from making that many.
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

If you're only going to use the tokens in your own editor, you could just do something like this:

Code: Select all

;hl is pointer to the place you store the stuff
ld l,(hl)
ld h,0
add hl,hl
add hl,hl 
add hl,hl ;8 times HL, assuming you use 7 letters max
ld de,Text
add hl,de  ;hl is now a real pointer to the text
bcall(_PutS)
ret  ;if you're making this a subroutine
there should be a mistake/typo in it somewhere, never trust my code :P
and the code at Text should look like this:

Code: Select all

Text:
.db "add ",0,0,0,0
.db "adc ",0,0,0,0
.db "bcall(_",0
etc.. etc..
And if you're going to use the old program editor, well, I'll look into it (I'm using it, but I use lowercase letter-tokens)
LolBbq
New Member
Posts: 20
Joined: Thu 23 Nov, 2006 3:01 pm

Post by LolBbq »

Yeah, that's what I meant, although I feel it needs to be more dynamic for editing and parsing. I like the idea for a base code which I will try to expand around. :)
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

Ok, good luck :)
Post Reply