I have strange problem: IRQ0 interrupts just one
time. Just one interrupt and no more!
My code works fine in Real Mode, but not in PM.
All I do is:
1) Settin Up PM
2) Reprogramming PIC (a=0x20, b=0x70)
3) Disabling all, but IRQ0
4) Looping for few seconds
5) Quiting application
Here some code parts:
;---
; PIC reprogramming Code
;---
mov al, 00010001b
out 0x20, al
mov al, 0x20
out 0x21, al
mov ax, 00000100b
out 0x21, al
mov ax, 00000001b
out 0x21, al
mov al, 00010001b
out 0xa0, al
mov al, 0x70
out 0xa1, al
mov al, 0000010b
out 0xa1, al
mov al, 0000001b
out 0xa1, al
mov al, 0xfe
out 0x21, al
mov al, 0xff
out 0xa1, al
;---
; Interrupt Gate
;---
int20:
push es
push eax
push ebx
mov ax, LINEAR_SEL
mov es, ax
xor eax, eax
mov al, [tim]
mov byte [es:0xb8008], al
inc al
mov [tim], al
pop ebx
pop eax
pop es
sti
iret
tim db 0x00
;---
; Part-o-IDT
;---
dw int20
dw SYS_CODE_SEL
db 0x00
db 0x8e
dw 0x0000
|