home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,903 of 4,675   
   Rick C. Hodgin to rugxulo@nospicedham.gmail.com   
   Re: Entering Protected Mode   
   03 Jul 19 08:12:46   
   
   From: rick.c.hodgin@gmail.com   
      
   On 7/3/2019 3:07 AM, rugxulo@nospicedham.gmail.com wrote:   
   > Hi,   
   >   
   > On Wednesday, June 19, 2019 at 2:59:42 PM UTC-5, Rick C. Hodgin wrote:   
   >>   
   >> On the line above after the ";; Ok, we're in protected mode..."   
   >> I issue a JMP $+2.  I remember when writing this code that it was   
   >> a requirement to clear the cache.   
   >   
   > I know nothing of pmode. I've never coded anything in it directly.   
   >   
   >> My question today is ... why does that need to be done?   
   >>   
   >> I don't see any practical use for this knowledge, but I'm more   
   >> curious than anything.   
   >   
   > FreeDOS HIMEMX 3.32 had a bug where it wouldn't work on some old   
   > 386 laptops that two people still sometimes used (at the time).   
   > IIRC, the unofficial fix (3.33, albeit without official maintainer)   
   > was to add "jmp $+2". But it wasn't needed in newer cpus, apparently.   
   >   
   > Is that what you meant?   
      
   Possibly.  My kernel was initially written in the mid-90s, and I would   
   have had books and resources from the late 80s I drew from to design it.   
      
   It's very likely I assembled code samples from those various sources   
   and added bits here and there until I got it to work, as creating my   
   kernel was a trial-and-error format making baby steps as I went.  I   
   would get to a certain point and put a particular character in the   
   upper-left of the screen to know it made it there.  Later I created   
   my real-mode debugger and could single-step through even the initial   
   boot sector code, which was awesome.   
      
   Until then I did a lot of this:   
      
        mov     ax,0b800h   
        mov     es,ax   
        mov     word ptr es:[di],0072eh   ; Display a dot   
      @@:   
        hlt   
        jmp     @B   
      
   That kind of thing. :-)   
      
   --   
   Rick C. Hodgin   
      
   --- 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