PRB: Single Stepping IN to 8259A Controller Gives Wrong Result (12401)
The information in this article applies to:
- Microsoft CodeView for MS-DOS 2.2
- Microsoft CodeView for MS-DOS 3.0
- Microsoft CodeView for MS-DOS 3.11
- Microsoft CodeView for MS-DOS 3.14
- Microsoft CodeView for MS-DOS 4.0
- Microsoft CodeView for MS-DOS 4.01
- Microsoft CodeView for MS-DOS 4.05
- Microsoft CodeView for MS-DOS 4.1
- Microsoft CodeView for Windows 3.0
- Microsoft CodeView for Windows 3.05
- Microsoft CodeView for Windows 3.06
- Microsoft CodeView for Windows 3.07
- Microsoft CodeView for Windows 4.0
- Microsoft CodeView for Windows 4.01
- Microsoft CodeView for Windows 4.1
This article was previously published under Q12401 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.
Modification Type: | Major | Last Reviewed: | 10/23/2003 |
---|
Keywords: | kb16bitonly KB12401 |
---|
|