dt.pas
Petr "Zweistein" Prokop
{ zwei.stein@worldonline.cz, zweistein.kgb.cz }
{
(c) Petr "Zweistein" Prokop
Program DateTime :
Vypisuje zběvajˇcˇ źas do p…lnoci
}
Uses Crt,Dos;
procedure curoff;
assembler;
asm
mov ax, 0100h
mov bx, 0000h
mov ch, 7
mov cl, 0
int 0010h
end;
procedure curon;
assembler;
asm
mov ax, 0100h
mov bx, 0000h
mov ch, 0
mov cl, 1
int 0010h
end;
var Y,Mo,D,x,H,M,S,SS:word;
xx:longint;
Begin;
ClrScr;
curoff;
Repeat
GotoXY (1,1);
for xx:=1 to 80 do write ('-');
GetTime(h,m,s,ss);
GetDate(y,mo,d,x);
Writeln (y,' ',mo,' ',d,' ',h,':',m,':',s,'.',ss,' ');
h:=23-h;
m:=59-m;
s:=59-s;
ss:=100-ss;
d:=0;
writeln ('0 0 ',d,' ',h,':',m,':',s,'.',ss,' ');
xx:=d*24*60*60*100+h*60*60*100+m*60*100+s*100+ss;
writeln ('ms:',xx,' ');
writeln (' s:',d*24*60*60+h*60*60+m*60+s,' ');
writeln (' m:',d*24*60+h*60+m,' ');
writeln (' h:',d*24+h,' ');
writeln ('2000 1 1 0:00:00:01');
write ('ms :');
for xx:=1 to trunc(3*ss/5) do write ('-');
writeln('> ');
GotoXY (65,9);
writeln('|');
write (' s :');
for xx:=1 to s do write ('+');
writeln('> ');
GotoXY (65,10);
writeln('|');
write (' m :');
for xx:=1 to m do write ('*');
writeln('> ');
GotoXY (65,11);
writeln('|');
write (' h :');
for xx:=1 to h do write ('#');
writeln('> ');
GotoXY (29,12);
writeln('|');
for xx:=1 to 80 do write ('-');
Until Keypressed;
curon;
End.