RTC interrupts problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pepito

RTC interrupts problem

Post by pepito »

I can't activate the CMOS Real Time Clock periodic interrupt. I read some tutorials and I belive I am follow the necessary steps to do it.

Here is the code I am using to activate the RTC periodic interrupt:

---

; Set periodic interrupt rate to 1024 int/sec

mov al, 0x0A
out 0x70, al
in al, 0x71

mov bl, al
and bl, 11110000b
or bl, 00000110b

mov al, 0x0A
out 0x70, al
mov al, bl
out 0x71, al

; Enable periodic interrupt

mov al, 0x0B
out 0x70, al
in al, 0x71

mov bl, al
or bl, 01000000b

mov al, 0x0B
out 0x70, al
mov al, bl
out 0x71, al

; Reading the 0x0C register should initiate the periodic interrupt !!!

mov al, 0x0C
out 0x70, al
in al, 0x71

; Loop forever to test

jmp $

---

The ISR just display a number each time is fired:

---

isr_28:

push eax

; Send acknowledge to the RTC

mov al, 0x0C
out 0x70, al
in al, 0x71

call hex ; This routine just display a number !

; Send acknowledge to the PIC

mov al, 0x20
out 0x20, al ; PIC-1
mov al, 0x20
out 0xA0, al ; PIC-2

pop eax

iretd

---

If all this is OK, then I suspect I have some error enabling the IRQs 8-15

What is necessary to enable IRQs 8-15?

Thank you very much

pepito
Post Reply