Add interrupts module: INT 3 (CC breakpoint) vs INT 21h (DOS services)
NASM sources, DOSBox/FreeDOS Debug/Unicorn harness, captured output and 31 assertions backing the ankurm.com article "INT 3 vs INT 21h in 8086 Assembly". Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KqJyCidz3ZgRyHABv2GVJh
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
; hello21.asm -- the smallest useful INT 21h program: AH=09h then AH=4Ch with a return code
|
||||
bits 16
|
||||
org 0x100 ; .COM program
|
||||
mov ah, 09h ; AH selects the DOS function: write '$'-terminated string
|
||||
mov dx, msg ; DS:DX -> string (DS = CS in a .COM file)
|
||||
int 21h ; CD 21 -- the DOS entry point
|
||||
mov ax, 4C07h ; AH=4Ch terminate, AL=7 return code (ERRORLEVEL)
|
||||
int 21h
|
||||
msg db 'Hello from INT 21h, AH=09h', 0Dh, 0Ah, '$'
|
||||
Reference in New Issue
Block a user