the question is
So 64tass has a linker but its internal. I.e it has the full power of a linker just you don't have to run an external tool to get it.You have me curious now why the 64tass manual says it includes a "linker" with the word "linker" in quotes.
This is a RAM problem not a ROM problem. But lets say you have a game and you have an IRQ chain, now that IRQ chain has to change depending upon if you are PAL or NTSC. Because they have a different number of lines, and different clocks per line. So you make a NTSC IRQ chain and an PAL IRQ chain. When you load the game or copy from cart to RAM, you want put it into memory at the same spot so the function addresses still line up, and you want to make sure that the gap you leave in the code is big enough to hold the larger of the two. ie. you have
Code: Select all
functions here
<IRQ BLOCK HERE>
more functions here
put each IRQ into a section. So sPALIRQ and sNTSCIRQ now you code can have
Code: Select all
functions here
.fill size([size(sPALIRQ), size(sNTSCIRQ)]) >? ... ; this will leave the maximum size of the sections
functions here
you can then also do this on a per function bases so that each part of the IRQ has the same address. Ie.
PALTOP and NTSCTOP have the same address and PALMID and NTSCMID have the same address. Thus all the other code can have a fixed address for the labels and there is enough space to hold all of them, with gaps left as needed.
So it can assemble modules of code, then move and place them in the memory map as a linker does, only its all internal and done as part of the assemble stage. This gives it more power as it can then do partial links, then full assembly passes over the partial links to then generate more linking/assembling. This is why 64Tass is N pass, it will keep assembling and linking and assembling and linking as it needs to until it reaches a completed output file. Typically I run about 5 passes in my code, but the code that needed the example above was 9 passes to build.