Who knows the use of TF(Trap Flag) ?
Posted: Thu Jun 12, 2008 4:38 am
There is TF(bit 8 ) in 80X86 CPU.
I can't understand its use.
I think it maybe has relations with Int 01h.
But nothing happened.
I can't understand its use.
I think it maybe has relations with Int 01h.
Interrupt Jump Table wrote: Int 01 - CPU-generated - SINGLE STEP
Int 01 - CPU-generated (80386+) - DEBUGGING EXCEPTIONS
I wrote some code to set TF.Volume 3A_ System Programming Guide wrote: TF Trap (bit 8 ) : Set to enable single-step mode for debugging; clear to
disable single-step mode. In single-step mode, the processor generates a
debug exception after each instruction. This allows the execution state of a
program to be inspected after each instruction. If an application program
sets the TF flag using a POPF, POPFD, or IRET instruction, a debug exception
is generated after the instruction that follows the POPF, POPFD, or IRET.
Code: Select all
pushf
pop ax
or ax, 0100h
push ax
popf