📄 op.pas
字号:
SetCmdArg(hnST);
SetCmdArg(ntFPReg[R]);
end
else if (NextB and $F8)=$E0 then begin
Y := NextB and $7;
SetOpName(ntfEsc3s1[Y]);
end
else if (NextB and $F8)=$E8 then begin
R := NextB and $7;
SetOpName(hnFUCOMI);
SetCmdArg(hnST);
SetCmdArg(ntFPReg[R]);
end
else if (NextB and $F8)=$F0 then begin
R := NextB and $7;
SetOpName(hnFCOMI);
SetCmdArg(hnST);
SetCmdArg(ntFPReg[R]);
end
else
Exit;
$4: begin
SetPrefix(hnF);
SetOpName(ntfops[M]);
SetCmdArg(ntFPReg[R]);
if not PutSt(M) then Exit;
end;
$5: begin
SetOpName(ntfEsc5s1[M]);
SetCmdArg(ntFPReg[R]);
end;
$6: begin
SetPrefix(hnF);
SetOpName(ntfopEsc6s[M]);
SetSuffix(hnP);
SetCmdArg(ntFPReg[R]);
if not PutSt(M) then Exit;
end;
$7: case NextB and $F8 of
$E0: begin
Y := NextB and $7;
SetOpName(hnFSTSW);
SetCmdArg(ntReg16[R]);
end;
$E8: begin
R := NextB and $7;
SetOpName(hnFUCOMIP);
SetCmdArg(hnST);
SetCmdArg(ntFPReg[R]);
end;
$F0: begin
R := NextB and $7;
SetOpName(hnFCOMIP);
SetCmdArg(hnST);
SetCmdArg(ntFPReg[R]);
end;
else Exit;
end;
else Exit;
end;
end;
else begin
if not UnReadByte then Exit;
if not getEA(1,M,A) then Exit;
setEASize(0);
SetCmdArg(A);
case C and $1 of
$0: begin
Y := (C and $4)shr 2;
T := (C and $2)shr 1;
SetPrefix(ntFPType[T]);
if not SizeEven(C) then Exit;
SetOpName(ntfops[M]);
end;
else case M and $4 of
$0: begin
N := M and $3;
begin
Y := C and $1 + (C and $4)shr 1;
T := (C and $2)shr 1;
end;
SetPrefix(ntFPType[T]);
if not SizeEven(C) then Exit;
SetOpName(ntflsops[M]);
end;
$4: begin
N := M and $3;
begin
Y := (C and $6)shr 1;
T := C and $1;
end;
case Y and $F of
$0: SetOpName(ntfEsc1s[N]);
$1: begin
SetOpName(ntfEsc3s[N]);
setEASize(5);
end;
$2: SetOpName(ntfEsc5s[N]);
$3: begin
SetOpName(ntfEsc7s[N]);
case N and $1 of
$0: begin
Y := (N and $2)shr 1;
setEASize(4);
end;
else setEASize(5);
end;
end;
else Exit;
end;
end;
else Exit;
end;
end;
end;
end;
Result := true;
end ;
function readFPEmul(B: integer): boolean;
var
B1,C,S,X: integer;
var
_1: integer;
begin
Result := false;
B1 := B-52;
if (B1 and $F8)=$0 then begin
C := B1 and $7;
if not readFP(B1) then Exit;
end
else if (B1 and $FF)=$8 then begin
if not ReadByte(C) then Exit;
case C and $38 of
$18: begin
S := (C and $C0)shr 6;
X := C and $7;
setSeg(not(S));
if not ReadByte(_1) then Exit;
if not readFP(_1) then Exit;
end;
else Exit;
end;
end
else if (B1 and $FF)=$9 then SetOpName(hnFWAIT)
else
Exit;
Result := true;
end ;
function readOP: boolean;
var
B1,A,D,W,S,R,C,F,B2,N,L,H: integer;
var
_1, _2: integer;
const
_C0: array[0..$FF] of integer = (
{0x00} 0, 0, 0, 0, 1, 1, 3, 4, 0, 0, 0, 0, 1, 1, 3, 2,
{0x10} 0, 0, 0, 0, 1, 1, 3, 4, 0, 0, 0, 0, 1, 1, 3, 4,
{0x20} 0, 0, 0, 0, 1, 1, 5, 6, 0, 0, 0, 0, 1, 1, 5, 6,
{0x30} 0, 0, 0, 0, 1, 1, 5, 6, 0, 0, 0, 0, 1, 1, 5, 6,
{0x40} 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
{0x50} 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
{0x60} 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 16, 17, 18, 19, 20, 21,
{0x70} 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
{0x80} 23, 23, 23, 23, 24, 24, 25, 25, 26, 26, 26, 26, 27, 28, 27, 29,
{0x90} 30, 31, 31, 31, 31, 31, 31, 31, 32, 33, 34, 35, 36, 37, 38, 39,
{0xA0} 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 43, 43, 43, 43, 43, 43,
{0xB0} 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
{0xC0} 45, 45, 46, 47, 48, 49, 50, 50, 51, 52, 46, 47, 53, 54, 55, 56,
{0xD0} 57, 57, 58, 58, 59, 60, 85, 61, 62, 62, 62, 62, 62, 62, 62, 62,
{0xE0} 63, 63, 63, 63, 64, 64, 65, 65, 66, 67, 68, 69, 70, 70, 71, 71,
{0xF0} 72, 85, 73, 74, 75, 76, 77, 77, 78, 79, 80, 81, 82, 83, 84, 84
);
begin
Result := false;
if not ReadByte(B1) then Exit;
case _C0[B1 and $FF] of
0: begin
A := (B1 and $38)shr 3;
D := (B1 and $2)shr 1;
W := B1 and $1;
SetOpName(ntArOp[A]);
if not readRM(D,W) then Exit;
end;
1: begin
A := (B1 and $38)shr 3;
W := B1 and $1;
SetOpName(ntArOp[A]);
if not Reg(W,0,_1) then Exit;
SetCmdArg(_1);
if not imW(W) then Exit;
end;
2: if not ReadPM then Exit;
3: begin
S := (B1 and $18)shr 3;
SetOpName(hnPUSH);
SetCmdArg(ntSReg[S]);
end;
4: begin
S := (B1 and $18)shr 3;
SetOpName(hnPOP);
SetCmdArg(ntSReg[S]);
end;
5: begin
S := (B1 and $18)shr 3;
setSeg(S);
if not readOP then Exit;
end;
6: begin
S := (B1 and $18)shr 3;
SetOpName(ntDecArOp[S]);
end;
7: begin
A := (B1 and $18)shr 3;
R := B1 and $7;
SetOpName(ntIDPPS[A]);
if not RegW(R,_1) then Exit;
SetCmdArg(_1);
end;
8: SetOpName(hnPUSHA);
9: SetOpName(hnPOPA);
10: begin
SetOpName(hnBOUND);
if not readRMD(1) then Exit;
end;
11: SetOpName(hnARPL);
12: begin
setSeg(4);
if not readOP then Exit;
end;
13: begin
setSeg(5);
if not readOP then Exit;
end;
14: begin
setOS;
if not readOP then Exit;
end;
15: begin
setAS;
if not readOP then Exit;
end;
16: begin
W := (B1 and $2)shr 1;
SetOpName(hnPUSH);
if not imW(not(W)) then Exit;
end;
17: begin
W := (B1 and $2)shr 1;
SetOpName(hnIMUL);
if not ReadMIm(not(W)) then Exit;
end;
18: SetOpName(hnINSB);
19: SetOpName(hnINSW);
20: SetOpName(hnOUTSB);
21: SetOpName(hnOUTSW);
22: begin
D := B1 and $F;
SetOpName(hnJ_);
SetCmdArg(ntJmpCond[D]);
if not jmpOfs(0) then Exit;
end;
23: begin
S := (B1 and $2)shr 1;
W := B1 and $1;
if not readEA(W,_1) then Exit;
SetOpName(ntArOp[_1]);
if not imSignExt(S,W) then Exit;
end;
24: begin
W := B1 and $1;
SetOpName(hnTEST);
if not readRMR(W) then Exit;
end;
25: begin
W := B1 and $1;
SetOpName(hnXCHG);
if not readRMD(W) then Exit;
end;
26: begin
D := (B1 and $2)shr 1;
W := B1 and $1;
SetOpName(hnMOV);
if not readRM(D,W) then Exit;
end;
27: begin
D := (B1 and $2)shr 1;
SetOpName(hnMOV);
if not readSRM(D) then Exit;
end;
28: begin
SetOpName(hnLEA);
if not readRMD(1) then Exit;
end;
29: begin
SetOpName(hnPOP);
if not readEA(1,C) then Exit;
end;
30: SetOpName(hnNOP);
31: begin
R := B1 and $7;
SetOpName(hnXCHG);
if not RegW(0,_1) then Exit;
SetCmdArg(_1);
if not RegW(R,_1) then Exit;
SetCmdArg(_1);
end;
32: SetOpName(hnCBW);
33: SetOpName(hnCWD);
34: begin
SetOpName(hnCALL);
if not imPtr then Exit;
end;
35: SetOpName(hnWAIT);
36: SetOpName(hnPUSHF);
37: SetOpName(hnPOPF);
38: SetOpName(hnSAHF);
39: SetOpName(hnLAHF);
40: begin
D := (B1 and $2)shr 1;
W := B1 and $1;
SetOpName(hnMOV);
if not Reg(W,0,_1) then Exit;
if not getImmOfsEA(W,_2) then Exit;
if not xchgArg(D,_1,_2) then Exit;
end;
41: begin
A := B1 and $3;
SetOpName(ntStrOp1[A]);
if not CurSeg then Exit;
end;
42: begin
W := B1 and $1;
SetOpName(hnTEST);
if not Reg(W,0,_1) then Exit;
SetCmdArg(_1);
if not imW(W) then Exit;
end;
43: begin
A := B1 and $7;
SetOpName(ntStrOp2[A]);
if not CurSeg then Exit;
end;
44: begin
W := (B1 and $8)shr 3;
R := B1 and $7;
SetOpName(hnMOV);
if not Reg(W,R,_1) then Exit;
SetCmdArg(_1);
if not imW(W) then Exit;
end;
45: begin
W := B1 and $1;
if not readEA(W,_1) then Exit;
SetOpName(ntShftOp[_1]);
if not ImmedBW(0) then Exit;
end;
46: begin
F := (B1 and $8)shr 3;
SetOpName(hnRET);
SetCmdArg(ntcallDist[F]);
if not imInt(1) then Exit;
end;
47: begin
F := (B1 and $8)shr 3;
SetOpName(hnRET);
SetCmdArg(ntcallDist[F]);
end;
48: begin
SetOpName(hnLES);
if not ReadRMWD(2) then Exit;
end;
49: begin
SetOpName(hnLDS);
if not ReadRMWD(2) then Exit;
end;
50: begin
W := B1 and $1;
SetOpName(hnMOV);
if not ReadMIm(W) then Exit;
end;
51: begin
SetOpName(hnENTER);
if not imInt(1) then Exit;
if not imInt(0) then Exit;
end;
52: SetOpName(hnLEAVE);
53: begin
SetOpName(hnINT);
SetCmdArg(3);
end;
54: begin
if not ReadByte(B2) then Exit;
if {***}not(readFPEmul(B2)) then begin
SetOpName(hnINT);
SetCmdArg(B2);
end;
end;
55: SetOpName(hnINTO);
56: SetOpName(hnIRET);
57: begin
W := B1 and $1;
if not readEA(W,_1) then Exit;
SetOpName(ntShftOp[_1]);
SetCmdArg(1);
end;
58: begin
W := B1 and $1;
if not readEA(W,_1) then Exit;
SetOpName(ntShftOp[_1]);
SetCmdArg(hnCL);
end;
59: SetOpName(hnAAM);
60: SetOpName(hnAAD);
61: SetOpName(hnXLAT);
62: begin
N := B1 and $7;
if {***}not(readFP(N)) then begin
SetOpName(hnESC);
SetCmdArg(N);
end;
end;
63: begin
L := B1 and $3;
SetOpName(ntLoopS[L]);
if not jmpOfs(0) then Exit;
end;
64: begin
W := B1 and $1;
SetOpName(hnIN);
if not Reg(W,0,_1) then Exit;
SetCmdArg(_1);
if not ImmedBW(0) then Exit;
end;
65: begin
W := B1 and $1;
SetOpName(hnOUT);
if not ImmedBW(0) then Exit;
if not Reg(W,0,_1) then Exit;
SetCmdArg(_1);
end;
66: begin
SetOpName(hnCALL);
if not JmpOfsW then Exit;
end;
67: begin
SetOpName(hnJMP);
if not JmpOfsW then Exit;
end;
68: begin
SetOpName(hnJMP);
if not imPtr then Exit;
end;
69: begin
SetOpName(hnJMP);
if not jmpOfs(0) then Exit;
end;
70: begin
W := B1 and $1;
SetOpName(hnIN);
if not Reg(W,0,_1) then Exit;
SetCmdArg(_1);
SetCmdArg(hnDX);
end;
71: begin
W := B1 and $1;
SetOpName(hnOUT);
SetCmdArg(hnDX);
if not Reg(W,0,_1) then Exit;
SetCmdArg(_1);
end;
72: begin
SetOpPrefix(hnLOCK);
if not readOP then Exit;
end;
73: begin
SetOpPrefix(hnREPNE);
if not readOP then Exit;
end;
74: begin
SetOpPrefix(hnREPE);
if not readOP then Exit;
end;
75: SetOpName(hnHALT);
76: SetOpName(hnCMC);
77: begin
W := B1 and $1;
if not readEA(W,C) then Exit;
SetOpName(ntGr1Op[C]);
case C and $F of
$0: if not imW(W) then Exit;
else ;
end;
end;
78: SetOpName(hnCLC);
79: SetOpName(hnSTC);
80: SetOpName(hnCLI);
81: SetOpName(hnSTI);
82: SetOpName(hnCLD);
83: SetOpName(hnSTD);
84: begin
W := B1 and $1;
if not readEA(W,C) then Exit;
begin
H := (C and $6)shr 1;
L := C and $1;
end;
case H and $3 of
$0: SetOpName(ntGr3Op[L]);
$3: case W and $1 of
$0: SetOpName(hnQ);
else case L and $1 of
$0: SetOpName(hnPUSH);
else SetOpName(hnQ);
end;
end;
else case W and $1 of
$0: SetOpName(hnQ);
else begin
SetOpName(ntGr2Op[H]);
SetCmdArg(ntcallDist[L]);
end;
end;
end;
end;
else SetOpName(hnQ);
end;
Result := true;
end ;
begin
SegRegTbl := @ntSReg;
RegTbl[0] := @ntRegB;
RegTbl[1] := @ntReg16;
RegTbl[2] := @ntReg32;
end .
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -