Skip to content

Commit 1d5ec79

Browse files
committed
info
1 parent c894322 commit 1d5ec79

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

UtilLib/keys.asm

+8-15
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ LOCALS @@
1414
DATASEG
1515
include "UtilLib\keymap.inc"
1616

17+
; used by PrintFifoStatus
1718
strTail db "TAIL=$",0
1819
strHead db "HEAD=$",0
19-
strHere db "Here$",0
2020

2121
CODESEG
2222
_OldKeyboardISR dw 0,0 ; old keyboard ISR vector address and segment
23-
KEY_BUFFER_SIZE equ 15
23+
; FIFO buffer implementation
24+
KEY_BUFFER_SIZE equ 15 ; Fifo buffer size
2425
_ISRKeyBuffer db KEY_BUFFER_SIZE dup(0) ; ISR 9 - keyboard buffer
25-
_ISRKeyHead dw 0
26-
_ISRKeyTail dw 0
27-
_ISRKeyCount db 0
26+
_ISRKeyHead dw 0 ; Head pointer
27+
_ISRKeyTail dw 0 ; Tail pointer
2828

2929
;------------------------------------------------------------------
3030
; Set Keyboard Typematic Rate to defalt (repeat delay and rate)
@@ -176,7 +176,6 @@ ENDP RestoreKeyboardInterrupt
176176
;------------------------------------------------------------------
177177
PROC InitSampleISR
178178
push es di
179-
mov [cs:_ISRKeyCount], 0
180179
mov [cs:_ISRKeyHead], 0
181180
mov [cs:_ISRKeyTail], 0
182181
; Make buffer zero
@@ -263,15 +262,6 @@ PROC GetKeyboardStatusISR
263262
__fifo_peek
264263
ret
265264
ENDP GetKeyboardStatusISR
266-
267-
;------------------------------------------------------------------
268-
; Sample keybaord interrupt - converts scancode to ASCII
269-
; Not implemented!
270-
;
271-
; Private - for use only by the library
272-
;------------------------------------------------------------------
273-
MACRO __scancode_to_char key
274-
ENDM
275265
;------------------------------------------------------------------
276266
; Sample keybaord interrupt - write key to buffer
277267
;
@@ -400,6 +390,8 @@ ENDP PrintFifoStatus
400390
;--------------============= END OF SAMPLE KEYBOARD ISR ==============-----------------
401391

402392

393+
;--------------============= SIMPLE KEYBOARD ISR ==============------------------------
394+
403395
;------------------------------------------------------------------
404396
; A simple keybaord interrupt uses the original built-in IRQ but
405397
; adds preprocessing to the event
@@ -413,3 +405,4 @@ PROC KeyboardISREvents FAR
413405
push [word ptr cs:_OldKeyboardISR] ; offset
414406
retf
415407
ENDP KeyboardISREvents
408+
;--------------============= END OF SIMPLE KEYBOARD ISR ==============-------------------

0 commit comments

Comments
 (0)