Re: New draft version of o65 file format

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2005-03-30 13:54:14

On Wed, Mar 30, 2005 at 11:16:03AM +0200, Gabor Lenart wrote:
> No, no, you don't need to increase the loader complexity since we're
> talking about OPTIONAL features. 

Yeah, but if I can't ignore these optional features, I have a problem. If the
exact CPU type is encoded in an optional header field, I have to add code to
check for the flag that says "optional header present", then check for this
optional header, and within this header, check for the correct CPU. Currently,
the whole header is checked with a simple memory block compare. Even the
(additional) check for the operating system is unnecessarily complex in my
eyes, because it's burried in other data records that may encode author,
time/date of compile and so on.

I admit that the additional code will be just 50 bytes or so, but even this is
a lot on 6502 platforms. I'm scanning through the existing library code in
regular intervals to find a way to squeeze three or five bytes out of heavily
used routines, because I know that *every* program will benefit from it with
just a recompile (this is the nice thing about a library). If would prefer to
avoid adding 50 bytes for a CPU check, if I can.

> I know, I've written some code for C64 with ca65, I've asked something about
> the linker from you exactly on this topic, if you remember :)

Yes, I remember:-) I've added the Intel/Zilog number format (100h) to ca65
after the mail exchange.

> About the complexity: you're right, that's why I always try to find
> way to do it as an OPTIONAL stuff. I mean, you don't want to integrate
> support for this feature for YOUR loader.

Unfortunately, I cannot ignore the CPU type. Trying to load code written for
the Z80 won't execute correctly (at best:-) on a 6502.

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.