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 Parameter:
AH = 2BH
CX = year (1980 - 2079)
DH = month (1 - 12)
DL = day (1 - 31)
Return Value: AL = 0/FFH
; OK/Setting error
Example
:
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((int)regs.h.al);
}
2C
Get System Time
Entry Parameter:
AH = 2CH
Return Value: CH = hour (0 - 23)
CL = minute (0 - 59)
DH = second (0 - 59)
Example
:
void TS_get_time(int *hour,int *minute,int *second,int *mini_sec)
{
TD_int_dos1(0x2c,0,0,0);
*hour = (int)regs.h.ch;
*minute = (int)regs.h.cl;
*second = (int)regs.h.dh;
*mini_sec = (int)regs.h.dl;
Содержание PT600
Страница 1: ...PT600 Portable Terminal Programming Reference Guide Document number 3506000120...
Страница 7: ......
Страница 16: ......
Страница 20: ...regs h bh 5 regs h al unsigned char type regs h bl unsigned char status int86 0x21 regs regs...
Страница 57: ......
Страница 66: ...Host Command STX ESC CMD parameters CS1 CS2 ADDR Acknowledgement ACK Negative ACK NAK...