Category : Assembly Language Source Code
Archive   : TASMSWAN.ZIP
Filename : KEYS.ASM
Output of file : KEYS.ASM contained in archive : TASMSWAN.ZIP
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
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
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/