home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
utils
/
datestmp
/
dsutil.lbr
/
TESTCLK.PZS
/
TESTCLK.PAS
Wrap
Pascal/Delphi Source File
|
1988-08-29
|
2KB
|
57 lines
Program Testclk;
{Turbo Pascal program to test the function to
read time and date using Plu*Perfect Systems
DateStamper. Full details of the interface
are on the DateStamper Toolkit disk available
from Plu*Perfect Systems, P.O. Box 1494,
Idyllwild, CA 92349}
Type
tad_array = array[0..5] of byte;
Var
stamp : tad_array; {buffer for BCD result}
i : integer;
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.
This assembly language routine checks for the
presence of Plu*Perfect Systems DateStamper and
if it is present the current time and date are
returned. If not present then an array of zeros
is returned. }
begin
inline ($2A/t/$E5/$0E/$0C/$1E/$00/$CD/
$05/$00/$7D/$FE/$22/$20/$2A/$7C/
$B7/$20/$26/$1E/$44/$0E/$0C/$CD/
$05/$00/$7C/$FE/$44/$20/$1A/$ED/
$53/*+4/$E1/$CD/$00/$00/$11/$FB/
$FF/$EB/$19/$06/$03/$4E/$1A/$77/
$79/$12/$23/$1B/$10/$F7/$18/$08/
$E1/$06/$06/$AF/$77/$23/$10/$FC);
for i := 0 to 5 do {convert from BCD to binary}
t[i] := 10*(t[i] div 16) + (t[i] mod 16);
end;
begin {main}
writeln;
getTAD(stamp);
writeln('Year: ',stamp[5]);
writeln('Month: ',stamp[4]);
writeln('Day: ',stamp[3]);
writeln('Hour: ',stamp[2]);
writeln('Minute:',stamp[1]);
writeln('Second:',stamp[0]);
writeln;
end. {main}
time in
seconds, minutes, hou