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,363 of 4,255    |
|    mutazilah@gmail.com to Joe Monk    |
|    Re: segmentation    |
|    23 Oct 22 18:03:05    |
      From: muta...@gmail.com              On Monday, October 24, 2022 at 8:26:51 AM UTC+8, Joe Monk wrote:       > > Since the memory to be managed is more than 64k, the OS       > > needs to effectively using huge pointers, and as such the       > > huge memory model OS needs to generate code that is       > > aware of the segment shift value.       > >       > Straight from the intel 8086 book:       >       > "In order to be dynamically relocatable, a program must not load       > or alter its segment registers and must not transfer directly to a       > location outside the current code segment. In other words, all       > offsets in the program must be relative to fixed values contained       > in the segment registers. This allows the program to be moved       > anywhere in memory as long as the segment registers are updated       > to point to the new base addresses."              That sounds like the rules for the tiny and small memory models.       Medium, large and huge memory models necessarily need to load       segment registers. Huge even needs to manipulate them.              > "Whenever the BIU accesses memory-to fetch an instruction or       > to obtain or store a variable-it generates a physical address from       > a logical address. This is done by shifting the segment base value       > four bit positions and adding the offset..."              That is the undisputed behavior of the real 8086. It says nothing       about a theoretical 8086+ from NEC.              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