Initializes the system clock driver to a specific date. The system time is not affected.
Call with:
AH = 2BH
CX = year (1980 through 2099)
DH = month (1 through 12)
DL = day (1 through 31)
Returns:
AL = 00H if date set successfully
FFH if date not valid (ignored)
Note:
This function's register format is the same as that required for Int 21H Function 2AH (Get Date).
Example:
Set the system date according to the contents of the variables year, day, and month.
year dw 0
month db 0
day db 0
.
.
.
mov ah,2bh ; function number
mov cx,year ; get year (word)
mov dh,month ; get month (byte)
mov dl,day ; get day (byte)
int 21h ; transfer to MS-DOS
or al,al ; check status
jnz error ; jump if date invalid
.
.
.