At 03:21 PM 8/16/2006 +0200, tom ehlert wrote:
>'solved' the original bug (sort of) by changing
>
>disable_enable_a20_BIOS:
>         ;pushf
>         ;cli
>
>         shr     ah,1    ; ah to 0 or 1
>         mov     al,24h
>         xchg    ah,al   ; ax == 2400h to turn off, 2401h to turn on
>         int     15h
>
>         ;popf
>         pop     ax
>         ret
>
>innocent change (it should behave EXACTLY the same), but now it works
>after a while of headscratching,
>
>disable_enable_a20_BIOS:
>         pushf
>         sub sp,10
>         cli
>
>         shr     ah,1    ; ah to 0 or 1
>         mov     al,24h
>         xchg    ah,al   ; ax == 2400h to turn off, 2401h to turn on
>         int     15h
>
>         add sp,10
>         popf
>         pop     ax
>     ret
>
>
>works, too.
>
>Only plausible explanation:
>THIS BIOS damages (sometimes ?) the flags; and disabling
>interrupts can have had serious consequences
>
>so preferring method fast over BIOS gives bios programmers less
>chances to produce bugs

I love buggy BIOS situations.  They make life so interesting.

>just one thing:
>
>I noticed that (on this particular maschine),
>enable_a20/disbale_a20 using method BIOS is extremely slow

So, is the best answer to make your source changes for general distribution 
and keep BIOS moved close to the back of the line?  It's hard to decide the 
best path for widescale distribution and we need to decide ASAP.

I like your second version patch because it doesn't affect interrupt flags, 
although it's pretty weird that giving the interrupt a stack frame fixes 
the issue.  Perhaps there's an unseen side-effect from somewhere 
else?  Though I don't exactly see how that could work, unless it's chewing 
into problematic stack values.

If BIOS control is demonstrated as buggy and slow as well, I definitely 
think that keeping it out of the first choice is the way to go.  And making 
the (normally benign) stack frame code addition too.  Gets my vote.  Any 
other ideas or thoughts, anyone?


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to