Function 2Ch Get Time

mov ah, 2Ch ;Get Time

int 21h

mov Hour, ch ;hour (0 through 23)

mov Minutes, cl ;minutes (0 through 59)

mov Seconds, dh ;seconds (0 through 59)

mov Hundredths, dl ;hundredths of a second (0 through 99)

Get Time (Function 2Ch) returns the MS-DOS system time (the time maintained by the clock device).

Parameters

This function has no parameters.

Return Values

The CX and DX registers contain the following information:

Register Contents

CH Hour in 24-hour format (13 = 1 P.M., 14 = 2 P.M., and so on)
CL Minutes (0 through 59)
DH Seconds (0 through 59)
DL Hundredths of a second (0 through 99)

See Also

Function 2Ah Get Date
Function 2Bh Set Date
Function 2Dh Set Time