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,764 of 4,255   
   wolfgang kern to James Harris   
   Re: A20 desperation mode   
   26 Jul 21 02:36:48   
   
   From: nowhere@never.at   
      
   On 25.07.2021 17:59, James Harris wrote:   
      
   >>>> all my machines don't even have an A20 gate anymore, since 2010.   
      
   >>>> but I kept the few bytes to check ffff:0010 isn't equal to 0:0.   
   >>> Very sensible. It's virtually cost-free assurance.   
   >> it was cheaper to keep it :)   
   >> ; push -1   
   >> ; pop es          I need this four anyway   
   >> ; push 0          done during boot once   
   >> ; pop ds   
   >> 66 A1 00 00       mov eax,[0000]   
   >> 36 66 3B 06 10 00 cmp eax,[es:0010]   
   >> 74 xx             JZ ... ;A20 failed   
      
   > Presumably you know those locations cannot be equal. I have code which   
   > does something similar to yours   
   >   
   >    mov ax, [A20_TEST_WORD]   
   >    cmp ax, [es: A20_TEST_WORD + 16]   
   >    jne .enabled   
      
   > but in case the values just happen to be the same I follow it with   
      
   >    not ax                   ;Set a different value   
   >    mov [A20_TEST_WORD], ax   
   >    cmp ax, [es: A20_TEST_WORD + 16]   
   >    not ax                   ;Get back old value (without   
   changing flags)   
   >    mov [A20_TEST_WORD], ax  ;Restore memory (without changing flags)   
   >    jne .enabled             ;Branch on result of the compare   
   instruction   
      
   > which I expect you regard as bloat! :-)   
      
   I may not see it as bloat because 16 bits could really be equal   
   so I call it James-styled aka double featured as usual :)   
   __   
   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