Sie sind auf Seite 1von 4

BIOS Clock Interrupt lah and Functions 83h/86h

of INT 15h
The functions OOh and Olh of INT lah are related to the DOS-internal system clock only, but
not to the MC146818 real-time clock.
The access to the real-time clock is carried out by functions 02h to 07h of INT lah.
The functions 83h and 86h of INT 15h set time intervals.

E.l BIOS Interrupt INT lah


Function OOh - Read Time Counter (DOS-Internal System Clock)

This function returns the number of timer ticks since 0:OO a.m. If more than 24 hours have
elapsed since power-up, the value of AL is different from 0. In DX:CX the function returns the
high and low timer values, respectively, at 40:6eh and 40:6ch in the BIOS data area and the timer
overflow flag 40:70h in register AL. After a call to this function, the timer overflow flag will be
cleared.

Register Call value Return value


AH OOh
AL 24 hour indicator
cx high count value
DX low count value

Function Olh - Set Time Counter (DOS-Internal System Clock)

This function OOh sets the number of timer ticks since 0:OO a.m. The function stores the high and
low timer values, respectively, which are passed in DXCX into 40:6eh and 40:6ch in the BIOS
data area and resets the timer overflow flag 40:70h.

Register Call value Return value


AH Olh
cx high timer count
DX low tamer count
1152 Appendix E

Function 02h - Read Time (Real-time Clock)

This function reads the time from the real-time clock chip MC146818.

Register Call value Return value

AH 02h OOh
CL minute*)
CH hour*’
DH second*’
Carry error if < > 0

*I binary coded decimal

Function 03h - Set Time (Real-time Clock)

This function sets the time of the real-time clock chip MC146818.

Register Call value Return value


AH 03h OOh
CL minute*’
CH hour*’
DL daylight saving (l=yes, O=no)
DH second*)
Carry error if < > 0

*I blnaly coded decimal

Function 04h - Read Date (Real-time Clock)

This function reads the date from the CMOS RAM in the real-time clock chip MC146818.

Register Call value Return value

AH 04h
CL year*’
CH century*’
DL day*’
DH month*’
Carry error if < > 0

*’ bmary coded decimal


BIOS Clock Interrupt lah and Functions 83h/86h of INT 15h 1153

Function 05h - Set Date (Real-time Clock)


This function sets the date in the CMOS RAM of the real-time clock chip MC146818.

Register Call value Return value


AH 05h
CL year*’
CH century*’
DL day*’
DH month*’
Carry error if < > 0

l ’ bmary coded dectmal

Function 06h - Set Alarm Time (Real-time Clock)


This function sets the alarm time of the real-time clock chip MC146818. If the alarm time is
reached, the MC146818 issues an interrupt 4ah. Before setting a new alarm time you have to
clear an active alarm time via function 07h.

Register Call value Return value


AH 06h
CL minute*)
CH hour*’
DH second*)
Carry error if < > 0

l I bmary coded decimal

Function 07h - Clear Alarm Time (Real-time Clock)


this function clears an active alarm time and has to be called before setting a new alarm time.

Register Call value Return value

AH 07h
Carry error If < > 0

E.2 Wait Functions 83h and 86h of BIOS Interrupt INT 15h
i Function 83h - Set or Clear Wait Time Interval
t
If AL = OOh this function sets the high bit of a byte in main memory at a user-defined address
L when the programmed time interval has expired. After a call to this function, the calling pro-
gram continues at once. After expiry of the wait time interval, the real-time clock issues an
interrupt. The wait time interval has to be specified in units of one microsecond, but because
1154 Appendix E

of the usually programmed real-time clock frequency of 1024 Hz the actual time resolution is
about 976 ps, that is, l/1024 Hz. If AL = Olh the active wait time is disabled.

Subfunction OOh - Set Wait Time Interval

Register Call value Return value


AH 83h OOh
AL OOh register B of MC146818
cx time interval (high)”
DX time interval (low)”
BX offset of target byte”
ES segment of target byte”
Carry error if < > 0

‘) bit 7 of target byte will be set after exp~ry of tmv? mterval

Subfunction Olh - Set Wait Time Interval

Register Call value Return value

AH 83h
AL Olh

Function 86h - Wait Until Time Interval Has Elapsed


This function suspends execution of the calling program until the programmed time interval has
elapsed. Afterwards, the program execution continues. The wait time interval must be specified
in units of one microsecond, but because of the usually programmed real-time clock frequency
of 1024 Hz, the actual time resolution is about 976 ps, that is, l/1024 Hz.

Register Call value Return value

AH 86h
cx time interval (high)”
DX time Interval (low)”
Carry error if < > 0

” I” lls

Das könnte Ihnen auch gefallen