Int 21H [1.0] Function 2CH (44) Get time

Obtains the time of day from the system real-time clock driver, converted to hours, minutes, seconds, and hundredths of seconds.

Call with:

AH = 2CH

Returns:

CH = hours (0 through 23)

CL = minutes (0 through 59)

DH = seconds (0 through 59)

DL = hundredths of seconds (0 through 99)

Notes:

This function's register format is the same as that required for Int 21H Function 2DH (Set Time).

On most IBM PC—compatible systems, the real-time clock does not have a resolution of single hundredths of seconds. On such machines, the values returned by this function in register DL are discontinuous.

Example:

Obtain the current time and save its two major components in the variables hours and minutes.

hours db 0

minutes db 0

.

.

.

mov ah,2ch ; function number

int 21h ; transfer to MS-DOS

mov hours,ch ; save hours (byte)

mov minutes,cl ; save minutes (byte)

.

.

.