Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,607 of 4,675    |
|    Rick C. Hodgin to sdn4...@nospicedham.gmail.com    |
|    Re: EXE program stack setup questions    |
|    17 Oct 18 17:39:35    |
      From: rick.c.hodgin@gmail.com              On Wednesday, October 17, 2018 at 8:31:32 PM UTC-4, sdn4...@nosp       cedham.gmail.com wrote:       > For RH:       > Dos allocates all of RAM for a COM program by default.       > When a DOS program exits properly, then RAM is the same for the next       > program upon entry minus whatever a memory manager does to move around       > DOS (and we need not care)       > and drivers/tsrs. All memory upon entry for the new program is the       > same and contiguous from an ASM viewpoint unless the previous program exited       > incorrectly and left a memory leak.              There's no way to know how much memory is there though. I don't       ever recall seeing a function to return the size of a memory block,       but only functions that would fail if you tried to allocate too       much, returning a value in the BX register indicating how many para-       graphs were actually available to allocate, which would tell you how       much was left.              That always seemed like a fundamental flaw in DOS's memory allocation       scheme. But, knowing what I know now about how these things work, I       may not have understood it correctly back then. I can't see such a       glaring failure existing. I must not have had enough knowledge of       how to obtain the actual allocated size.              --       Rick C. Hodgin              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca