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,072 of 4,255    |
|    wolfgang kern to James Harris    |
|    Re: The EA jump immediately after enabli    |
|    12 Feb 22 13:01:27    |
      From: nowhere@nevernet.at              On 12/02/2022 12:08, James Harris wrote:       ...       >> 2. setting PE does nothing on its own, the CPU remain in real mode until       >> the far jump which changes interpretation from segment to descriptor.       >> and its a 16:16 code without prefix              > I am not sure that's right, Wolfgang. I am beginning to think that once       > PE is set the processor will be in 16-bit Protected Mode (PM16); in that       > mode the encoding of instructions will be identical to RM; and the main       > differences will be when loading segment registers. There may also be       > some differences when /using/ segment registers but see below.       ...       > mov ds, ax       > ... DS now has base, limit and protections as loaded from GDT       >       > That's it. Feel free to disagree.              Yeah you're partly right :) the CPU isn't in PM unless you alter CS.       but write to a data segment register invokes UNREAL mode.       the only thing which is different with a set PE-bit is interpretation       changes from segment to descriptor but only when segreg is written to.              you could do after setting PE:        mov ds,[variable] ;the var is still a real mode DS address        ;and DS became a descriptor after this.       also:        mov esp,[cs:d16] ;uses the current CS range              > But if I am right then it's amazing how little changes in the CPU       > between each step.              I see only one beside the final jump.              As long CS remain untouched there are no privilege checks, so it acts       like in real mode for ALL "otherwise protected" instructions.       That's why I said the change occur only on write CS.       OK I forgot the UNREAL exception here even I use that a lot.       __       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