home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
keyboard
/
fix101ky.arc
/
SNOOP.ASM
< prev
Wrap
Assembly Source File
|
1988-07-24
|
1KB
|
40 lines
.286
Sseg segment byte stack 'prog' ; dummy stack segment
Sseg ends
Cseg segment byte public 'prog'
assume cs:Cseg, ds:Cseg, ss:Sseg
org 100h
MAIN proc far
mov ax,3515h ; get vector for int 15h (cassette)
int 21h
mov VOFS,bx
mov VSEG,es
mov dx,offset Intrpt
mov ax,2515h ; set vector for INT 15h (cassette)
int 21h
mov dx,0020h ; plenty of space
mov ax,3100h ; terminate and stay resident
int 21h
MAIN endp
VOFS dw ?
VSEG dw ?
Intrpt proc far
push ds ; save DS
push 0B000h ; mono video segment
pop ds ; put it in DS temporarily
mov ds:[0],al ; stuff scan code in video memory
mov byte ptr ds:[1],7 ; make sure it's readable
pop ds ; restore DS
jmp dword ptr cs:VOFS ; go handle key normally
Intrpt endp
Cseg ends
end MAIN