home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
TASMSWAN.ZIP
/
KEYS.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-07-15
|
965b
|
63 lines
%TITLE "Display KEY values"
IDEAL
DOSSEG
MODEL small
STACK 256
cr EQU 13
lf EQU 10
DATASEG
exitCode db 0
charKey db 'Character key : ', 0
funcKey db 'Function key : ', 0
numString db 7 DUP (0)
welcome db cr,lf,'Display key values--by Tom Swan'
db cr,lf,'Press any key or press <ESC> to quit.'
db cr,lf,lf,0
CODESEG
;----- from BINASC.obj
EXTRN BinToAscDec:proc
;----- from STRIO.obj
EXTRN StrWrite:proc, NewLine:proc
;----- from KEYBOARD.obj
EXTRN Keywaiting:proc, Getch:proc
Start:
mov ax,@data
mov ds,ax
mov es,ax
mov di,offset welcome
call StrWrite
Repeat:
call KeyWaiting
jz Repeat
call GetCh
mov di, offset charKey
jnz @@10
cmp al,27
je Exit
mov di, offset funcKey
@@10:
call StrWrite
xor ah,ah
mov cx,1
mov di, offset numString
call BinToAscDec
call StrWrite
call NewLine
jmp Repeat
Exit:
mov ah,04Ch
mov al,[exitCode]
int 21h
END Start