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 4,499 of 4,675   
   George Neuner to mutazilah@nospicedham.gmail.com   
   Re: error for small data model   
   16 Nov 22 12:14:03   
   
   From: gneuner2@nospicedham.comcast.net   
      
   On Wed, 16 Nov 2022 05:33:51 -0800 (PST), Paul Edwards   
    wrote:   
      
   >I'm wondering how a C "hello world" could have worked in small   
   >memory model C compiler (any vendor) when the "hello world"   
   >string could come from either a buffer on the stack or a data   
   >variable.   
   >   
   >It somehow magically worked.   
      
   I may be mis-remembering [it has been a long time], but I believe the   
   "small" model was 64K code, 64K data, DS = SS.   
      
   "tiny"    was 64K code + data, CS = DS = SS.   
   "compact" was 64K code, 1MB data, DS != SS   
   "medium"  was 1MB code, 64K data, DS = SS   
   "large"   was 1MB code, 1MB data, DS != SS, 4:16 pointers   
   "huge"    was 1MB code, 1MB data, DS != SS, 16:4 pointers   
      
      
   >I didn't need to stuff around in my hello world application program -   
   >someone else magically dealt with that.   
   >   
   >Now I'm trying to understand magic.   
      
   No magic, just either saving/restoring the segment register around   
   code that messes with it.  Or liberal use of segment overrides.   
      
   >Thanks. Paul.   
   George   
      
   --- 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