[A86] Re: Breaking 8k asm limit


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

[A86] Re: Breaking 8k asm limit




As others have pointed out, this really isn't a good method, but there are
some better methods.

Assembly Studio 8x now has full support for the method that Zelda 86 uses,
and it makes it easy to use.  Most or all of the code fits within the 8k
program, zelda.  This is fine, as 8k of code is really quite a lot of code.
Not many things will have more code than that.  But it doesn't really
matter, since code and data are pretty similar.  The data goes in a string,
zeldadat.  This string is loaded at $8000 on ram page 1.

zeldadat gets the first pass of the assembler run to generate a symbol
table.  This is exported as an include file.  The include file contains all
the actual address locations of the data.  This file is included by zelda.
zeldadat is also compiled into a string at this point, because nothing it in
references anything in zelda.  If the two things need to reference each
other, then it can be a bit more complicated.  Now that zelda has all of the
addresses it needs, it gets compiled into a program.

This is the exact method I used when porting Joltima to the 86.  The 85 port
was actually easier, because I didn't have to mess with any relocation
stuff.  Though, the Joltima code was very very easy to port.  I think I had
both the 85 and 86 ports done from the 83 code in less than half an hour in
total.  The 86 port also had some blank space removed from the program,
since the 86 has lots of free ram that can be used.

> 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






References: