Date: Fri, 9 May 1997 15:19:17 +0200 (MET DST) From: Wojciech Piechowski To: Gregary J Boyles cc: djgpp AT delorie DOT com Subject: Re: Software ints from hardware handlers. In-Reply-To: <5kue8q$jnk@lion.cs.latrobe.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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).