🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3709

Re: Real time AT Clock on int 70h

#3709
From: Jerzy Tarasiuk
Date: Fri, 09 Oct 1992 11:50
32 lines
2734 bytes
>>>>> On 7 Oct 1992 22:08:24 -0500, ISB202REID@redgum.qut.edu.au (Did somebody say Coffee ??????) said:
Fodd> I was perusing Ralf Brown's interrupt list,
Fodd> when I found the entry for the real time AT clock on Int 70h.
Fodd> So I wrote a TSR that hooked it and hoped it would be invoked,
Fodd> every 1024th of a second.
Fodd> Absolutely nothing happened.
Fodd> Any Ideas ???

I looked into IBM's AT Technical Reference and found the following:
;--- HARDWARE INT  70H -- ( IRQ LEVEL  8 ) ------------------------------------
; ALARM INTERRUPT HANDLER (RTC)                                               ;
;       THIS ROUTINE HANDLES THE PERIODIC AND ALARM INTERRUPTS FROM THE CMOS  ;
;       TIMER.  INPUT FREQEUNCY IS 1.024 KHZ OR APPROXIMATELY 1024 INTERRUPTS ;
;       EVERY SECOND FOR THE PERIODIC INTERRUPT.  FOR THE ALARM FUNCTION,     ;
;       THE INTERRUPT WILL OCCUR AT THE DESIGNATED TIME.                      ;
;                                                                             ;
;       INTERRUPTS ARE ENABLED WHEN THE EVENT OR ALARM FUNCTION IS ACTIVATED. ;
;       FOR THE EVENT INTERRUPT, THE HANDLER WILL DECREMENT THE WAIT COUNTER  ;
;       AND WHEN IT EXPIRES WILL SET THE DESIGNATED LOCATION TO 80H.  FOR     ;
;       THE ALARM INTERRUPT, THE USER MUST PROVIDE A ROUTINE TO INTERCEPT     ;
;       THE CORRECT ADDRESS FROM THE VECTOR TABLE INVOKED BY INTERRUPT 4AH    ;
;       PRIOR TO SETTING THE REAL TIME CLOCK ALARM (INT 1AH, AH=06H).         ;
;------------------------------------------------------------------------------
As I can understand from code, INT 4Ah can be executed by it and its
handler can use registers AX,DX,DI,DS. Event wait uses cells 40:98..A0.
Alarm wait can be activated by INT 1Ah, CH=hour, CL=minute, DH=second,
AH=6 (sets CF if already active), reset (before alarm) by INT 1Ah, AH=7.
Event wait may be activated by INT 15h, AH=83h, AL=0, ES:BX=flag address,
CXDX=time (in us), (AH=83h, AL=1 clears event wait), also WAIT function
(INT 15h, AH=86h, CXDX=time) can use it. Seems there is a bug in BIOS
code: WAIT needs flag to be ORed with 80h and it is set to 80h, but
I'm looking in listing of very old BIOS, surely the bug is fixed now.
Technical Details
Message-ID: <JT.92Oct9125028@fizyk1.fuw.edu.pl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt
References: <E36CBC0C807F40DB59@qut.edu.au>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt
From: jt@fuw.edu.pl (Jerzy Tarasiuk)
Subject: Re: Real time AT Clock on int 70h
In-Reply-To: ISB202REID@redgum.qut.edu.au's message of 7 Oct 1992 22:08:24 -0500
Message-ID: <JT.92Oct9125028@fizyk1.fuw.edu.pl>
Sender: news@fuw.edu.pl
Nntp-Posting-Host: fizyk1
Organization: Warsaw University Physics Dept.
References: <E36CBC0C807F40DB59@qut.edu.au>
Date: Fri, 9 Oct 1992 11:50:28 GMT
Lines: 32