function clock: TDString;
type
  regpack = record
              ax,bx,cx,dx,bp,si,di,ds,es,flags: integer;
            end;

var
  recpack:          regpack;             {assign record}
  ah,al,ch,cl,dh:   byte;
  hour,min,sec:     string[2];

begin
  ah := $2c;                             {initialize correct registers}
  with recpack do
  begin
    ax := ah shl 8 + al;
  end;
  intr($21,recpack);                     {call interrupt}
  with recpack do
  begin
    str(cx shr 8,hour);                  {convert to string}
    str(cx mod 256,min);                       { " }
    str(dx shr 8,sec);                         { " }
      if length(min)=1 then min:='0'+min;
      if length(sec)=1 then sec:='0'+sec
  end;
  clock := hour+':'+min+':'+sec;
end;
function Date: TDString;
type
  regpack = record
              ax,bx,cx,dx,bp,si,di,ds,es,flags: integer;
            end;

var
  recpack:       regpack;                {record for MsDos call}
  month,day:     string[2];
  year:          string[4];
  dx,cx:         integer;

begin
  with recpack do
  begin
    ax := $2a shl 8;
  end;
  MsDos(recpack);                        { call function }
  with recpack do
  begin
    str(cx,year);                        {convert to string}
    str(dx mod 256,day);                     { " }
    str(dx shr 8,month);                     { " }
  end;
  if length(day)=1 then day:='0'+day;
  if length(month)=1 then month:='0'+month;
  Delete(year,1,2);
  date := month+'/'+day+'/'+year;
end;
