Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

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]

Topic Posted by  Date 
Mxalloc? Sdw Aug,29.2013-17:59
  Re: Mxalloc? AdamK Aug,29.2013-20:59
  Re: Mxalloc? evil Aug,29.2013-21:29
    Re: Mxalloc? ggn Aug,30.2013-09:45
    Re: Mxalloc? Cyprian Aug,30.2013-12:02
      Re: Mxalloc? evil Aug,30.2013-15:20


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

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.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson