> Since low-level changes were made to this version of EMM386, please keep an
> eye out for any problems and report them as soon as you can. While I don't
The IF bug fix may have disclosed some previously hidden bugs which are due to
a careless handling of flags. The following is an excerpt from EMM386.ASM,
which is an interrupt 13h handler:
NEW13 PROC FAR
BTS CS:[Flags],INT13Activ ; The beginning.
BTR CS:[Flags],NeedBuffer ; Rather disable always.
PUSH ECX
MOV ECX,8 ; The Statusbits partly
@@Loop: MOV CS:[ChanFlags+ECX*2-2],1100B ; = ModePrgrd+PagePrgrd
LOOP @@Loop ; initialise
POP ECX
PUSHF ; Now call the old INT
CALL DWORD PTR CS:[OLD13] ; If an error occurs,
PUSHF ; ... there is nothing !
JC @@Bye
BTR CS:[Flags],NeedBuffer ; Is it necessary to copy
JNC @@Bye ; back the buffer?
HLT13: HLT ; Hello, 32-Bit World !
@@Bye: BTR CS:[Flags],INT13Activ ; Bye bye (Flags
POPF ; the BTR CY-flag erased !)
RETF 2 ; delete flags on stack
NEW13 ENDP
The "RETF 2" at the end not only causes the TF to be lost, but also IF to be
cleared now.
There is similiar code for Int 40h.
I had to test this with Win98 debug. The FD debug, although more powerful
regarding 386 opcodes and registers, is either unable to display the correct
state of IF or even worse, it clears this flag permanently.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel