2D Set System clock |
|
Entry Parameters: | AH = 2D |
| CH = hour (0..23) |
| CL = min (0..59) |
| DH = sec (0..59) |
Returned Values: | AL = 0 |
int TS_set_time(int hour,int minute,int second,int hund_sec)
{
regs.h.ch = hour; regs.h.cl = minute; regs.h.dh = second; regs.h.dl = hund_sec; regs.h.ah = 0x2d; int86(0x21,®s,®s); return(regs.h.al);
}
3.9.File Manager
When the file is downloaded or uploaded, the working file can not be opened by the application command. As the same result, when the file is opened by application, the host computer can not download or upload with the same file. This limitation is used to protect the file pointer from
3C Create or truncate file
When a file is created, the file manager searches the file table for a file name matched. If it is found, the corresponding file handle is returned, and the file pointer is reset to the beginning of the file. The actual file size is reset to zero. If the file does not exist in the file table, a file entry is allocated, and memory is assigned.
Entry Parameters: | AH = 3C |
| DS:DX = segment:offset of ASCIIZ file name |
Returned Values: | if successful : Carry = clear, AX = handle |
| if fail : Carry = set, AX = 3 |
int TS_create_file(char *fn)
{
segregs.ds = FP_SEG(fn); regs.x.dx = FP_OFF(fn); regs.h.ah=0x3C; int86x(0x21,®s,®s,&segregs);