home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,158 of 4,255   
   mutazilah@gmail.com to Steve   
   Re: small memory model   
   17 Apr 22 10:23:37   
   
   From: muta...@gmail.com   
      
   On Sunday, April 17, 2022 at 10:17:12 PM UTC+10, Steve wrote:   
   > In <42bdffae-5f36-4f6e...@googlegroups.com>, "muta...@gmail.com"   
    writes:   
   > >Is there any reason why small memory model can't   
   > >be used to make a .com file?   
      
   > A *.COM file is a single segment containing all code,   
   > data, and stack. This is the TINY memory model. The   
   > SMALL model allows for separate code and data segments.   
   > Therefore making a *.COM file would require non-standard   
   > processing to eliminate, or combine, the separate code,   
   > data, and stack segments.   
      
   Why is it necessary to eliminate the separate code,   
   data and stack segments? These are located at   
   fixed, consecutive locations in the executable. Why   
   can't the startup code just set ds and ss to those   
   fixed offsets from cs?   
      
   It seems to me that if the above is done, the .com file   
   would still be able to be loaded anywhere in memory,   
   and allow 64k code, 64k data and 64k stack.   
      
   I'm not sure what startup code would be required to   
   set ds and ss correctly though.   
      
   BFN. Paul.   
      
   --- 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