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,328 of 4,255   
   wolfgang kern to muta...@gmail.com   
   Re: segmentation   
   20 Oct 22 17:24:39   
   
   From: nowhere@nevernet.at   
      
   On 18/10/2022 21:34, muta...@gmail.com wrote:   
   > On Thursday, October 13, 2022 at 8:25:01 PM UTC+8, Joe Monk wrote:   
   >>> You think the entire MSDOS has been written   
   >>> with no assumptions about 4 bit shifts?   
      
   >>> You could be right. I've never looked at the   
   >>> MSDOS source code except for one bit   
   >>> someone pointed me to so that I could see   
   >>> the word Xenix.   
      
   > I just remembered - if you are using huge pointers for   
   > any reason, you need to know the shift value in order   
   > to be able to adjust the segment register.   
      
   > I think it is impossible for MSDOS to manage more than   
   > 64k of memory, ie 640k or 1 MB or 2 MB without huge   
   > pointers or equivalent.   
      
   MSDOS used "far" instead of "huge" and the 16 high bits   
   came from memory allocation FN anyway (ES or handle).   
   programmers may never cared about the 4 bit shift.   
   You only need to know this 4 bit Shift-Add mechanic when   
   using UNREAL 32bit access or debugging or manual locate.   
      
   I know several MSDOS applications (mainly games) that   
   used up to 640KB MAIN plus 2*64k EMM plus 63.5K HMA.   
   they often just had at the end of a code block like:   
   MOV ax,cs   
   ADD ax,0x1000   
   push ax   
   push 0   
   ret far      this jumps to next_block with CS adjusted.   
   :next_block   
   __   
   wolfgang   
      
   --- 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