Category : Assembly Language Source Code
Archive   : TASMSWAN.ZIP
Filename : KEYS.ASM

Output of file : KEYS.ASM contained in archive : TASMSWAN.ZIP
%TITLE "Display KEY values"

MODEL small

cr EQU 13
lf EQU 10


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 to quit.'
db cr,lf,lf,0


;----- from BINASC.obj
EXTRN BinToAscDec:proc

;----- from STRIO.obj
EXTRN StrWrite:proc, NewLine:proc

;----- from KEYBOARD.obj
EXTRN Keywaiting:proc, Getch:proc

mov ax,@data
mov ds,ax
mov es,ax

mov di,offset welcome
call StrWrite
call KeyWaiting
jz Repeat
call GetCh
mov di, offset charKey
jnz @@10
cmp al,27
je Exit
mov di, offset funcKey
call StrWrite
xor ah,ah
mov cx,1
mov di, offset numString
call BinToAscDec
call StrWrite
call NewLine
jmp Repeat
mov ah,04Ch
mov al,[exitCode]
int 21h

END Start

  3 Responses to “Category : Assembly Language Source Code
Archive   : TASMSWAN.ZIP
Filename : KEYS.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: