Real Time Clock
Posted: Fri Jul 05, 2002 1:26 pm
Okay, I have the real time clock working in Bochs, but not on a real comp. I have an ISR for the interrupt that it triggers that increments a value. In Bochs, the ISR is called, but not on a real comp. Here is my code for enabling the rtc:
[tt]
[bits 32]
[global _enable_rtc]
_enable_rtc:
mov al, 0x0B
out 0x70, al
mov ah, 0x0 ; delay(not sure if a delay is needed... but it can't hurt)
inc ah ; delay
inc ah ; delay
in al, 0x71
or al, 0x40
out 0x71, al
ret
[/tt]
This is correct as far as I know, the rest of my code may be found at http://users.demented.org/~osmaker/code/
Thanks in advance,
K.J.
[tt]
[bits 32]
[global _enable_rtc]
_enable_rtc:
mov al, 0x0B
out 0x70, al
mov ah, 0x0 ; delay(not sure if a delay is needed... but it can't hurt)
inc ah ; delay
inc ah ; delay
in al, 0x71
or al, 0x40
out 0x71, al
ret
[/tt]
This is correct as far as I know, the rest of my code may be found at http://users.demented.org/~osmaker/code/
Thanks in advance,
K.J.