CX = year (1980..2099) DH = month (1..12) DL = day (1..31)

void TS_get_date(int *year,int *month,int *day,int *week)

{

TD_int_dos1(0x2a,0,0,0); *year = regs.x.cx; *month = regs.h.dh; *day = regs.h.dl;

*week = regs.h.al;

 

}

 

2B

Set System date

 

 

Entry Parameters:

AH = 2B

 

 

CX = year (1980..2099)

 

 

DH = month (1..12)

 

 

DL = day (1..31)

 

Returned Values:

AL = 0

int TS_set_date(int year,int month,int day)

{

regs.h.ah = 0x2b; regs.x.cx = year; regs.h.dh = month; regs.h.dl = day; int86(0x21,®s,®s); return(regs.h.al);

}

 

2C Get System clock

 

Entry Parameters:

AH = 2C

Returned Values:

CH = hour (0..23)

 

CL = min (0..59)

 

DH = sec (0..59)

 

DL = 0

void TS_get_time(int *hour,int *minute,int *second,int *hund_sec)

{

TD_int_dos1(0x2c,0,0,0); *hour = regs.h.ch; *minute = regs.h.cl; *second = regs.h.dh; *hund_sec = regs.h.dl;

}

3-50

Page 51
Image 51
Unitech MR350MKII manual Set System date, 2C Get System clock