Real time clock

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
gtsphere

Real time clock

Post by gtsphere »

okay, I have been trying to get a clock running and now I finally have some possible solutions, but, my 1 question is that I have been told that i need an IDT before I can get the time through int 0, with Al BL CL and DL, is this true?
Tom

Re:Real time clock

Post by Tom »

yea...you need a IDT.
Curufir

Re:Real time clock

Post by Curufir »

No, you can access the real time clock get the current time without an IDT. You will however need an IDT to use the system timers on IRQ 0, which is what I think you're talking about.

Curufir
gtsphere

Re:Real time clock

Post by gtsphere »

basically, what I want to do is make a timer that simply counts seconds into a variable, is that possible without an IDT?
Tom

Re:Real time clock

Post by Tom »

probly not...
Curufir

Re:Real time clock

Post by Curufir »

That all depends on just how accurate you want it to be. Without the setting up a timer to interrupt every second (For which you need an IDT) then no, not without looping and maybe checking the real time clock until a second has passed, or executing a series of instructions you hope will take 1 second to accomplish.

Although if you're still in real mode I guess you could remap the clock interrupt in the IVT and increment your counter every 18.2 hz.

Curufir
Post Reply