From: Kasper Dupont <kasperd@daimi.au.dk>
To: stas.orel@mailcity.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] vm86: Clear AC on INT
Date: Thu, 01 Aug 2002 14:19:08 +0200 [thread overview]
Message-ID: <3D49273C.B11C237D@daimi.au.dk> (raw)
In-Reply-To: 3D4419F5.3000104@yahoo.com
[-- Attachment #1: Type: text/plain, Size: 711 bytes --]
Stas Sergeev wrote:
>
> Hello.
>
> According to this:
> http://support.intel.com/design/intarch/techinfo/Pentium/instrefi.htm#89126
> AC flag is cleared by an INT
> instruction executed in real mode.
> The attached patch implements that
> functionality and solves some
> problems recently discussed in
> dosemu mailing list.
Finally I found the old test program I originally used to discover
the missing clear_IF bug. With small modifications it should be
able to verify the existence of this AC bug and that it has been
corrected. I'm going to try this asap.
--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:razrep@daimi.au.dk
or mailto:mcxumhvenwblvtl@skrammel.yaboo.dk
[-- Attachment #2: traptest.pas --]
[-- Type: text/plain, Size: 2558 bytes --]
Uses Dos;
Const Code: Array[0..79] Of Byte = (
$89,$e5,$50,$53,$06,$51,$fb,$f4,$cf,$90,$90,$90,$90,$90,$90,$90,
$fb,$f4,$89,$ec,$cf,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,
$0e,$e8,$02,$00,$89,$ec,$cf,$90,$90,$90,$90,$90,$90,$90,$90,$90,
$cd,$01,$cd,$03,$cd,$08,$cc,$9d,$89,$ec,$cf,$90,$90,$90,$90,$90,
$9c,$fa,$89,$ec,$cf,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90,$90
);
Const FV: Array[0..3] Of Word = ($7002,$7102,$7202,$7302);
Var Buffer: Array[0..40000] Of Char;
Var Index: Word;
Var I: Word;
Procedure BufWrite(S: String);
Var I: Byte;
Begin
For I:=1 To Length(S) Do Begin
Buffer[Index]:=S[I];
Inc(Index);
End;
End;
Procedure Hex(w : Word);
Const
HexKarakterer : Array [0..$F] Of Char =
'0123456789ABCDEF';
Begin
BufWrite(HexKarakterer[Hi(w) Shr 4]+
HexKarakterer[Hi(w) And $F]+
HexKarakterer[Lo(w) Shr 4]+
HexKarakterer[Lo(w) And $F]+
' ');
End;
Procedure MyInt1(Flags, CS, IP, AX, BX, CX, DX, SI, DI, DS, ES, BP: word);
Interrupt;
Begin
Hex(IP);
Hex(MemW[CS:IP]);
Hex(SPtr);
Hex(Flags);
BufWrite('Trace'#13#10);
End;
Procedure MyInt3(Flags, CS, IP, AX, BX, CX, DX, SI, DI, DS, ES, BP: word);
Interrupt;
Begin
Hex(IP);
Hex(MemW[CS:IP]);
Hex(SPtr);
Hex(Flags);
BufWrite('Break'#13#10);
End;
Procedure MyInt8(Flags, CS, IP, AX, BX, CX, DX, SI, DI, DS, ES, BP: word);
Interrupt;
Begin
Port[$20]:=$20;
Hex(IP);
Hex(MemW[CS:IP]);
Hex(SPtr);
Hex(Flags);
BufWrite('Timer'#13#10);
End;
Var S01,S03,S08,S18: Pointer;
Var X,Y,Z: Byte;
Var Regs: Registers;
Var T: Byte;
Begin
WriteLn('Waiting');
Index := 0;
T:=Mem[$40:$6C];
Repeat
InLine($F4);
Until Byte(Mem[$40:$6C]-T) > 42;
WriteLn('Runing tests');
GetIntVec($01,S01);
GetIntVec($03,S03);
GetIntVec($08,S08);
GetIntVec($18,S18);
SetIntVec($01,@MyInt1);
SetIntVec($03,@MyInt3);
SetIntVec($08,@MyInt8);
SetIntVec($18,@Code);
For X:=0 To 3 Do
For Y := 0 To 3 Do
For Z := 1 To 4 Do
Begin
BufWrite('Test'#13#10);
Regs.AX:=FV[X];
Regs.BX:=FV[Y];
Regs.CX:=Ofs(Code[Z*16]);
Regs.ES:=Seg(Code);
Regs.Flags:=$7202;
Intr($18,Regs);
End;
SetIntVec($01,S01);
SetIntVec($03,S03);
SetIntVec($08,S08);
SetIntVec($18,S18);
WriteLn('Printing results');
For I:=0 To Index-1 Do
Write(Buffer[I]);
WriteLn('All done.');
End.
\x1a
next prev parent reply other threads:[~2002-08-01 12:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-28 16:21 [patch] vm86: Clear AC on INT Stas Sergeev
2002-08-01 12:19 ` Kasper Dupont [this message]
2002-08-01 13:43 ` Kasper Dupont
2002-08-01 15:15 ` Richard B. Johnson
2002-08-01 15:49 ` Kasper Dupont
2002-08-01 16:52 ` Alan Cox
2002-08-01 15:55 ` Kasper Dupont
2002-08-01 17:28 ` Alan Cox
2002-08-01 16:21 ` Kasper Dupont
2002-08-01 16:40 ` Maciej W. Rozycki
2002-08-01 17:04 ` Kasper Dupont
2002-08-01 17:38 ` Richard B. Johnson
2002-08-01 17:48 ` Kasper Dupont
2002-08-01 17:47 ` Alan Cox
2002-08-01 16:33 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D49273C.B11C237D@daimi.au.dk \
--to=kasperd@daimi.au.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=stas.orel@mailcity.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox