home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
dos
/
prg
/
pas
/
swag
/
datetime.swg
/
0018_TIME3.PAS.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-05-28
|
533b
|
35 lines
{ DAVID DRZYZGA }
Program timetest;
Uses
Dos;
Function time : String;
Var
reg : Registers;
h, m, s : String[2];
Function tch(s : String) : String;
Var
temp : String[2];
begin
temp := s;
if length(s) < 2 then
tch := '0' + temp
else
tch := temp;
end;
begin
reg.ax := $2c00;
intr($21, reg);
str(reg.cx shr 8, h);
str(reg.cx mod 256, m);
str(reg.dx shr 8, s);
time := tch(h) + ':' + tch(m) + ':' + tch(s);
end;
begin
Writeln(time);
end.