Trailing-Edge
-
PDP-10 Archives
-
BB-4170G-SM
-
sources/phypar.mac
There are 53 other files named phypar.mac in the archive. Click here to see a list.
;<3A-NEW>PHYPAR.MAC.4, 31-May-78 09:26:54, Edit by FORTMILLER
;<FORTMILLER>PHYPAR.MAC.3, 24-May-78 14:57:15, Edit by FORTMILLER
;ADD CHARACTERISTICS WORD TO UDB - UDBCHR
; AND DX20 SUPPORT
;<3A.MONITOR>PHYPAR.MAC.2, 15-May-78 14:35:36, Edit by MCLEAN
;<3A.MONITOR>PHYPAR.MAC.1, 19-Apr-78 02:28:35, Edit by MCLEAN
;ADD TY.T78 (TM78)
;<2BOSACK>PHYPAR.MAC.58, 24-Feb-78 01:09:25, EDIT BY BOSACK
;RENAME DATA AND DEVICE ERROR BITS IN IORB
;<1MCLEAN>PHYPAR.MAC.57, 27-Jan-78 16:48:20, Edit by MCLEAN
;ENLARGE INTERRUPT STACK FOR CALL TO ALLOCATE FREE SPACE
;<3-MONITOR>PHYPAR.MAC.55, 9-Nov-77 09:56:50, EDIT BY KIRSCHEN
;MORE COPYRIGHT UPDATING...
;<3-MONITOR>PHYPAR.MAC.54, 10-Oct-77 14:11:16, EDIT BY KIRSCHEN
;UPDATE COPYRIGHT FOR RELEASE 3
;<2BOSACK>PHYPAR.MAC.53, 15-Sep-77 05:12:42, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.52, 6-Sep-77 04:15:55, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.51, 6-Sep-77 01:24:53, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.50, 5-Sep-77 06:49:21, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.49, 5-Sep-77 05:29:40, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.48, 4-Sep-77 02:43:21, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.47, 3-Sep-77 23:57:38, EDIT BY BOSACK
;ADD KDB ACTIVE FLAG, EXPAND CHAN/UNI TYPE FIELD
;<3-MONITOR>PHYPAR.MAC.46, 12-Aug-77 11:15:50, Edit by MCLEAN
;ADD RM03 DRIVE TYPE
;<2BOSACK>PHYPAR.MAC.45, 5-Jul-77 02:50:09, EDIT BY BOSACK
;ADD CELL FOR READ SEEK PREFERENCE
;<3-MONITOR>PHYPAR.MAC.44, 16-Jun-77 14:15:22, Edit by MCLEAN
;ADD .CTRH3 RH11
;<2BOSACK>PHYPAR.MAC.43, 28-Apr-77 17:19:11, EDIT BY BOSACK
;INCREASE INTERRUPT PDL TO ALLOW MORE COMPLEX ACTIONS IN DONE RTN
;<2BOSACK>PHYPAR.MAC.42, 2-Apr-77 19:53:29, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.41, 1-Apr-77 20:32:43, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.40, 1-Apr-77 20:16:49, EDIT BY BOSACK
;ADD BLOCK TYPE CODES, DEFINE TM03 TYPES
;<3-MONITOR>PHYPAR.MAC.38, 27-Dec-76 17:36:06, EDIT BY HURLEY
;<3-MONITOR>PHYPAR.MAC.37, 27-Dec-76 17:28:14, EDIT BY HURLEY
;<2BOSACK>PHYPAR.MAC.36, 19-Dec-76 21:39:36, EDIT BY BOSACK
;TCO 1684 - ADD CELL FOR HOME BLOCK CHECKER
;<2BOSACK>PHYPAR.MAC.35, 14-Dec-76 11:47:15, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.34, 13-Dec-76 15:55:56, EDIT BY BOSACK
;<1MCLEAN>PHYPAR.MAC.34, 24-Nov-76 21:25:04, Edit by MCLEAN
;TCO 1669 EXTENDED ADDRESSING
;<2BOSACK>PHYPAR.MAC.33, 1-Nov-76 20:31:44, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.32, 29-Jul-76 15:11:00, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.31, 27-Jul-76 23:08:56, EDIT BY BOSACK
;<2BOSACK>PHYPAR.MAC.30, 27-Jul-76 23:06:14, EDIT BY BOSACK
;FIRST HACK AT LATENCY OPTIMIZATION
;<1B-MONITOR>PHYPAR.MAC.29, 3-MAY-76 11:39:17, EDIT BY BOSACK
;<1B-MONITOR>PHYPAR.MAC.28, 13-APR-76 19:32:49, EDIT BY BOSACK
;TCO 1270 - ADD RP05/6 SUPPORT
;<2MONITOR>PHYPAR.MAC.27, 30-MAR-76 03:11:24, EDIT BY BOSACK
;<2MONITOR>PHYPAR.MAC.26, 30-MAR-76 02:56:09, EDIT BY BOSACK
;<2MONITOR>PHYPAR.MAC.25, 13-FEB-76 16:12:26, EDIT BY BOSACK
;TCO 1091 - FIX SINGLE UNIT ASSIGN IN DIAG
;<2MONITOR>PHYPAR.MAC.24, 29-JAN-76 16:30:37, EDIT BY BOSACK
;<2MONITOR>PHYPAR.MAC.23, 29-JAN-76 15:58:57, EDIT BY BOSACK
;MCO 40
;<2MONITOR>PHYPAR.MAC.22, 23-JAN-76 17:55:12, EDIT BY BOSACK
;MCO 22 - FIX COMMENTS ON UDBRED/WRT
;<2MONITOR>PHYPAR.MAC.21, 19-JAN-76 12:24:18, EDIT BY MURPHY
;<2MONITOR>PHYPAR.MAC.20, 29-DEC-75 16:45:23, EDIT BY HURLEY
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976, 1977, 1978 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
UNIVERSAL PHYPAR - UNIVERSAL FOR PHYSIO AND ASSOCIATED MODULES
SUBTTL L.BOSACK/T.HESS 16-MAY-75
SALL
SEARCH MONSYM,MACSYM
SUBTTL CHANNEL DATA BLOCK
CDBINT==-6 ;JSR TO HERE IF VECTOR DEVICE
;CDBINT+1 CONTAINS MOVEM P1,.+2+CDBSVQ
;CDBINT+2 CONTAINS XPCW PHYINT
CDBSTS==0 ;STATUS AND CONFIGURATION INFORMATION
CDBMBW==1 ;MEMORY BANDWIDTH SCHEDULING INFORMATION
CDBODT==2 ;OVERDUE TIMER WHEN DATA XFR ACTIVE
CDBICP==3 ;EXEC VIRTUAL ADDR OF INAD/ICCW
CDBIUN==4 ;INITIAL AOBJN PTR TO UDB TABLE
CDBCUN==5 ;CURRENT AOBJN PTR TO UDB TABLE
CDBDSP==6 ;UNIT UTILITIES DISPATCH,,MAIN ENTRY DISPATCH
CDBFCT==7 ;FAIRNESS COUNT FOR LATENCY
CDBPAR==10 ;CHANNEL MEMORY PARITY ERRORS
CDBNXM==11 ;CHANNEL NXMS
CDBXFR==12 ;CURRENTLY TRANSFERRING UDB
CDBCCL==13 ;3 WORD BLOCK, CHANNEL COMMAND LIST
CDBUDB==16 ;UDB TABLE - 8 WORDS
CDBSVQ==26 ;P1 SAVED HERE ON VECTOR INTERRUPT ENTRY
CDBJEN==27 ;INTERRUPT DISMISS (3 WORDS)
;CDBJEN CONTAINS BLT 17,17
;CDBJEN+1 CONTAINS DATAO RH,CDBRST
;CDBJEN+2 CONTAINS JEN @CDBINT
CDBRST==32 ;LOC USED BY CDBJEN
CDBCNI==33 ;CHANNEL CONI AT START OF INTERRUPT
CDBONR==34 ;FORK WHO HAS CHANNEL IN MAINT MODE
CDBADR==35 ;NUMBER OF THIS CHANNEL (CHNTAB INDEX)
CDBCS0==36 ;CHAN STATUS 0 AT ERROR
CDBCS1==37 ;CHAN STATUS 1
CDBCS2==40 ;CHAN STATUS 2
CDBCC1==41 ;FIRST CCW
CDBCC2==42 ;SECOND CCW
CDBOVR==43 ;NUMBER OF OVERRUNS
CDBICR==44 ;INITIAL STCR WHEN DEVICE STARTED
CDBCL2==45 ;3 WD BLOCK, ALTERNATE CCW LIST
CDBDDP==50 ;START OF DEVICE DEPENDENT CDB
;BITS AND BYTES
;CDBSTS
CS.OFL==1B0 ;OFFLINE
CS.AC1==1B1 ;PRIMARY COMMAND ACTIVE
CS.AC2==1B2 ;SECONDARY COMMAND ACTIVE
CS.ACT==CS.AC1!CS.AC2 ;ANY ACTIVE
CS.MAI==1B3 ;CHANNEL IS IN MAINT MODE
CS.MRQ==1B4 ;MAINT MODE REQUESTED FOR SOME UNIT
CS.ERC==1B5 ;ERROR RECOVERY IN PROGRESS
CS.STK==1B6 ;CHANNEL SUPPORTS COMMAND STACKING
CS.ACL==1B7 ;ALTERNATE CCW LIST IS CURRENT
CSSTYP==SIZ.UT ;SIZE OF TYPE FIELD
CSPTYP==^D35 ;POSITION OF TYPE FIELD
CSSPIA==3 ;SIZE OF PIA FIELD
CSPPIA==XSPTYP-XSSTYP ;POSITION OF PIA FIELD
;CHANNEL SERVICE ROUTINE MAIN ENTRY DISPATCH
CDSINI==0 ;INITIALIZE AND BUILD DATA STRUCTURE
CDSSTK==1 ;STACK SECOND CHANNEL COMMAND, SKIP IF OK
CDSSIO==2 ;START IO, SKIP IF STARTED OK.
CDSPOS==3 ;DO POSITIONING TO IDLE UNIT, SKIP IF OK.
CDSLTM==4 ;RETURN LATENCY AND BEST REQUEST
CDSINT==5 ;INTERRUPT ENTRY
CDSCCW==6 ;GENERATE SINGLE CCW ENTRY
CDSHNG==7 ;HUNG RESET
CDSRST==10 ;RESET CHANNEL AND ALL DEVICES, ON RESTART
CDSCHK==11 ;PERIODIC CHECK ENTRY, CHECK PIA, ETC.
;CALLING SEQUENCES
;THE P&Q ACS ARE ASSUMED PRESERVED UNLESS STATED OTHERWISE.
;THE T ACS ARE ASSUMED DESTROYED UNLESS STATED OTHERWISE.
;INPUT ARGUMENTS ARE THOSE ACS WHICH MUST BE SETUP FOR THE CALL.
;OUTPT ARGUMENTS ARE THOSE ACS WHICH WILL BE SET TO A SPECIFIED VALUE
;BY THE CALL.
;ENTRY INPUT OUTPUT ;COMMENTS
;INI P4 P4 ;TAKES FIRST FREE CHAN # IN P4, UPDATES P4
; ;CAN CLOBBER ALL OTHER ACS
;PRQ P4,P1,3 P4,P1,3 ;SKIPS IF THE IORB IN P4 REQUIRES POSITIONING
; ;BEFORE TRANSFER CAN BE DONE
;SIO P4,P1,3 P4,P1,3 ;STARTS IO ON THE IORB IN P4. SKIPS IF START OK
;POS P4,P1,3 ;STARTS POSITIONING TO THE CYL OF THIS IORB.
; ;SKIPS IF SEEK STARTED OK.
;LTM T1,P1,3 ;RETURNS THE BEST IORB TO XFR ON THIS UNIT.
; T1,2,3 ;T1/ TIME TO GO IN USEC,T2/ PREDECESSOR IORB, T3/ IORB
;INT P1 P4,P3 ;CALLED ON AN INTERRUPT FOR THE CDB IN P1.
; ;RETURNS:P4/ 0=EXIT INTERRUPT,-1=DO SCHED CYCLE
; ; POSITIVE=IORB COMPLETED
;CCW T1,2, T1 ;BUILDS A SINGLE CCW FOR THE CHAN IN P1
; P1 ;T1/ DATA MODE,,BYTE COUNT (1B0 IF BACKWARDS XFR)
; ;T2/ PHYSICAL MEM ADDR. RETURNS CCW IN T1
SUBTTL KONTROLLER DATA BLOCK (TM02/3, DX20 ONLY)
KDBSTS==0 ;FLAGS, UNIT TYPE
KDBIUN==1 ;INITIAL AOBJN WORD TO UDB TABLE
KDBCUN==2 ;CURRENT AOBJN WORD TO UDB TABLE
KDBDSP==3 ;DISPATCH FOR SERVICE RTN
KDBDDP==4 ;START OF DEVICE DEPENDENT PART
KDBUDB==KDBDDP ;THE BLOCK FOR UDB ADDRESSES STARTS
; AT THE DEVICE DEPENDENT PORTION
; SINCE THERE CAN BE ONLY 8 UNITS
; ON A TM02/TM03 AND THERE CAN
; BE UP TO 16 UNITS ON A DX20/TX02
;BITS AND BYTES
;KDBSTS
KS.ACT==1B1 ;ACTIVE
SUBTTL UNIT DATA BLOCK
UDBSTS==0 ;STATUS AND CONFIGURATION INFORMATION
UDBMBW==1 ;MEMORY BANDWIDTH SCHEDULING INFORMATION
UDBODT==2 ;OVERDUE TIMER FOR SEEKS AND THE LIKE
UDBERR==3 ;ERROR RECOVERY STATE WORD
UDBERP==4 ;ERROR REPORTING WORK AREA IF NONZERO
UDBDSP==5 ;UNIT ROUTINE MAIN ENTRY DISPATCH
UDBCDB==6 ;SECONDARY,,PRIMARY CDB
UDBADR==7 ;SECONDARY,,PRIMARY ADDRESS OF UNIT ON CHANNEL
UDBAKA==10 ;CURRENT CDB,,CURRENT CHAN ADDR
UDBVID==11 ;VOLUME ID
UDBSTR==12 ;POINTER TO STR DATA BLOCK
UDBKDB==13 ;POINTER TO KDB, IF ANY
UDBDSN==14 ;DRIVE SERIAL NUMBER
UDBSEK==15 ;SEEKS
UDBRED==16 ;READS - SECTORS IF DISK, FRAMES IF TAPE
UDBWRT==17 ;WRITES - SECTORS IF DISK, FRAMES IF TAPE
UDBSRE==20 ;SOFT READ ERRORS
UDBSWE==21 ;SOFT WRITE ERRORS
UDBHRE==22 ;HARD READ ERRORS
UDBHWE==23 ;HARD WRITE ERRORS
UDBPS1==24 ;CURRENT CYL IF DISK,FILE IF TAPE
UDBPS2==25 ;CURRENT SECTOR WITHIN CYL IF DISK, RECORD IN FILE IF TAPE
UDBPWQ==26 ;POSITION WAIT QUEUE - TAIL,,HEAD
UDBTWQ==UDBPWQ+1 ;TRANSFER WAIT QUEUE - TAIL,,HEAD
UDBONR==30 ;FORK WHO OWNS THIS UNIT (MAINT MODE)
UDBERC==31 ;CURRENT RETRY COUNT
UDBSPE==32 ;SOFT POSITIONING ERROR
UDBHPE==33 ;HARD POS ERR
UDBPNM==34 ;PROGRAM NAME TO LOG ON ERROR
UDBUDR==35 ;USER DIRECTORY NUMBER TO LOG ON ERROR
UDBSIZ==36 ;UNIT SIZE (NUMBER OF CYLINDERS)
UDBFCT==37 ;SEEK FAIRNESS COUNT
UDBCHB==40 ;IORB USED BY HOME BLOCK CHECK
UDBFCR==41 ;FAIRNESS COUNT FOR READ SEEK PREF
UDBSLV==42 ;SLAVE NUMBER IF TAPE
UDBCHR==43 ;CHARACTERISTICS WORD
UDBDDP==44 ;DEVICE DEPENDENT PART
;BITS AND BYTES
;UDBSTS
US.OFS==1B0 ;OFFLINE OR UNSAFE
US.CHB==1B1 ;CHECK HOME BLOCKS BEFORE ANY NORMAL IO
US.POS==1B2 ;POSITIONING IN PROGRESS
US.ACT==1B3 ;ACTIVE
US.BAT==1B4 ;ON IF BAD BAT BLOCKS ON THIS UNIT
US.BLK==1B5 ;LOCK BIT FOR THIS UNITS BAT BLOCKS
US.PGM==1B6 ;DUAL PORT SWITCH IN (A OR B) (RP04,5,6)
US.MAI==1B7 ;UNIT IS IN MAINT MODE
US.MRQ==1B8 ;MAINT MODE IS REQUESTED ON THIS UNIT
US.BOT==1B9 ;UNIT IS AT BOT
US.REW==1B10 ;UNIT IS REWINDING
US.WLK==1B11 ;UNIT IS WRITE LOCKED
US.MAL==1B12 ;MAINT MODE ALLOWED ON THIS UNIT
US.OIR==1B13 ;OPERATOR INTERVENTION REQUIRED.
;SET AT INTERRUPT LEVEL, CHECKED AT SCHED.
US.OMS==1B14 ;ONCE A MINUTE MESSAGE TO OPR. USED IN
;CONJUNCTION WITH US.OIR
US.PRQ==1B15 ;POSITIONING REQUIRED ON THIS UNIT
US.TAP==1B16 ;TAPE TYPE DEVICE
US.IDB==1B17 ;TAPE - IDB SEEN ON PREVIOUS OPERATION
USSTYP==SIZ.UT ;UNIT TYPE FIELD SIZE
USPTYP==^D35 ;UNIT TYPE FIELD POSITION
DEFSTR (USTYP,UDBSTS,USPTYP,USSTYP) ;UNIT TYPE IN UDBSTS
MSKSTR (USOFL,UDBSTS,US.OFS) ;UNIT OFFLINE
;UDBCHR
UC.7TK==1B0 ;7 TRACK TAPE DRIVE
;DENSITYS DRIVE IS CAPABLE OF
UC.200==1B1 ;200 BPI
UC.556==1B2 ;556 BPI
UC.800==1B3 ;800 BPI
UC.160==1B4 ;1600 BPI
UC.625==1B5 ;6250 BPI
;DATA MODES DRIVE IS CAPABLE OF
UC.CD==1B6 ;CORE DUMP MODE
UC.6B==1B7 ;SIXBIT MODE
UC.AA==1B8 ;ANSI ASCII MODE
UC.IC==1B9 ;INDUSTRY COMPATIBLE MODE
UC.HD==1B10 ;HI-DENSITY MODE
;UNIT ROUTINE MAIN ENTRY POINTS
UDSINI==0 ;INITIALIZE
UDSSIO==1 ;START IO,SKIPS IF OK.
UDSINT==2 ;INTERRUPT ROUTINE
UDSERR==3 ;ERROR RECOVERY,SKIP IF DONE.
UDSHNG==4 ;HUNG RESET
UDSCNV==5 ;CONVERT LINEAR ADDR TO CYL,SURF,SEC
UDSLTM==6 ;RETURN LATENCY/BEST REQUEST
UDSPOS==7 ;START POSITION,SKIP IF OK.
UDSATN==10 ;ATTENTION INTERUPT
UDSPRQ==11 ;SKIP IF POSITIONING REQUIRED
UDSSTK==12 ;STACK SECOND COMMAND, SKIP IF OK
;CALLING SEQUENCES
;ENTRY INPUT OUTPUT ;COMMENTS
;INI P1,Q2 P2,3 ;CALLED ONCE PER UNIT. Q2/ UNIT NUMBER
; ;Q3/ SUBUNIT # IF GT 1 SUBUNITS
; ;RETURNS UDB IN P3,MAY RETURN KDB IN P2.
;SIO P4,P1,3 ;STARTS IO ON AN IORB. SKIPS IF OK.
;INT P1,P3 ;CALLED ON INTERRUPT FOR XFR DONE.
;ERR P4,P1,3 ;INITIATE ERROR RETRY. SKIPS IF NO MORE RETRYS.
;HNG P1,3 ;CALLED FROM TIMER TO RESET HUNG DEVICE.
;CNV T1,P1,3 T1,2,3 ;CONVERTS FROM UNIT LINEAR ADDR TO CYL,SURF,SEC
; ;T1/ LINEAR ADDR, ON RETURN: T1/ SAME, T2/CYL,T3/SURF,,SEC
;LTM P1,3 T1,2,3 ;SEE CDSLTM
;POS P4,P1,3 ;START POSITIONING ON IORB. SKIPS IF OK
;ATN P1,3,Q1 P4,2 ;CALLED ON DRIVE ATTENTION INTERRUPT.
; ;RETURNS P4=0 IF NO ERRORS (SEEK ERRORS)
; ;SETS LH(Q1) TO -1 IF IORB POSITION DONE
; ;NOTE: TAPE SHOULD RETURN P4=0, Q1 UNCHANGED
SUBTTL IO REQUEST BLOCK
IRBSTS==0 ;STATUS,, NEXT IORB
IRBLNK==0 ;WHEN REFERING TO LINK
IRBMOD==1 ;PRIO,DENSITY,PAR,MORE
IRBCNT==2 ;COUNT OF DATA TRANSFERRED
IRBXFL==3 ;XFR LIST TAIL,,HEAD
IRBIVA==4 ;SIO EXIT,,ROUTINE TO CALL ON TERMINATION
IRBADR==5 ;PHYSICAL DEVICE ADDRESS (IF NEEDED)
IRBLEN==:6 ;LENGTH OF IORB
;STRUCTURE DEFINITIONS FOR THE IORB
DEFSTR (IRLNK,IRBLNK,35,18) ;LINK TO NEXT IORB
DEFSTR (IRBHD,IRBXFL,35,18) ;POINTER TO HEAD OF TRANSFER LIST
DEFSTR (IRBTL,IRBXFL,17,18) ;POINTER TO TAIL OF TRANSFER LIST
;FUNCTIONS, POINTER IRYFCN
ISSFCN==4 ;FUNCTION CODE SIZE
ISPFCN==^D17 ;POSITION IN IRBSTS
DEFSTR (ISFCN,IRBSTS,ISPFCN,ISSFCN) ;FUNCTION CODE IN IORB
IRFRED==1 ;READ DATA
IRFRDF==2 ;READ DATA AND FORMAT (COUNT, KEY, HEADER)
IRFWRT==3 ;WRITE DATA
IRFWTF==4 ;WRITE FORMAT
IRFSEK==5 ;SEEK
IRFFSB==6 ;FORWARD SPACE BLOCK
IRFBSB==7 ;BACKSPACE BLOCK
IRFWTM==10 ;WRITE TAPE MARK
IRFERG==11 ;ERASE GAP
IRFREW==12 ;REWIND
IRFRUN==13 ;REWIND AND UNLOAD
IRFRDR==14 ;READ REVERSE
IRFRCR==15 ;RECOVERY READ
;MODES
IMSMOD==3 ;SIZE OF MODE WHAT
IMPMOD==^D17 ;POSITION OF MODE FIELD
DEFSTR (IRBDM,IRBMOD,IMPMOD,IMSMOD) ;DATA MODE
IRBSDN==4 ;SIZE OF DENSITY FIELD
DEFSTR (IRBDN,IRBMOD,35,IRBSDN) ;DENSITY FIELD
DEFSTR (IRBPAR,IRBMOD,31,1) ;PARITY BIT
DEFSTR (IRBPRI,IRBMOD,30,4) ;PRIORITY FIELD
IRMWRD==1 ;WORD MODE
IRM6BT==2 ;SIXBIT
IRM7BT==3 ;SEVEN BIT MODE
IRM8BT==4 ;EIGHT BIT MODE
IRMHID==5 ;HIGH DENSITY MODE
IRMMAX==5 ;MAXIMUM LEGAL MODE
;BITS AND BYTES
;LH IRBSTS
IS.SHT==1B0 ;SHORT FORM (PAGEM) REQUEST
IS.DON==1B1 ;DONE WITH THIS IORB
IS.ERR==1B2 ;ERROR ON THIS OPERATION
IS.NRT==1B3 ;NO MORE RETRIES
IS.WGU==1B4 ;WRONG UNIT INTERRUPTED
IS.TPM==1B5 ;HIT TAPE MARK
IS.EOT==1B6 ;ON WRITE ONLY: HIT PHYSICAL EOT
IS.WLK==1B7 ;WRITE LOCKED
IS.IER==1B8 ;INHIBIT ERROR RECOVERY
IS.DTE==1B9 ;DATA ERROR
IS.DVE==1B10 ;DEVICE (HARDWARE) ERROR
IS.BOT==1B11 ;HIT BEGINING OF TAPE
IS.RTL==1B12 ;RECORD TOO LONG (BUFFER TOO SMALL?)
IS.IEL==1B13 ;INHIBIT ERROR LOGGING
IS.ALE==IS.ERR!IS.NRT!IS.WGU!IS.DTE!IS.DVE!IS.RTL ;ALL ERROR BITS
MSKSTR (ISERR,IRBSTS,IS.ERR) ;ERROR ON THIS OPERATION
MSKSTR (ISTPM,IRBSTS,IS.TPM) ;TAPE MARK HIT
SUBTTL PARAMETERS - USUALLY DETERMINE MAXIMUM # OF DEVICES
PZSSIZ==20 ;PAGE ZERO STORAGE
CHNN==^D8 ;MAXIMUM NUMBER OF CHANNELS
MAXRH==10 ;MAXIMUM NUMBER OF UNITS ON RH20
NUIORB==6 ;NUMBER OF IORBS FOR UDSKIO MUST BE GE 2
UIOLEN==IRBLEN+2 ;LENGTH OF FREE STG BLOCK IN IORB POOL
LPHYPD==55 ;PRIVATE PDL
LPHIPD==60 ;INTERRUPT PDL
SUBTTL MACRO DEFINITIONS
;PI SYSTEM CONTROL
PHYCHN==:5 ;CHANNEL FOR PHYSIO DEVICES
DEFINE IOPIOF<
CHNOFF PHYCHN
>
DEFINE IOPION<
CHNON PHYCHN
>
SUBTTL TYPE CODES
;BLOCK TYPES
SIZ.UT==5 ;CHANNEL/UNIT TYPE CODE SIZE
XSSTYP==2 ;SIZE OF BLOCK TYPE FIELD
XSPTYP==^D35-SIZ.UT ;POSITION OF BLOCK TYPE FIELD
.BTCDB==1 ;CDB
.BTKDB==2 ;KDB
.BTUDB==3 ;UDB
;CHANNEL TYPES
.CTRH1==1 ;RH10
.CTRH2==2 ;RH20
.CTRH3==3 ;RH11
;UNIT TYPES
.UTRP4==1 ;RP04
.UTRS4==2 ;RS04
.UTT45==3 ;TU45
.UTTM2==4 ;TM02 (AS UNIT)
.UTRP5==5 ;RP05
.UTRP6==6 ;RP06
.UTRP7==7 ;RP07
.UTRP8==10 ;RP08
.UTRM3==11 ;RM03
.UTTM3==12 ;TM03
.UTT77==13 ;TU77
.UTTM7==14 ;TM78
.UTT78==15 ;TU78
.UTDX2==16 ;DX20
.UTT70==17 ;TU70 (800/1600 200IPS 9TRK)
.UTT71==20 ;TU71 (200,556,800 200IPS 7TRK)
.UTT72==21 ;TU72 (1600/6250 125IPS 9TRK)
.UTT73==22 ;TU7x (1600/6250 200IPS 9TRK)
;DO NOT REORDER .UTT70 - 3 WITHOUT
; ALSO REORDERING TABLES IN PHYX2
;MASS BUSS DEVICE TYPES
TY.RP4==020 ;RP04
TY.RP5==021 ;RP05
TY.RP6==022 ;RP06
TY.RM3==24 ;RM03
TY.RPL==TY.RP4 ;LOWEST "RP04" TYPE
TY.RPH==TY.RM3 ;HIGHEST "RP04" TYPE
TY.RS4==002 ;RS04 DRIVE TYPE
TY.T2L==010 ;LOWEST TM02 TYPE
TY.T2H==017 ;HIGHEST TM02 TYPE
TY.T3L==050 ;LOWEST TM03 TYPE
TY.T3H==057 ;HIGHEST TM03 TYPE
TY.DX2==060 ;DX20 DRIVE TYPE
TY.T78==100 ;TM78
END