PRB: Single Stepping IN to 8259A Controller Gives Wrong Result
ID: Q12401
|
The information in this article applies to:
-
Microsoft CodeView for MS-DOS, versions 2.2, 3.0, 3.11, 3.14, 4.0, 4.01, 4.05, 4.1
-
Microsoft CodeView for Windows, versions 3.0, 3.05, 3.06, 3.07, 4.0, 4.01, 4.1
SYMPTOMS
CodeView disables all interrupts at the interrupt controller when
single-stepping an instruction. If you single-step an IN instruction
that accesses an 8259A interrupt controller, the value returned will
be 0xFF and not the true value you would expect.
CAUSE
This is a restriction imposed by the 8086 chip, which forces CodeView
to disable interrupts when single-stepping.
RESOLUTION
The following are two of the simplest ways to work around this restriction:
- Issue G IP+1 or G IP+2, depending on whether the instruction is a
one- or two-byte IN instruction. This does not single-step the
instruction; it sets a temporary breakpoint at the next instruction
and executes up to the breakpoint, thus appearing as if you just
single-stepped.
-or-
- If you accidentally single-step the IN instruction, you can get the
real value of the interrupt controller by issuing I 0x21. This
returns the value of the port directly, so you can change the value
in the AX register by issuing RAX=value and continue single-
stepping.
Additional query words:
2.20 3.00 4.00 4.10
Keywords : kb16bitonly
Version : :2.2,3.0,3.05,3.06,3.07,3.11,3.14,4.0,4.01,4.05,4.1
Platform :
Issue type :
|