PT630 Programming Reference Guide
Page 38 of 59
------------------------------------------------------------------------------------------------------------------
1.5.24 Set Alarm Time
Entry Parameter: AH = 2FH
CH = hour (0 - 23)
CL = minute (0 - 59)
DH = second (0 - 59)
Return Value: AL = 0/FFH
; OK/Setting error
Example
:
int TS_alarm_time(int hour,int minute,int second)
{
regs.h.ah = 0x2F;
regs.h.ch = hour;
regs.h.cl = minute;
regs.h.dh = second;
int86(0x21,®s,®s);
return((int)regs.h.al);
}
1.5.25 Get DOS and Firmware Version Number
Entry Parameter: AH = 30H
AL = 0/1
; with/without OEM version code
Return Value: if AL = 0 when call:
AL= major DOS version number (=2)
AH= minor DOS version number (=10)
CL= major firmware version number
CH= minor firmware version number
BX= OEM firmware version code (=0 for standard version)
if AL = 1 when call:
AL= major DOS version number (=2)
AH= minor DOS version number (=10)
CL= major firmware version number
CH= minor firmware version number
BX=
810H
Example
:
int TS_version1(int *ver,int *firm,int *oem)
{
regs.h.ah= 0x30;
regs.h.al= 0;
int86(0x21,®s,®s);
*ver = regs.h.al * 100 + regs.h.ah;
*firm= regs.h.cl * 100 + regs.h.ch;
*oem = regs.x.bx;
return(regs.h.al * 100 + regs.h.ah);
}