Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Ikkerens on October 14, 2010, 01:34:31 pm

Title: Asm( HEX as appvar?
Post by: Ikkerens on October 14, 2010, 01:34:31 pm
Allright, would the following be possible?
Let's say, I have this piece of code:
Code: [Select]
1->{50+L1

1. What would the code be in asm hex (so I can use it with the axe asm( command?)
2. I wanna be able to make this dynamic (what pieces of that code do I need to change to, for example do 5->{25+L1
3. Can this hex code be stored in appvars or any other data containers?
Title: Re: Asm( HEX as appvar?
Post by: Deep Toaster on October 14, 2010, 02:29:25 pm
It would be

Code: (Axe/ASM) [Select]
:Asm(210100225687

for the code you gave. To edit it, you would need to change that 01 to a 05 or whatever you want.
Title: Re: Asm( HEX as appvar?
Post by: Builderboy on October 14, 2010, 03:22:08 pm
ah, doing self modifying code i see?
Title: Re: Asm( HEX as appvar?
Post by: Ikkerens on October 14, 2010, 03:56:18 pm
No, trying to place scripted events outside the source code.
Would drastically reduce the amount of space needed, or even allowing zelda to run as prgm instead of an app.
Title: Re: Asm( HEX as appvar?
Post by: DJ Omnimaga on October 14, 2010, 04:29:30 pm
Wouldn't they still count toward the code limit, or is it something different? I heard some people circumvent the code limit by moving stuff around in assembly but I'm not sure how to do it in Axe.
Title: Re: Asm( HEX as appvar?
Post by: Deep Toaster on October 14, 2010, 07:04:20 pm
Wouldn't they still count toward the code limit, or is it something different? I heard some people circumvent the code limit by moving stuff around in assembly but I'm not sure how to do it in Axe.

Yeah, to do it, you just copy code that starts after $C000 (when the program is copied) to a safe RAM place, such as L1, and execute it from there.
Title: Re: Asm( HEX as appvar?
Post by: DJ Omnimaga on October 14, 2010, 11:39:24 pm
Oh great that's nice :D.

I wonder if the code can simply be stored as data to a pointer then the data copied? I guess that means only hex asm can be used in that case, though :P
Title: Re: Asm( HEX as appvar?
Post by: Deep Toaster on October 15, 2010, 05:12:37 pm
Well, you could compile the bit of code and move that...
Title: Re: Asm( HEX as appvar?
Post by: DJ Omnimaga on October 15, 2010, 05:58:07 pm
Yeah but then it would count in the executable code limit, right?
Title: Re: Asm( HEX as appvar?
Post by: Deep Toaster on October 15, 2010, 06:04:17 pm
I meant maybe someone could compile it separately from the main program, copy that code somewhere, then run it from there in the main program...

Kinda pointless, though.
Title: Re: Asm( HEX as appvar?
Post by: DJ Omnimaga on October 15, 2010, 08:11:51 pm
Idk I am confused. That code would be included in the executable code it's for sure