[Coco] SDCC and other C topics

KnudsenMJ at aol.com KnudsenMJ at aol.com
Fri Mar 18 13:31:38 EST 2005


 
In a message dated 3/18/05 1:13:08 PM Eastern Standard Time,  
zmerch at 30below.com writes:

>Hrm... I never knew that... Does that mean that Level 2 loads each  unique 
>program at the beginning of an 8K  boundary?



That's always been my impression -- every unique user program gets LOADed  in 
its own 8K block out of the 64 possible.  I think this is actually  specified 
in the manuals somewhere, and has been criticized as wasteful of RAM  and 
blocks.  But it means every program sees itself at ORG 0.  Its  data space will 
also be at an 8K boundary, like Hex 2000, 4000, etc.
 
However, I just realized -- if you paste two or more program together and  
load them as one, all but the first will be at odd addresses.  So do be  careful 
with this!
 
Actually, I've dealt only with large programs written mostly in C, like  UME.
But, I'd bet that *any* C program (printf("hello, world\n"); comes to mind)  
compiles into an executable big enough to take up most of an 8K block -- and  
yes, this is a not so nice feature of MWC, mostly due to the big stdio library 
 (printf and friends)  --Mike K.
 
 



More information about the Coco mailing list