weevilofdoom
Programmer
I've written an ISR type program that is supposed to detect when the escape key is pressed, and output a message, it uses chaining to go to the original ISR if escape is not pressed. When I type, it outputs normally to the screen, but when I hit escape, it outputs that stupid little arrow character instead of my message. I've debugged, and it doesn't seem that my ISR is a TSR, or something, because it doesn't detect the escape press from my .com file which I loaded.
Here's a bit of code:
.model tiny
.286
.code
org 100h
start:
jmp setup
int9_handler proc far
sti
pushf
push es
push ax
push di
L1:
mov ax, 40h
mov es, ax
mov di, 17h
mov ah, es:[di]
L2:
in al,60h
cmp al,01h ;not too sure if this is the value, experimenting
jne L4
L3:
mov si, offset message
go:
mov dl, [si]
cmp dl, 00h
je L4
mov ah, 09h
mov al, dl
int 10h
inc si
jmp go
L4:
pop di
pop ax
pop es
popf
jmp cs:[old_interrupt9]
old_interrupt9 dd ?
message BYTE "Escape Pressed", 00h
int9_handler endp
end_ISR label byte
setup:
mov ax, 3509h
int 21h
mov word ptr old_interrupt9, bx
mov word ptr old_interrupt9+2, es
mov ax, 2509h
mov dx, offset int9_handler
int 21h
mov dx, offset end_ISR
int 27h
end start The weevil of doooooooooom
-The eagle may soar, but the weasel never gets sucked up by a jet engine (Anonymous)
Here's a bit of code:
.model tiny
.286
.code
org 100h
start:
jmp setup
int9_handler proc far
sti
pushf
push es
push ax
push di
L1:
mov ax, 40h
mov es, ax
mov di, 17h
mov ah, es:[di]
L2:
in al,60h
cmp al,01h ;not too sure if this is the value, experimenting
jne L4
L3:
mov si, offset message
go:
mov dl, [si]
cmp dl, 00h
je L4
mov ah, 09h
mov al, dl
int 10h
inc si
jmp go
L4:
pop di
pop ax
pop es
popf
jmp cs:[old_interrupt9]
old_interrupt9 dd ?
message BYTE "Escape Pressed", 00h
int9_handler endp
end_ISR label byte
setup:
mov ax, 3509h
int 21h
mov word ptr old_interrupt9, bx
mov word ptr old_interrupt9+2, es
mov ax, 2509h
mov dx, offset int9_handler
int 21h
mov dx, offset end_ISR
int 27h
end start The weevil of doooooooooom
-The eagle may soar, but the weasel never gets sucked up by a jet engine (Anonymous)