home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
BEEHIVE
/
ZCAT
/
ROS-CLK.LBR
/
SBC-IMDZ.CZK
/
SBC-IMDZ.CLK
Wrap
Text File
|
2000-06-30
|
2KB
|
54 lines
{ ROS.CLK - Remote Operating System Clock Routines }
{ File: SBC-IMDZ.CLK
Description: These drivers are designed to support the Teletek System Master
running under the MDZ multi-user operating system.
Date: 8/3/85
Author: Steve Davis, Sysop of Dragon RCP/M (505)344-3171
Description: Comment update and code cleanup.
Date: 9/7/85
Author: Steve Fox
}
procedure DOSCOMMAND; external $F058;
procedure GetTAD(var t: tad_array);
{ Return a 6 element integer array of the current system time in
seconds, minutes, hours, day, month, and year. }
var
cmdbuffer: array[0..32] of byte;
begin
fillchar(cmdbuffer, 33, 0); { Zero the Command Buffer }
cmdbuffer[0] := $0C; { DOSCOMMAND time of day }
cmdbuffer[1] := $00; { Master to slave get time }
InLine($11/cmdbuffer); { LD DE,address of command buffer }
DOSCOMMAND;
t[0] := cmdbuffer[2]; { seconds }
t[1] := cmdbuffer[3]; { minutes }
t[2] := cmdbuffer[4]; { hours }
t[3] := cmdbuffer[6]; { day }
t[4] := cmdbuffer[7]; { month }
t[5] := cmdbuffer[5] { year }
end;
procedure SetTAD(var t: tad_array);
{ Set the system time using a 6 element integer array which contains
seconds, minutes, hours, day, month, and year. }
var
cmdbuffer: array[0..32] of byte;
begin
fillchar(cmdbuffer, 33, 0); { Zero the command buffer }
cmdbuffer[0] := $0C; { DOSCOMMAND time of day }
cmdbuffer[1] := $01; { Master to slave set time }
cmdbuffer[2] := t[0]; { seconds }
cmdbuffer[3] := t[1]; { minutes }
cmdbuffer[4] := t[2]; { hours }
cmdbuffer[6] := t[3]; { day }
cmdbuffer[7] := t[4]; { month }
cmdbuffer[5] := t[5]; { year }
InLine($11/cmdbuffer); { LD DE,address of command buffer }
DOSCOMMAND
end;