[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cc65 competition?



Hi,

>cc65 seems to include justb the necessary ones

Of course. That's what a linker is for ;-)

>although some
>fat (i.e. the initmainargs assembler function, which processes the
>command line, shortened to pushing two NULLs on the stack) could still
>be cut.

1. The compiler contains a special optimization that doesn't pull in
initmainargs at all if main is declared as main(void). Check out your
map file to see what you actually get !

2. The initmainargs code lives in a special INIT segment which gets
overwritten later by the heap. So the memory in questions can be
reused.

Best, Oliver