Re: [cc65] ca65 for stand-alone asm projects

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-11-11 11:51:17
Hi Chris,

>> - The INIT segment is placed at the end of the binary. It gets loaded
>> at the address range intended for the BSS.
>> - The STARTUP code moves the INIT segment right after the BSS (where
>> later the heap/stack will go).
>> - The INIT segment content is called (having full access to the BSS to
>> inititalize it).
>> - Later the INIT segment gets overwritten by the heap/stack.
>>
>> This makes all programs somewhat larger (because of the move
>> operation) but saves at actual runtime the whole INIT segment :-)

> But still it has the footprint of the copy operation of the INIT segment :-)

Certainly, but - as you know because you looked at the source - it
very small because it merely sets up some ROM routine to do the actual
job.

> I just looked at the crt0.s file for the Apple, and it's not really obvious
> what you are doing there with the copies. With your explanation above
> it was clear, but without it, I'd have to thing twice or thrice to see
> what is going on. Some comments there would be nice (hint hint) :-)

I sort of see your point - however if you do not only look at crt0.s
but in parallel at the linker config then it's at least somewhat more
obvious ;-)

> Another idea was to create a new "atarixl" configuration (similar to apple2
> and apple2enh),

Maybe I don't understand your analogy correctly but...

The Apple2 and Apple2enh targets do *NOT* differ in the linker config.
That's what secondary linker configs are for. The two Apple2 variants
differ i.e. in
- CPU (6502 vs. 65C02)
- Text screen (only the latter can have 80 columns)
- Lowercase chars (only the latter can display inverse lc)
- Keyboard (only the latter has up/down keys)
- ...

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Nov 11 11:52:07 2010

This archive was generated by hypermail 2.1.8 : 2010-11-11 11:52:12 CET