On 7/11/2026 4:47 AM, ruud_at_baltissen.org wrote: > > > Are there other solutions? In theory a program not containing jumps, > subroutines and fixed memory can be relocated anywhere in memory. But > is that practical? > Another solution is to write a program and to create a table of all > addresses that have to be changed before loading it at a specified > address. But that program needs to reside on the computer and > therefore will soup up memory. But how much? I don't want to end up > with a cure that is worse than the disease. BTW, this is not my idea. > But I don't know any more where I read that, André's GeckOS or CA65? > > You see, a lot of thing to worry, eh, think about :) The fixup table was my idea, but I don't think it needs to be in memory. Have the program assemble as if it lives at $100, and then follow it with a set of relative offsets from the last offset that need high byte fixups. a 0 offset means the offset is 2 bytes in length. After loading, patch the code by walking the offset table and adding <page>-1 to each offset. The code to do that should be small and can operate across the entire 64KiB space. When done, trash the offset table. If you're worried about overwriting during a load, you can modify the load command to include a 1-2 byte program length as the first 2 bytes of the program, in lieu of the start address (since all programs would assemble to $100, and use that to constrain the initial file load, switching to a safe open space for the offset table read following the main program data. > > -- Jim Brain brain_at_jbrain.com www.jbrain.comReceived on 2026-07-11 21:00:02
Archive generated by hypermail 2.4.0.