53 INT ProcedureCallCount = 0;
59 Trap =
State->Flags.Tf;
65 if (
State->PrefixFlags == 0)
68 State->SavedStackPtr =
State->GeneralRegs[FAST486_REG_ESP];
75 State->PrefixFlags = 0;
86 if (CurrentHandler == Fast486OpcodePrefix)
goto NextInst;
89 State->PrefixFlags = 0;
96 if (
State->DoNotInterrupt)
101 else if (Trap && !
State->Halted)
106 else if (
State->Flags.If &&
State->IntSignaled)
129 DbgPrint(
"\nFast486DumpState -->\n");
130 DbgPrint(
"\nCPU currently executing in %s mode at %04X:%08X\n",
132 State->SegmentRegs[FAST486_REG_CS].Selector,
133 State->InstPtr.Long);
134 DbgPrint(
"\nGeneral purpose registers:\n"
135 "EAX = %08X\tECX = %08X\tEDX = %08X\tEBX = %08X\n"
136 "ESP = %08X\tEBP = %08X\tESI = %08X\tEDI = %08X\n",
137 State->GeneralRegs[FAST486_REG_EAX].Long,
138 State->GeneralRegs[FAST486_REG_ECX].Long,
139 State->GeneralRegs[FAST486_REG_EDX].Long,
140 State->GeneralRegs[FAST486_REG_EBX].Long,
141 State->GeneralRegs[FAST486_REG_ESP].Long,
142 State->GeneralRegs[FAST486_REG_EBP].Long,
143 State->GeneralRegs[FAST486_REG_ESI].Long,
144 State->GeneralRegs[FAST486_REG_EDI].Long);
146 "ES = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n"
147 "CS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n"
148 "SS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n"
149 "DS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n"
150 "FS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n"
151 "GS = %04X (Base: %08X, Limit: %08X, Dpl: %u)\n",
152 State->SegmentRegs[FAST486_REG_ES].Selector,
153 State->SegmentRegs[FAST486_REG_ES].Base,
154 State->SegmentRegs[FAST486_REG_ES].Limit,
155 State->SegmentRegs[FAST486_REG_ES].Dpl,
156 State->SegmentRegs[FAST486_REG_CS].Selector,
157 State->SegmentRegs[FAST486_REG_CS].Base,
158 State->SegmentRegs[FAST486_REG_CS].Limit,
159 State->SegmentRegs[FAST486_REG_CS].Dpl,
160 State->SegmentRegs[FAST486_REG_SS].Selector,
161 State->SegmentRegs[FAST486_REG_SS].Base,
162 State->SegmentRegs[FAST486_REG_SS].Limit,
163 State->SegmentRegs[FAST486_REG_SS].Dpl,
164 State->SegmentRegs[FAST486_REG_DS].Selector,
165 State->SegmentRegs[FAST486_REG_DS].Base,
166 State->SegmentRegs[FAST486_REG_DS].Limit,
167 State->SegmentRegs[FAST486_REG_DS].Dpl,
168 State->SegmentRegs[FAST486_REG_FS].Selector,
169 State->SegmentRegs[FAST486_REG_FS].Base,
170 State->SegmentRegs[FAST486_REG_FS].Limit,
171 State->SegmentRegs[FAST486_REG_FS].Dpl,
172 State->SegmentRegs[FAST486_REG_GS].Selector,
173 State->SegmentRegs[FAST486_REG_GS].Base,
174 State->SegmentRegs[FAST486_REG_GS].Limit,
175 State->SegmentRegs[FAST486_REG_GS].Dpl);
176 DbgPrint(
"\nFlags: %08X (%s %s %s %s %s %s %s %s %s %s %s %s %s) Iopl: %u\n",
178 State->Flags.Cf ?
"CF" :
"cf",
179 State->Flags.Pf ?
"PF" :
"pf",
180 State->Flags.Af ?
"AF" :
"af",
181 State->Flags.Zf ?
"ZF" :
"zf",
182 State->Flags.Sf ?
"SF" :
"sf",
183 State->Flags.Tf ?
"TF" :
"tf",
184 State->Flags.If ?
"IF" :
"if",
185 State->Flags.Df ?
"DF" :
"df",
186 State->Flags.Of ?
"OF" :
"of",
187 State->Flags.Nt ?
"NT" :
"nt",
188 State->Flags.Rf ?
"RF" :
"rf",
189 State->Flags.Vm ?
"VM" :
"vm",
190 State->Flags.Ac ?
"AC" :
"ac",
193 "CR0 = %08X\tCR2 = %08X\tCR3 = %08X\n",
194 State->ControlRegisters[FAST486_REG_CR0],
195 State->ControlRegisters[FAST486_REG_CR2],
196 State->ControlRegisters[FAST486_REG_CR3]);
198 "DR0 = %08X\tDR1 = %08X\tDR2 = %08X\n"
199 "DR3 = %08X\tDR4 = %08X\tDR5 = %08X\n",
200 State->DebugRegisters[FAST486_REG_DR0],
201 State->DebugRegisters[FAST486_REG_DR1],
202 State->DebugRegisters[FAST486_REG_DR2],
203 State->DebugRegisters[FAST486_REG_DR3],
204 State->DebugRegisters[FAST486_REG_DR4],
205 State->DebugRegisters[FAST486_REG_DR5]);
207#ifndef FAST486_NO_FPU
209 "ST0 = %04X%016llX\tST1 = %04X%016llX\n"
210 "ST2 = %04X%016llX\tST3 = %04X%016llX\n"
211 "ST4 = %04X%016llX\tST5 = %04X%016llX\n"
212 "ST6 = %04X%016llX\tST7 = %04X%016llX\n"
213 "Status: %04X\tControl: %04X\tTag: %04X\n",
235 DbgPrint(
"\n<-- Fast486DumpState\n\n");
_In_ PVOID _In_ ULONG Opcode
FAST486_OPCODE_HANDLER_PROC Fast486OpcodeHandlers[FAST486_NUM_OPCODE_HANDLERS]
VOID(FASTCALL * FAST486_OPCODE_HANDLER_PROC)(PFAST486_STATE, UCHAR)
BOOLEAN FASTCALL Fast486PerformInterrupt(PFAST486_STATE State, UCHAR Number)
VOID NTAPI Fast486StepOut(PFAST486_STATE State)
VOID NTAPI Fast486DumpState(PFAST486_STATE State)
VOID NTAPI Fast486StepInto(PFAST486_STATE State)
FORCEINLINE VOID FASTCALL Fast486ExecutionControl(PFAST486_STATE State, FAST486_EXEC_CMD Command)
VOID NTAPI Fast486Continue(PFAST486_STATE State)
VOID NTAPI Fast486StepOver(PFAST486_STATE State)