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,250 of 4,255   
   mutazilah@gmail.com to wolfgang kern   
   Re: segmentation   
   03 Sep 22 21:32:55   
   
   From: muta...@gmail.com   
      
   On Sunday, September 4, 2022 at 7:36:16 AM UTC+8, wolfgang kern wrote:   
   > On 02/09/2022 19:20, muta...@gmail.com wrote:   
   > > On Friday, September 2, 2022 at 6:53:49 PM UTC+8, wolfgang kern wrote:   
   >   
   > >> [...]   
   > >>> No, default status is no wraparound, but some   
   > >>> environments may wrap around anyway due to the fact   
   > >>> that there are 20 or fewer address lines.   
   > >> The KEY to wrap around at 1MB once was the A20 gate,   
   > >> it's now just an historical thing found only in museums.   
   > >> PCs don't even have an A20 gate anymore (==always ON).   
   > >>   
   > >> the HMA (0010_0000 aka FFFF:0010..) was very often used   
   > >> by DOS and friends, so they needed A20 ON.   
   > >>   
   > >> easy to make it wrap at 1MB with segment limits.   
   > >> but it will wrap only if the access is aligned while   
   > >> crossing the boundary with a multi-byte instruction   
   > >> end up in a Seg-Fault or with an GP-error if PM.   
   > > Sure. What I'm looking for is a set of rules   
   > > to follow, with the benefit of hindsight.   
   >   
   > > From memory, the PSP used when a .com file   
   > > is loaded, makes use of address wrap.   
   > I cannot confirm your assumption above,   
   > .com are organized at 0100 so the PSP is at 0000.   
   > therefore a .com-file is size limited to 63.75K.   
   >   
   > Rules ? my rules are according to given hardware.   
   > I'd just recommend to always avoid address wrap [A20 ON].   
   >   
   > the inherent backwards addressing uses overflow to make   
   > an unsigned displacement look as if signed [isn't wrap].   
   >   
   > for speed reasons my initial ESP=0, it could under-run]   
   > old DOS used a misaligned SP (ffff instead 0) to force   
   > a segment fault on stack under-run [but made all slow].   
   >   
   > as you seem to work on virtual machines you can define   
   > whatsoever rules you like :)   
   > You cannot alter any features of existing REAL hardware.   
   >   
   > AFAIK x86 is the only CPU family with address Shift-Add. Others   
   > use either banks or two [w/o shift] registers for >64K.   
   > __   
   > wolfgang   
      
   Although we can't change existing hardware, we can   
   start by agreeing that Intel engineers missed   
   some things that only came to light when   
   pointed out by an obnoxious Australian, instead of   
   dismissing everything he says in favor of   
   professional infallible Americans.   
      
   After establishing that apparent truth we can   
   discuss what options exist to compensate for American engineering failures.   
      
   This includes the option of altering or   
   replacing historical software.   
      
   Here's the PSP thing:   
      
   https://groups.google.com/g/comp.os.msdos.programmer/c/ZvWGKqT5F   
   c/m/skFPO1H3EAAJ   
      
   --- 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