[A83] Re: ASM program space alocation


[Prev][Next][Index][Thread]

[A83] Re: ASM program space alocation




I always keep all my data at the end of my program...just a convention I
follow.

-----Original Message-----
From: assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org] On Behalf Of Patai Gergely
Sent: Sunday, March 24, 2002 4:17 PM
To: assembly-83@lists.ticalc.org
Subject: [A83] Re: ASM program space alocation


> Keep in mind that programs may be above C000h in memory, 
and calling
> C000-FFFFh on a TI-83 Plus will result in a RAM reset.
> 
Of course. But as I pointed out, it is probably not the 
best way to copy the program to be called over the program 
currently running, because for that you need a safe copy of 
the current prog as well (as seen in the code given). 
However, that could cause problems with variables stored 
inside the program - they would be overwritten with their 
initial values on returning from the other prog. A better 
way would be exchanging the two areas with each other, byte 
by byte. LDIR is convenient, but it's really not the right 
choice in this case.

BTW just another "trick": often you don't need the system 
variables (zoom factors and others) in an asm prog, so it 
could be possible to exchange them with some of the user 
ram for the running time. That's a massive contiguous >1k 
hole, well under the $C000 boundary. Then you could as well 
compile programs with an .org pointing at this address 
(let's say $8e7e). If you add plotsscreen, it almost gives 
you 2k in one block.

Moreover, if you don't use romcalls and disable interrupts, 
it should be possible to make use of the whole system ram 
by temporarily placing it to the top of the user ram area. 
But certainly, that's a bit wild thing to do. :)

PG





Follow-Ups: References: