[A86] Re: Breaking 8k asm limit


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

[A86] Re: Breaking 8k asm limit




As Patrick pointed out, there are a couple problems with this...  for
one, you can't use any absolute addressing without some sort of Usgard
or ZShell-esque scheme for dealing with it.  Also it's likely that
your string spans multiple pages in ram, so only parts of it would be
accessible at any one time.

Fortunately you can get around both problems by copying the string to
a fixed address on ram page 1 (a bit complicated, but there are rom
calls that'll do it for you).  This lets you get a nice 25k of program
data available at once (16k on page 1 and 9k at _asm_exec_ram).  In
this case you can also replace the word 'copy' with 'decompress',
which is a good thing of course.

Another trick is to relocate (e.g. your code changes places in memory
with some other stuff) your string to a fixed address
somewhere in user memory, for example the start of ram page 2.  This
is similar to what Ion, PhatOS, Ash, CrAsh, etc. do.  The advantage
here is that you keep the 16k of blank space on ram page 1, plus you
still get the 25k of space to put your program data in.  Unfortunately
it takes a lot more code to do...

On Sunday, January 06, 2002, Yi wrote:

> Please don't laugh at me if what i'm about to write is useless or that i 
> could have found it out easily on the web without thinking about it

> 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...

> Thanks
> Yi Lang


--
Hail Ants! 
Aaron
acurti1@umbc.edu





References: