Microsoft KB Archive/12401

= PRB: Single Stepping IN to 8259A Controller Gives Wrong Result =

Article ID: 12401

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft CodeView 4.1
 * Microsoft CodeView 3.0
 * Microsoft CodeView 3.0
 * Microsoft CodeView 3.0
 * Microsoft CodeView 4.0
 * Microsoft CodeView 4.01
 * Microsoft CodeView 4.01
 * Microsoft CodeView 4.1
 * Microsoft CodeView 3.0
 * Microsoft CodeView 3.05
 * Microsoft CodeView 3.06
 * Microsoft CodeView 3.07
 * Microsoft CodeView 4.0
 * Microsoft CodeView 4.01
 * Microsoft CodeView 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:


 * 1) 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-


 * 1) 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 KB12401

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.