-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCRT.PAS
More file actions
47 lines (33 loc) · 668 Bytes
/
CRT.PAS
File metadata and controls
47 lines (33 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
unit crt;
interface
uses dos;
procedure delay(delayms:word);
implementation;
var starting_h:word;
procedure delay;
var
hh,mh,ss,ms,timenow,delayend:word;
begin
gettime(hh,mm,ss,ms);
if starting_h > hh then hh:=hh+24;
hh:=hh - starting_h;
delayend := ((ms + delayms) DIV 100) +
(ss*10) + (mm*600) + (hh*36000);
repeat
gettime(hh,mm,ss,ms);
if starting_h > hh then hh:=hh+24;
hh:=hh - starting_h;
timenow := ((ms) DIV 100) +
(ss*10) + (mm*600) + (hh*36000);
until timenow>=delayend;
end;
procedure initdelay;
var
hh,mm,ss,ms:word;
begin
gettime(hh,mm,ss,ms);
starting_h:=hh;
end;
begin
initdelay;
end.