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 2,613 of 4,255   
   mutazilah@gmail.com to muta...@gmail.com   
   Re: PDOS/86   
   15 Jul 21 03:40:30   
   
   From: muta...@gmail.com   
      
   On Thursday, July 15, 2021 at 6:45:04 PM UTC+10, muta...@gmail.com wrote:   
      
   > > you still haven't realized that base bits 0..23 and 24..31 are   
   > > NOT adjective. There are two bytes in between.   
   > > You would have known this if you already wrote an 386 OS.   
      
   > Why do I care if the base bits are not adjacent?   
      
   Just to be clear.   
      
   When PDOS/86 is running on an 80386, at startup time, it will   
   set all 16384 selectors to map the first 512 MiB of memory,   
   and then never ever change them.   
      
   When PDOS/86 is running on an 8086, at startup time, it will   
   do nothing.   
      
   When PDOS/86 is running in those two different environments,   
   when it loads a 16-bit APPLICATION into memory, it will adjust all   
   the segments (a normal part of the load process), but the   
   adjustment will be completely different for these 2 different CPUs.   
      
   tiny, small, medium, compact and large memory model programs   
   do not ever manipulation segment registers, they only ever load   
   them. (at least the applications supported by PDOS/86).   
      
   Only huge memory model programs manipulate the segment   
   registers. The PDOS/86 rules for huge memory models doing   
   segment adjustment when they have a value of e.g. 64k added   
   to them, and the segment needs to adjust by whatever the   
   representation of 64k is, is to do this by doing a divide, and   
   then a multiply. Both the value to divide by, and the value to   
   multiply by, are required to be obtained from the operating   
   system when the huge memory model application begins   
   execution. The values from PDOS/86 when running on an   
   8086 will always be the same. The values from PDOS/86   
   when running on an 80386 will always be very different   
   from when PDOS/86 is running on an 8086.   
      
   Two separate PDOS/86 systems, both running on an   
   80386 with 512 MiB memory will have the exact same   
   values for the divide and multiply.   
      
   But if one PDOS/86 is running on an 80386 with 256 MiB   
   of memory, it will have a different divisor. The smaller   
   divisor allows finer granularity, for the same reason that   
   Intel made the 8086 shift 4 bits instead of 16.   
      
   The multiplier on the 80386 will always be 0x10, because   
   that is the distance between two GDT data (same thing   
   applies to code) entries.   
      
   As far as I can tell, based on your mention of base values   
   not being adjacent in the GDT entry, you do not understand   
   my proposal.   
      
   I'm not saying that's your fault. I'm not very good at   
   explaining things, and it's only when I have working code   
   and can say "look at that", that people understand.   
      
   Although sometimes I actually show it working and people   
   still say it won't work.   
      
   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