🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #453

Re: Int 3

#453
From: Jerry Gardner
Date: Thu, 18 Jan 1990 23:47
29 lines
1902 bytes
In article <90017.100521CMH117@PSUVM.BITNET> CMH117@PSUVM.BITNET (Charles Hannum) writes:
>
>Ah, how I long for easy questions like this!
>
>Int 3 is the "debugging" or "single step" interrupt.  Debuggers (including the
>infamous DOS DEBUG program) insert Int 3's at "breakpoints".  A breakpoint
>refers to either the end of the next instruction (as with single-stepping) or
>a user-defined breakpoint, as with the G(oto) command in DEBUG.  When the CPU
>executes the Int 3, the debugger regains control.


Unfortunately, it looks like easy questions like this one trip you up :-)

Int 3 is not the "single step" interrupt.  Single stepping is accomplished
by setting the TF (trap flag) bit in the flags register.  When the CPU
executes an instruction when this bit is set, it takes Int 1, not Int 3. The
CPU handles the exception by pushing cs:ip and the flags on the stack and
turning off the trap flag bit in the current flags (so the single step 
exception handler doesn't generate single step exceptions).

Int 3 is the break point exception, a single-byte opcode that vectors the
CPU though int 3 when it executes it.


-- 
Jerry Gardner, NJ6A					Altos Computer Systems
UUCP: {sun|pyramid|sco|amdahl|uunet}!altos86!jerry	2641 Orchard Parkway
Internet: jerry@altos.com				San Jose, CA  95134
I don't speak for Altos, they don't speak for me.       946-6700
Technical Details
Message-ID: <177@altos86.Altos.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!think!snorkelwacker!apple!oliveb!amdahl!altos!altos86!jerry
References: <10442.740.forumexp@mts.rpi.edu> <90017.100521CMH117@PSUVM.BITNET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!think!snorkelwacker!apple!oliveb!amdahl!altos!altos86!jerry
From: jerry@altos86.Altos.COM (Jerry Gardner)
Newsgroups: alt.msdos.programmer
Subject: Re: Int 3
Message-ID: <177@altos86.Altos.COM>
Date: 18 Jan 90 23:47:19 GMT
References: <10442.740.forumexp@mts.rpi.edu> <90017.100521CMH117@PSUVM.BITNET>
Reply-To: jerry@altos86.UUCP (Jerry Gardner)
Organization: Altos Computer Systems, San Jose, CA
Lines: 29