cli
mov al,2 ; disable IRQ 1
out 21h,al
sti
;------------- Main loop
P1:
in al, 64h ; get status
test al, 1
jz short NOKEY
test al, 20h ; byte from PS2 mouse?
jnz short NOKEY
in al, 60h
dec al ; exit if escape key pressed
jz HOME
; placeholder for checking more keys using a table of keys
NOKEY:
jmp P1
;------------------------
HOME:
cli
xor al, al ; enable IRQ 1
out 21h, al
sti
mov ah, 1 ; clear keyboard buffer
int 16h
; placeholder for terminate program
this code testing keybood connecting with memory ???
eidt code ?
key
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: key
You know your OS is advanced when you stop using the Intel programming guide as a reference.