Mail Archives: djgpp/1997/05/09/10:33:13
On 9 May 1997, Gregary J Boyles wrote:
> Can it be done with hanging the machine? I have a key board handler and I
> want to time stamp my input events. I was trying to use dos service get
> time (int 0x21) inside my key board handler but it doesn't work. Are there
> any other ways, hacks, cheats?
>
DOS interrupt (0x21) functions are generally not prepared to be called
from interrupts. I think you can use the CMOS real-time clock directly
through the ports. Email me if you want a doc about it.
A different way to do it is that you can read a long from 0x40:0x6C to get
the number of timer ticks since midnight, then you need to convert the
number to hour. This works in real mode, I haven't checked under DJGPP.
(You should replace segment 0x40 with BIOSSeg or something like this).
- Raw text -