home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / TURBOPAS / ENVIRON.LBR / GLOBDEFS.PZS / GLOBDEFS.PAS
Pascal/Delphi Source File  |  2000-06-30  |  4KB  |  154 lines

  1. const
  2.      TRMIN     = 1;
  3.      TRMOUT    = 2;
  4.      PRINTER   = 3;
  5.      ENDFILE   = 26;   {end-of-file char. returned by getc}
  6.      EOS       = 0;
  7.      ENDSTR    = EOS;
  8.      FBUFSIZE  = 1024; {file buffer size, must be multiple of SECTSIZE}
  9.      SECTSIZE  = 128;  {CP/M sector size}
  10.      CASEDIFF  = 32;   { ord('a') - ord('A') }
  11.      MAXSTR    = 82;
  12.      MAXTEXT   = 80;
  13.      IOERROR   = 0;
  14.      IONAVAIL  = IOERROR;
  15.      IOAVAIL   = 7;
  16.      IOREAD    = 2;
  17.      IOWRITE   = 3;
  18.      IOAPPEND  = 4;
  19.      MODEMASK  = $07;
  20.      BINMASK   = $80;
  21.      BINARY    = $80; {this bit set hi in mode byte means no ^Z at end of file}
  22.      MAXOPEN   = 7;
  23.      null      = 0;
  24.      bel       = 7;
  25.      bks       = 8;
  26.      tab       = 9;
  27.      newline   = 10;
  28.      lf           = 10;
  29.      cr           = 13;
  30.      eofchar   = 26; {CP/M end-of-file}
  31.      esc       = 27;
  32.      us           = 31;
  33.      space     = 32;
  34.      exclam    = 33;
  35.      dquote    = 34;
  36.      numsign   = 35;
  37.      dollar    = 36;
  38.      percent   = 37;
  39.      amper     = 38;
  40.      squote    = 39;
  41.      lparen    = 40;
  42.      rparen    = 41;
  43.      star      = 42;
  44.      plus      = 43;
  45.      comma     = 44;
  46.      minus     = 45;
  47.      hyphen    = 45;
  48.      period    = 46;
  49.      slash     = 47;
  50.      DIGIT0    = 48;
  51.      DIGIT1    = 49;
  52.      DIGIT2    = 50;
  53.      DIGIT3    = 51;
  54.      DIGIT4    = 52;
  55.      DIGIT5    = 53;
  56.      DIGIT6    = 54;
  57.      DIGIT7    = 55;
  58.      DIGIT8    = 56;
  59.      DIGIT9    = 57;
  60.      colon     = 58;
  61.      semicol   = 59;
  62.      semicolon = semicol;
  63.      less      = 60;
  64.      equals    = 61;
  65.      greater   = 62;
  66.      question  = 63;
  67.      atsign    = 64;
  68.      CAPA      = 65;
  69.      CAPB      = 66;
  70.      CAPC      = 67;
  71.      CAPD      = 68;
  72.      CAPE      = 69;
  73.      CAPF      = 70;
  74.      CAPG      = 71;
  75.      CAPH      = 72;
  76.      CAPI      = 73;
  77.      CAPJ      = 74;
  78.      CAPK      = 75;
  79.      CAPL      = 76;
  80.      CAPM      = 77;
  81.      CAPN      = 78;
  82.      CAPO      = 79;
  83.      CAPP      = 80;
  84.      CAPQ      = 81;
  85.      CAPR      = 82;
  86.      CAPS      = 83;
  87.      CAPT      = 84;
  88.      CAPU      = 85;
  89.      CAPV      = 86;
  90.      CAPW      = 87;
  91.      CAPX      = 88;
  92.      CAPY      = 89;
  93.      CAPZ      = 90;
  94.      lbrack    = 91;
  95.      backslash = 92;
  96.      rbrack    = 93;
  97.      caret     = 94;
  98.      underline = 95;
  99.      uscore    = underline;
  100.      grave     = 96;
  101.      SMALLA    = 97;
  102.      SMALLB    = 98;
  103.      SMALLC    = 99;
  104.      SMALLD    = 100;
  105.      SMALLE    = 101;
  106.      SMALLF    = 102;
  107.      SMALLG    = 103;
  108.      SMALLH    = 104;
  109.      SMALLI    = 105;
  110.      SMALLJ    = 106;
  111.      SMALLK    = 107;
  112.      SMALLL    = 108;
  113.      SMALLM    = 109;
  114.      SMALLN    = 110;
  115.      SMALLO    = 111;
  116.      SMALLP    = 112;
  117.      SMALLQ    = 113;
  118.      SMALLR    = 114;
  119.      SMALLS    = 115;
  120.      SMALLT    = 116;
  121.      SMALLU    = 117;
  122.      SMALLV    = 118;
  123.      SMALLW    = 119;
  124.      SMALLX    = 120;
  125.      SMALLY    = 121;
  126.      SMALLZ    = 122;
  127.      lbrace    = 123;
  128.      bar       = 124;
  129.      rbrace    = 125;
  130.      tilde     = 126;
  131.      del       = 127;
  132. type
  133.      character = 0..127;
  134.      ctabtype  = array[0..127] of char;
  135.      textline  = array[1..MAXSTR] of character;
  136.      filedesc  = IOERROR..MAXOPEN;
  137.      string80  = string[80]; {internal strings, used to interface w. built-in
  138.                   non-standard procedures, functions }
  139.      fbuf      = array[1..FBUFSIZE] of byte; { file buffer }
  140.      ioblock   = record     { info needed to access one disk i/o channel }
  141.             filevar   :file;
  142.             fbufptr   :^fbuf;
  143.             eofflag   :boolean;
  144.             bufindx   :integer;
  145.             reccnt    :integer;     {record count, used only in read mode}
  146.             lastrec   :integer;     {last record, used only in read mode}
  147.             mode      :byte;
  148.          end;
  149. var
  150.      openlist  :array[1..MAXOPEN] of ioblock;
  151.      chartbl   :ctabtype;
  152.  
  153.  
  154.