slenkar писал(а):
I wasnt telling the compiler to put the data anywhere, in the manual it says the data goes at 0x10 but thats ROM so I dont know how that was possible.
SDCC is designed not only for ZX Spectrum-like machines, and for any Z80-based (for example, Philipp Klaus Krause uses it for development for Coleco Vision), therefore it is possible to place data by default to any address - RAM may be there.
slenkar писал(а):
It would be nice if the compiler told me how much RAM the code takes up and how much the arrays take up.
You can see this info in SDCC-generated .map files:
Код: "EMPTY"
Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
_CODE 0000B000 000001FB = 507. bytes (REL,CON)
_DATA 0000F800 00000009 = 9. bytes (REL,CON)
Also there is a list of all used libraries, procedures, etc.