#11270 - sajiimori - Tue Sep 30, 2003 7:31 pm
Are you asking what determines the size of a compiled ROM image? The final size is essentially the sum of the sizes of the objects you link in. Object files contain code and/or data, so their size obviously depends on how much code or data there is.
It seems like you're looking for some other answer, but I'm not sure what it is.
If you're interested in code size, it's pretty easy when it comes to ARM or Thumb assembly. The size of a set of 32-bit ARM instructions is the number of instructions times 4 bytes, and obviously half that for Thumb.
If you're interested in how many instructions a C file will compile to, it depends on the file and the compiler, but you'd normally expect longer C files to compile to more assembly code.
#11277 - tepples - Wed Oct 01, 2003 12:44 am
In general, the amount of space taken up by assets (art, maps, audio samples, and music) will overwhelm the amount of space taken up by code. Even in a simple game such as Tetanus On Drugs, I have 37 KB of code and 115 KB of assets.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.