home bbs files messages ]

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,603 of 4,675   
   Bernhard Schornak to Robert Wessel   
   Re: EXE program stack setup questions   
   17 Oct 18 21:48:54   
   
   From: schornak@nospicedham.web.de   
      
   Robert Wessel wrote:   
      
      
   > On Wed, 17 Oct 2018 10:45:39 -0700 (PDT),   
   > sdn45478@nospicedham.gmail.com wrote:   
   >   
   >> My understanding of how a COM program really works (in real life)   
   >> is that DOS reserves ALL 640K memory and all segments are supposed   
   >> to point to the code segment (64K or less). When you reallocate it   
   >> is up to you to define the SS. If you are mixing your COM program with   
   >> other code not in ASM then as Emilly Latella would say (never mind),   
   >> might as well use an EXE. I routinely use all available ram with tiny COM   
   >> programs and have never had a problem, but for COM programs NASM   
   >> doesn't assume anything, you must tell it.   
   >   
   > Actually DOS reserves all of the free memory segment it decides to   
   > allocate to the .COM, which may not be all of free memory if the   
   > storage is fragmented.  Which fragment was selected did change over   
   > time, but I don't believe it was always simple "biggest available".   
      
      
   As DOS is no multitasking OS, you can read all RAM you can address   
   and write data to all memory locations not assigned to DOS and the   
   BIOS functions. (You could write over those memory blocks as well,   
   but that might crash the machine when the code there is invalid.)   
      
      
   Greetings from Augsburg   
      
   Bernhard Schornak   
      
   --- 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