[A86] Re: Breaking 8k asm limit
[Prev][Next][Index][Thread]
[A86] Re: Breaking 8k asm limit
On Mon, 7 Jan 2002, Yi Lang Mok wrote:
> For asm programs, there is an 8k limit:
>
> 1. make a program and turn it into a string
> 2. make another program which will search the vat for the string program
> 3. locate its address (Adding an integer that i'm too lazy to look up)
> 4. jp to it
>
> That way, the program doesn't need to be copied. in addition, you get an
> 8kb space (minus the space which loaded the loader program in case the shell
> uses writeback)
>
> I'm no good at all trying to manipulate the vat, i'll be glad if someone
> could write it or tell me that this is a useless post...
Unfortunately, this method wouldn't really be very effective. The main
reason is that most programs contain lost of instructions which look like
"jp label1", "call label2", "ld hl, label3", etc. Since a variable
wouldn't be always at the same address, these things would not work since
they expect the destination to be at a certain address which will be
incorrect. Of course it is possible to work around this, if your loader
managaed to relocate these references, or had support for
position-independent simulation of call/jp/etc. These things were
actually done on the TI-85. But since the TI-86 has lots of space for
temporary storage it is easier and more efficient to just copy it.
There are actually other problems, such as the possibility the program
will be on a RAM page boundary, and the fact that even though you gain the
8K of execution space for temporary storage, you lose 16K of temporary
space since the variable's page is put in place of the ~16K of temporary
memory you get otherwise.
References: