Category : Assembly Language Source Code
Archive   : NORTASM.ZIP
Filename : KBD_IO19.ASM

 
Output of file : KBD_IO19.ASM contained in archive : NORTASM.ZIP
.MODEL SMALL

.CODE

PUBLIC READ_BYTE
;-----------------------------------------------------------------------;
; This procedure reads a single ASCII character. This is just ;
; a test version of READ_BYTE. ;
; ;
; Returns: AL Character code (unless AH = 1) ;
; AH 0 if read ASCII char ;
; 1 if read a special key ;
;-----------------------------------------------------------------------;
READ_BYTE PROC
XOR AH,AH ;Ask for keyboard read function
INT 16h ;Read character/scan code from keyboard
OR AL,AL ;Is it an extended code?
JZ EXTENDED_CODE ;Yes
NOT_EXTENDED:
XOR AH,AH ;Return just the ASCII code
DONE_READING:
RET

EXTENDED_CODE:
MOV AL,AH ;Put scan code into AL
MOV AH,1 ;Signal extended code
JMP DONE_READING
READ_BYTE ENDP


END


  3 Responses to “Category : Assembly Language Source Code
Archive   : NORTASM.ZIP
Filename : KBD_IO19.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: http://www.os2museum.com/wp/mtswslnk/