delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/09/10:33:13

Date: Fri, 9 May 1997 15:19:17 +0200 (MET DST)
From: Wojciech Piechowski <voyt AT delta DOT ds2 DOT pg DOT gda DOT pl>
To: Gregary J Boyles <boylesgj AT lion DOT cs DOT latrobe DOT edu DOT au>
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: <Pine.GSO.3.96.970509151023.819A-100000@delta.ds2.pg.gda.pl>
MIME-Version: 1.0


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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019