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,139 of 4,255    |
|    wolfgang kern to James Harris    |
|    Re: The EA jump immediately after enabli    |
|    25 Mar 22 08:33:46    |
      From: nowhere@nevernet.at              On 23/03/2022 18:50, James Harris wrote:       [agreed..]       > For Intel and probably AMD it looks as though one can get the CPU to       > report the Limit with an LSL instruction and the Attributes with LAR but       > I don't know a way to get the base.              get_base: ;selector in eax assume DS=flat        MOV esi,anybuffer        SGDT [ds:esi] ;now you know where the GDT resides        AND eax,FFF8 ;just in case       SHL eax,3 ;mul by 8       ADD esi,eax        LEA esi,[eax*8+esi] ;same as the two lines above but faster/shorter        MOV ecx,[esi+2] ;low 24 bits of base        AND ecx,00FFFFFF        MOV bl,[esi+7]        SHL ebx,24 ;decimal yet!        OR ecx,ebx ;ecx hold 32 bit base of selector eax yet              it works on both code and data descriptors.              > On Cyrix there's SVDC to write the entire Descriptor to ten bytes of       > memory.              I never used and wont recommend any exotic CPU to rely on.       ...       >> Seems an old wiki note were burned into my brain:       >> "the transition from RM to PM occur only on the final far jump"              > I've heard similar. Perhaps whoever wrote that didn't know about PM16 -       > which I also didn't until a few weeks ago.              me too learned something new even it wont affect any of my code :)       __       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