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