[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
const
  (* flags bit masks *)

  fcarry     = $0001;
  fparity    = $0004;
  fauxiliary = $0010;
  fzero      = $0040;
  fsign      = $0080;
  foverflow  = $0800;

  (* file mode magic numbers *)

  fmclosed = $d7b0;
  fminput  = $d7b1;
  fmoutput = $d7b2;
  fminout  = $d7b3;

  (* file attribute constants *)

  readonly  = $01;
  hidden    = $02;
  sysfile   = $04;
  volumeid  = $08;
  directory = $10;
  archive   = $20;
  anyfile   = $3f;

type (* string types *)

  comstr  = string[127];        { command line string }
  pathstr = string[79];         { full file path string }
  dirstr  = string[67];         { drive and directory string }
  namestr = string[8];          { file name string }
  extstr  = string[4];          { file extension string }
  filestr = string[12];         { file name + extension string }

  (* registers record used by intr and msdos *)

  registers = record
   case integer of
    0 : (ax,bx,cx,dx,bp,si,di,ds,es,flags : word);
    1 : (al,ah,bl,bh,cl,ch,dl,dh : byte);
  end;

   (* typed-file and untyped-file record *)

  filerec = record
   handle   : word;
   mode     : word;
   recsize  : word;
   private  : array [1..26] of byte;
   userdata : array [1..16] of byte;
   name     : array [0..79] of char;
  end;

  (* textfile record *)

  textbuf = array [0..127] of char;
  textrec = record
   handle    : word;
   mode      : word;
   bufsize   : word;
   private   : word;
   bufpos    : word;
   bufend    : word;
   bufptr    : textbuf;
   openfunc  : pointer;
   inoutfunc : pointer;
   flushfunc : pointer;
   closefunc : pointer;
   userdata  : array [1..16] of byte;
   name      : array [0..79] of char;
   buffer    : textbuf;
  end;

  (* search record used by findfirst and findnext *)

  searchrec = record
   fill : array [1..21] of byte;
   attr : byte;
   time : longint;
   size : longint;
   name : string[12];
  end;

  (* date and time record used by packtime and unpacktime *)

  datetime = record
   year,month,day,hour,min,sec : word;
  end;

var
  doserror : integer;  (* error status variable *)



  function  dosversion : word;
  procedure intr(intno : byte;var regs : registers);
  procedure msdos(var regs : registers);
  procedure getdate(var year,month,day,dayofweek : word);
  procedure setdate(year,month,day : word);
  procedure gettime(var hour,minute,second,sec100 : word);
  procedure settime(hour,minute,second,sec100 : word);
  procedure getcbreak(var break : boolean);
  procedure setcbreak(break : boolean);
  procedure getverify(var verify : boolean);
  procedure setverify(verify : boolean);
  function  diskfree(drive : byte) : longint;
  function  disksize(drive : byte) : longint;
  procedure getfattr(var f;var attr : word);
  procedure setfattr(var f;attr : word);
  procedure getftime(var f;var time : longint);
  procedure setftime(var f;time : longint);
  procedure findfirst(path : pathstr;attr : word;var f : searchrec);
  procedure findnext(var f : searchrec);
  procedure unpacktime(p : longint;var t : datetime);
  procedure packtime(var t : datetime;var p : longint);
  procedure getintvec(intno : byte;var vector : pointer);
  procedure setintvec(intno : byte;vector : pointer);
  procedure swapvectors;
  procedure keep(exitcode : word);
  procedure exec(path : pathstr;comline : comstr);
  function  dosexitcode : word;
  function  fsearch(path : pathstr;dirlist : string) : pathstr;
  function  fexpand(path : pathstr) : pathstr;
  procedure fsplit(path : pathstr;var dir : dirstr;
                   var name : namestr;var ext : extstr);
  function  envcount : integer;
  function  envstr(index : integer) : string;
  function  getenv(envvar : string) : string;

  function  isdevice(handle : word) : boolean;
  function  fileexist(f : pathstr) : boolean;
  function  filename(path : pathstr) : filestr;
  function  pathname(path : pathstr) : dirstr;
  function  filenamehasext(path : pathstr;var dotpos : byte) : boolean;
  procedure defaultextension(ext : extstr;var path : pathstr);
  procedure cleanfilename(var path : pathstr);


This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson