|
Atari coding BBS
Mxalloc? |
Posted by: Sdw
|
Aug,29.2013-17:59
|
Hello, it's me again - sorry for spamming the forum with questions, but this seems to be THE place to get answers to all AtariST coding-related stuff! :)
I've come to the conclusion that my old method of declaring the screen as:
ds.l 32000*2+256
in the assembly-part of my program was kind of wasteful, as it meant the .exe gets bloated by 64256 bytes of zeroes.
Instead I found something called Mxalloc, so now instead I do this from the C-portion of my program:
int main()
{
screenbuffer=Mxalloc(32000*2+256,0);
if(screenbuffer) Supexec((LONG(*)())demo);
if(screenbuffer) Mfree(screenbuffer);
}
It seems to work OK, but is this a good way to do it?
Also another question, if I'm targeting a standard 520ST (512kb RAM) - how big can my executable be? That is, how much have the OS reserverd?
As I allocate 64kb from the code, that much of course need to still be free once the exe has loaded,but I guess that the max size isn't 512-64kb, but rather much smaller. But HOW much smaller? Can I have a 400kb exe for example?
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|