update
This commit is contained in:
parent
ae921df0de
commit
ccf3ae1dd1
6 changed files with 144 additions and 39 deletions
|
|
@ -73,3 +73,55 @@ debug_puthex16:
|
|||
pop ax
|
||||
call debug_puthex8
|
||||
ret
|
||||
|
||||
|
||||
; --- screen text functions ---
|
||||
; AH = page
|
||||
; DH = row
|
||||
; DL = column
|
||||
scr_gotoxy:
|
||||
mov ah, 02h
|
||||
mov bh, 0 ; page 0
|
||||
int 10h
|
||||
ret
|
||||
|
||||
scr_putc:
|
||||
mov ah, 0x0E
|
||||
int 10h
|
||||
ret
|
||||
|
||||
; AL = 0..15 -> print hex digit
|
||||
scr_puthex4:
|
||||
and al, 0Fh ; mask 4 bits low
|
||||
cmp al, 9 ; is it 0..9 ?
|
||||
jbe .num ; yes
|
||||
add al, 'A' - 10 ; convert to 'A'..'F'
|
||||
jmp .pout
|
||||
.num:
|
||||
add al, '0' ; convert to '0'..'9'
|
||||
.pout:
|
||||
mov ah, 0x0E
|
||||
int 10h
|
||||
ret
|
||||
|
||||
; AL = byte -> print 2 hex digits
|
||||
scr_puthex8:
|
||||
push ax
|
||||
push bx
|
||||
mov bl, al ; save al
|
||||
shr al, 4 ; 4 bits plus significatifs
|
||||
call scr_puthex4
|
||||
mov al, bl ; restore al
|
||||
call scr_puthex4
|
||||
pop bx
|
||||
pop ax
|
||||
ret
|
||||
|
||||
; AX = word -> print 4 hex digits
|
||||
scr_puthex16:
|
||||
push ax
|
||||
mov al, ah
|
||||
call scr_puthex8
|
||||
pop ax
|
||||
call scr_puthex8
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ kbd_map_nomod:
|
|||
db 'q','w','e','r','t','y','u','i','o','p','[',']'
|
||||
db 13 ; 1C Enter
|
||||
db 0 ; 1D Ctrl
|
||||
db 'a','s','d','f','g','h','j','k','l',';','\'', '`'
|
||||
db 'a','s','d','f','g','h','j','k','l',';',0x27, 0x60
|
||||
db 0 ; 2A LShift
|
||||
db '\\','z','x','c','v','b','n','m',',','.','/'
|
||||
db 0x5c,'z','x','c','v','b','n','m',',','.','/'
|
||||
db 0 ; 36 RShift
|
||||
db '*' ; 37 keypad *
|
||||
db 0 ; 38 Alt
|
||||
|
|
@ -213,6 +213,22 @@ kbd_buf_pop:
|
|||
; Keyboard ISR (INT 09h)
|
||||
; -----------------------------------------------------------
|
||||
kbd_isr:
|
||||
pusha
|
||||
|
||||
in al, 0x60 ; consomme scancode (obligatoire)
|
||||
|
||||
mov dx, 0x00E9 ; debugcon
|
||||
mov al, '*'
|
||||
out dx, al
|
||||
|
||||
mov al, 0x20 ; EOI master
|
||||
out 0x20, al
|
||||
|
||||
popa
|
||||
iret
|
||||
|
||||
|
||||
; kbd_isr:
|
||||
push ds
|
||||
pusha
|
||||
|
||||
|
|
|
|||
|
|
@ -170,16 +170,6 @@ mouse_init:
|
|||
mov ax, cs
|
||||
mov word [ds:si], cs
|
||||
|
||||
; test: aussi installer sur 0x2C (si PIC remappé base 0x28)
|
||||
;mov si, 0x2C*4
|
||||
;xor ax, ax
|
||||
;mov ds, ax
|
||||
;mov word [ds:si], mouse_handler
|
||||
;add si, 2
|
||||
;mov ax, cs
|
||||
;mov word [ds:si], ax
|
||||
|
||||
|
||||
sti
|
||||
|
||||
mov dx, 0x00E9
|
||||
|
|
@ -321,7 +311,7 @@ mouse_handler:
|
|||
; vider le byte qui a déclenché IRQ12
|
||||
in al, PS2_PORT_BUFFER
|
||||
|
||||
mov dx, 0x00E9 ; debugcon
|
||||
mov dx, 0xE9 ; debugcon
|
||||
mov al, '*'
|
||||
out dx, al ; imprime directement
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue