You are here : assembly8086 INT 21HAH2DH

AH=2DH - 8086 INT 21H

AH = 2Dh - SET SYSTEM TIME

Entry: CH = hour CL = minute DH = second DL = 1/100 seconds

Return:

  • AL = 00h successful
  • FFh if invalid time, system time unchanged

Note: DOS 3.3+ also sets CMOS clock


Syntax

MOV AH,2DH
INT 21H


Example

.data
	hour db 15h
	min db 30h
	sec db 30h
.code
	...
	...
	mov ch,hour
	mov cl,min
	mov dh,sec
	mov ah,2dh
	int 21h		; Sets System Time
	...
	...
	end


Output / Return Value

Entry: CH = hour CL = minute DH = second DL = 1/100 seconds
Return:
    AL = 00h successful
    FFh if invalid time, system time unchanged
Note: DOS 3.3+ also sets CMOS clock


Limitations


Alternatives / See Also


Reference