From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-04-28 21:39:18
On Mon, Apr 28, 2003 at 09:51:49PM +0300, Marko Mäkelä wrote: > Now, the problem is: how can I produce a list of all locations that need > to be patched? If I remember correctly, the CS-DOS code (a C128 shell > extension made by Chris Smeets) does this by assembling the code at two > different offsets and comparing the resulting binaries. Is there a more > "intelligent" way? I'd like to use André Fachat's xa, but porting the > code to the assembler of the cc65 compiler suite is not out of the question. As far as I know, xa generates o65 output files, so at least the information is there. You can... 1. ... change the xa source to export the necessary information (or ask Cameron about it), or 2. ... write a utility that extracts relocation information from the o65 binaries. Both methods may be more "intelligent" than assembling the binary twice, but I doubt they're easier. Another possibility is to 3. grab the cc65 module loader, and modify it to suit your needs. The module loader is a relocator for o65 modules, so it is exactly what you need. The drawback is the increased size: The o65 file is somewhat larger than the binary, because it contains relocation information, and you have the overhead of the relocator (about 1/2 KB in case of the cc65 module loader). 1. may be the least work, especially if you get Cameron to do it:-) A combination of 1. or 2. together with some limit to the supported relocations will probably give the smallest code size. 3. is probably the most universal approach, and has the largest overhead (but will allow arbitrary relocations, even for the used zero page space). Regards Uz -- Ullrich von Bassewitz uz@musoftware.de Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.