What interrupt would you hook from DOS to get the real-time clock?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The realtime clock cannot generate interrupts. It was (maybe still is) coupled with the cmos-ram because it was buffered by the battery. It can only be accessed via the ports 0x70 and 0x71.
You can however hook the interrupt of the PIT (programmable interrupt timer). That’s interrupt 0x08 (e.g. hardware IRQ0). As far as I remember that interrupt was configured by dos to be called about 27 times per second. You can program it to other frequencies as well but that will mess up the dos-clock a bit (port 0x40 an 0x43).