dos_compilers/Borland Turbo Pascal v2/DOS_GT.PAS

28 lines
454 B
Plaintext
Raw Normal View History

2024-06-30 23:18:33 +02:00
type
regpack = record
ax,bx,cx,dx,bp,si,di,ds,es,flags: integer;
end;
2024-07-01 00:28:49 +02:00
procedure get_time( var tt : timetype );
2024-06-30 23:18:33 +02:00
var
recpack: regpack;
ah,al,ch,cl,dh: byte;
begin
2024-07-01 00:28:49 +02:00
ah := $2c;
2024-06-30 23:18:33 +02:00
with recpack do
begin
ax := ah shl 8 + al;
end;
intr( $21, recpack );
2024-07-01 00:28:49 +02:00
with recpack do
begin
tt.h := cx shr 8;
tt.m := cx mod 256;
tt.s := dx shr 8;
tt.l := dx mod 256;
end;
2024-06-30 23:18:33 +02:00
end;
2024-07-01 00:28:49 +02:00