prob about 8259A reprog , pls come in
Posted: Sat Dec 22, 2001 4:08 am
Codes about 8259A are :(from Christopher Giese,a bit changed)
mov al,0x11 ; icw1-->11:icw4 is needed
out 0x20,al
out 0xa0,al
mov al,0x20 ; icw2:vector for IRQs begining
out 0x21,al ; IRQ0-IRQ7 -> interrupts 0x20-0x27
add al,8
out 0xa1,al
mov al,4 ; icw3
out 0x21,al
mov al,2
out 0xa1,al
mov al,1fh ; icw4
out 0x21,al
mov al,1bh
out 0xa1,al
mov al,0xFc ;ocw
out 0x21,al
and Codes for INT 21:
int_21:
mov si,msg_int20 ; 'Pressed key...'
inc dh ;dh->row for display
call Print ;routine for video output,param with dx & si.
in al,60h
iretd
when I press a key, it display the message twice, like this:
Pressed key...
Pressed key...
and it was no responds when press again.
thanks.
user4
mov al,0x11 ; icw1-->11:icw4 is needed
out 0x20,al
out 0xa0,al
mov al,0x20 ; icw2:vector for IRQs begining
out 0x21,al ; IRQ0-IRQ7 -> interrupts 0x20-0x27
add al,8
out 0xa1,al
mov al,4 ; icw3
out 0x21,al
mov al,2
out 0xa1,al
mov al,1fh ; icw4
out 0x21,al
mov al,1bh
out 0xa1,al
mov al,0xFc ;ocw
out 0x21,al
and Codes for INT 21:
int_21:
mov si,msg_int20 ; 'Pressed key...'
inc dh ;dh->row for display
call Print ;routine for video output,param with dx & si.
in al,60h
iretd
when I press a key, it display the message twice, like this:
Pressed key...
Pressed key...
and it was no responds when press again.
thanks.
user4