Pascal [Rev 3.0M 6/ 4/84] BRDECS.TEXT 28-Jun-89 17:44:12 Page 1 1:D 0 (* sccs info: @(#) brdecs 8.1 84/05/04 00:15:26 *) 2:S 3:D 0 $modcal, debug off, range off, ovflcheck off, stackcheck off, callabs off$ 4:S 5:D 0 (****************************************************************************) 6:D 0 (* *) 7:D 0 (* **** **** **** ***** *** *** *) 8:D 0 (* * * * * * * * * * * * *) 9:D 0 (* * * * * * * * * * *) 10:D 0 (* **** **** * * **** * * *) 11:D 0 (* * * * * * * * * * *) 12:D 0 (* * * * * * * * * * * * *) 13:D 0 (* **** * * **** ***** *** *** *) 14:D 0 (* *) 15:D 0 (****************************************************************************) 16:S 17:D 0 module brdecs; {BOOT ROM declarations} 18:S 19:D 1 export 20:S 21:D 1 const 22:S 23:D 1 (************************************************************************) 24:D 1 (* Read Interface escape codes *) 25:D 1 (************************************************************************) 26:S 27:D 1 ec_no_device = 1; 28:D 1 ec_no_medium = 2; 29:D 1 ec_not_ready = 3; 30:D 1 ec_read_error = 4; 31:D 1 ec_bad_hardware = 5; 32:D 1 ec_bad_error_state = 6; 33:D 1 ec_bus_error = 7; 34:S 35:D 1 type 36:S 37:D 1 (************************************************************************) 38:D 1 (* common type declarations *) 39:D 1 (************************************************************************) 40:S 41:D 1 unsgn4 = 0..15; 42:D 1 unsgn8 = 0..255; 43:D 1 signed8 = -128..127; 44:D 1 signed16 = -32768..32767; 45:D 1 charptr = ^char; 46:D 1 pac10 = packed array[1..10] of char; 47:D 1 string255 = string[255]; 48:S 49:D 1 bools0_31 = packed array[0..31] of boolean; 50:D 1 bools0_63 = packed array[0..63] of boolean; 51:S 52:D 1 flags0_31 = 53:D 1 packed record case boolean of 54:D 1 true: ( i: integer ); 55:D 1 false: ( f: bools0_31); 56:D 1 end; 57:S 58:D 1 flags0_63 = 59:D 1 packed record case boolean of 60:D 1 true: ( i1, i2: integer ); Pascal [Rev 3.0M 6/ 4/84] BRDECS.TEXT 28-Jun-89 17:44:12 Page 2 61:D 1 false: ( f: bools0_63); 62:D 1 end; 63:S 64:D 1 fmt_type = {format field in the msus byte - see equates below} 65:D 1 (f0,f1,f2,f3,f4,f5,f6,f7); 66:S 67:D 1 dev_type = {device field in the msus byte - see equates below} 68:D 1 ( d0, d1, d2, d3, d4, d5, d6, d7, d8, d9,d10,d11,d12,d13,d14,d15, 69:D 1 d16,d17,d18,d19,d20,d21,d22,d23,d24,d25,d26,d27,d28,d29,d30,d31); 70:S 71:D 1 msus_type = {BOOT ROM's mass storage unit specifier} 72:D 1 packed record case integer of 73:D 1 0: {8-bit unit number} 74:D 1 ( fmt: fmt_type; {directory format} 75:D 1 dev: dev_type; {device} 76:D 1 un: unsgn8; {8-bit unit number} 77:D 1 sc: unsgn8; {select code} 78:D 1 ba: unsgn8 {bus address} ); 79:D 1 1: {4-bit volume / 4-bit unit number for CS80 & 7905/06 discs} 80:D 1 ( pad: unsgn8; {format/device byte} 81:D 1 vn4: unsgn4; {4-bit volume number} 82:D 1 un4: unsgn4; {4-bit unit number} ); 83:D 1 2: {32-bit msus} 84:D 1 ( int: integer; ); 85:D 1 end; {msus_type} 86:S 87:D 1 f_area_type = {BOOTROM stolen low RAM area} 88:D 1 record 89:D 1 pad1: packed array[0..9] of char; 90:D 1 booleans: 91:D 1 packed record 92:D 1 bpad: unsgn8; {actually the byte preceeding booleans} 93:D 1 b7,b6, 94:D 1 dma_p, {DMA present flag} 95:D 1 b4,b3,b2,b1,b0: boolean; 96:D 1 end; 97:D 1 iocards: packed array[0..31] of boolean; 98:D 1 mb_ptr: anyptr; 99:D 1 pad2: packed array[20..83] of char; 100:D 1 m_b: {mass storage booleans} 101:D 1 packed record 102:D 1 mb_b7: boolean; {Bit 7} 103:D 1 mb_prom: boolean; 104:D 1 mb_btemp: boolean; 105:D 1 mb_b4: boolean; 106:D 1 mb_current: boolean; 107:D 1 mb_stop: boolean; 108:D 1 mb_lock: boolean; 109:D 1 mb_loop: boolean; {Bit 0: LSB} 110:D 1 mb_bpad: unsgn8; {Byte following booleans} 111:D 1 end; 112:D 1 m_msus: msus_type; {msus passed in init} 113:D 1 m_dirsec: integer; {directory record pointer} 114:D 1 m_dirlen: integer; {directory record counter} 115:D 1 m_dirent: integer; {directory entry counter} 116:D 1 m_filesec: integer; {file starting sector address} 117:D 1 initialized_cntrlrs: packed array[0..31] of char; 118:D 1 m_nodearray: flags0_63; 119:D 1 m_nxtmsus: msus_type; 120:D 1 pad3: packed array[150..159] of char; Pascal [Rev 3.0M 6/ 4/84] BRDECS.TEXT 28-Jun-89 17:44:12 Page 3 121:D 1 accessed_units: packed array[0..511] of char; 122:D 1 m_gscsearched: flags0_31; 123:D 1 end; Pascal [Rev 3.0M 6/ 4/84] BRDECS.TEXT 28-Jun-89 17:44:12 Page 4 124:D 1 $page$ 125:S 126:D 1 const 127:S 128:D 1 (************************************************************************) 129:D 1 (* common const declarations *) 130:D 1 (************************************************************************) 131:S 132:D 1 { msus format field assignments } 133:S 134:D 1 LIF = f0; {HP Corporate Logical Interchange Format} 135:D 1 MDF = f1; {HP Mid-range Disc Format} 136:D 1 Unix = f2; {HP Unix Format} 137:D 1 Special = f7; {currently includes ROM, Ganglia} 138:S 139:S 140:D 1 { msus device field assignments for formats other than Special } 141:S 142:D 1 mini = d0; {9826/36 internal 5.25" minifloppy} 143:D 1 { d1,d2,d3 reserved internal} 144:D 1 HP9895 = d4; {9895 8" floppy / 913X 5.25" micro-winchester (HP-IB)} 145:D 1 HP8290X = d5; {82900 series 5.25" minifloppy (HP-IB)} 146:D 1 HP9885 = d6; {9885 8" floppy (GPIO)} 147:D 1 HP913X_A = d7; {913X A 5-megabyte 5.25" micro-winchester (HPIB)} 148:D 1 HP913X_B = d8; {913X B 10-megabyte 5.25" micro-winchester (HPIB)} 149:D 1 HP913X_C = d9; {913X C 15-megabyte 5.25" micro-winchester (HPIB)} 150:D 1 HP7905 = d10; {7905 hard disc (HPIB)} 151:D 1 HP7906 = d11; {7906 hard disc (HPIB)} 152:D 1 HP7920 = d12; {7920 hard disc (HPIB)} 153:D 1 HP7925 = d13; {7925 hard disc (HPIB)} 154:S 155:D 1 CS80_256 = d16; {Command Set '80 devices with 256-byte blocks (HPIB)} 156:D 1 CS80_other = d17; {all other Command Set '80 devices (HPIB)} 157:S 158:D 1 EPROM = d20; {EPROM card} 159:S 160:D 1 Bubbles = d22; {Bubbles card} 161:S 162:D 1 Unknown = d31; {used while scanning before device type is known} 163:S 164:S 165:D 1 { card ID equates } 166:S 167:D 1 null_sc = -1; {fake ID; null select code} 168:D 1 no_card = 0; {fake ID; no card present} 169:D 1 hp98624 = 1; {external HPIB} 170:D 1 hp98626 = 2; {serial} 171:D 1 hp98622 = 3; {gpio} 172:D 1 hp98625 = 8; {Simon (PHI) HPIB} 173:D 1 hp98628 = 20; {datacom} 174:D 1 intHPIB = 32; {fake ID; actually has no real ID of its own} Pascal [Rev 3.0M 6/ 4/84] BRDECS.TEXT 28-Jun-89 17:44:12 Page 5 175:D 1 $page$ 176:S 177:D 1 var 178:S 179:D 1 (************************************************************************) 180:D 1 (* global variables *) 181:D 1 (************************************************************************) 182:S 183:D 1 ndrives[-296]: {Maximum Unit for Internal Mini-Floppy} 184:D 1 packed record b: signed8; end; 185:S 186:D 1 f_area[-300]: {pointer to BOOTROM's stolen low RAM area} 187:D 1 ^f_area_type; 188:S 189:D 1 fubuffer[-558]: {256 byte general purpose buffer} 190:D 1 packed array[0..255] of char; 191:S 192:D 1 implement {brdecs} 193:S 194:C 1 end. {brdecs} 195:S 196:S No errors. No warnings. ***** Nonstandard language features enabled *****