;.MCALL .MODULE ;.MODULE RESPFX,VERSION=12,COMMENT=,TITLE=NO,IDENT=NO ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. ;++ ; ; Edit Who Date Description of modification ; ---- --- ---- --------------------------- ; 001 WLD 06-APR-90 Added symbols for PDP-11/93 ; and PDP-11/94. ; Removed unused 5.5 symbols ; RAD5SJ, RAD5FB, and RAD5XM. ; 002 WLD 16-NOV-90 Eliminate C1.SJFB definition ; (FBMON$). ; 003 WLD 20-NOV-90 Define CF3.VB in $CNFG3 to ; support showing: ; RUN is set [NO]VBGEXE ; in RESCNF. ;-- ; Edit History: ; 001 George Stevens Overlaid version of RESORC. Created from RESORC ; Version 97 ; 002 George Stevens Added MUID for SHOW DEVICE:MU command ; 003 George Stevens Add offsets for installable status of devices ; 004 George Stevens Added new RCB definitions for CACHE bypass ; 005 George Stevens Add RMON offset for $SLOT2 ; ; (008) 16-Jul-90 Added definition for word in fixed offset area ; MBG which points to the multi-terminal handler hooks ; data structure ; (010) 10-Sep-90 MBG Added definition for EMT error code which indicates ; a terminal line is owned by a handler .SBTTL MACRO definitions .ENABL LC,GBL .MCALL .CLOSE, .CSISPC,.DATE, .DSTATU,.ENTER, .EXIT, .PROTECT .MCALL .FETCH, .GTIM, .GTJB, .HERR, .LOOKUP,.MFPS, .RELEASE .MCALL .MTSTAT,.MTATCH,.MTDTCH,.MTGET, .PRINT, .PURGE, .RCTRLO .MCALL .READW, .REOPEN,.SAVEST,.SERR, .SETTOP,.WRITW, .TRPSET .MCALL .GVAL, .SPFUN, .SCCA, .UNPROTECT,.CHAIN .MCALL ...CMZ ...CMY .Assume ;+ ; This macro generates calls to the error message processor. The ; arguments are: ; NAME - the 3 character name of the error message, as defined ; by macro MSG. ; LEVEL - the level of error. Only the first character is used. ; RETURN- 'YES' or 'NO'. 'YES' implies return to the next instruction ; after giving the error. Anything else implies that the ; program should be restarted. ; FILE - the address of a device/filename block in RAD50 which is ; to be printed following the error message. ;- .MACRO $ERROR NAME,LEVEL,RETURN,FILE JSR R5,ERROR .IF B FILE .BYTE 'NAME'... .IFF ;B FILE .BYTE 'NAME'...+1 .ENDC ;B FILE ...X.. = 0 ...... = 0 .IRPC ..X..., .IF EQ ...... .IIF IDN ..X..., ...X.. = 200 ...... = 1 .ENDC ;EQ ...... .ENDM ...... = 0 .IRPC ..X..., .IF EQ ...... .BYTE ...X..+''..X... ...... = 1 .ENDC ;EQ ...... .ENDM .IF NB FILE .WORD FILE .ENDC ;NB FILE .ENDM $ERROR ;+ ; This macro causes registers 3-5 to be saved thru co-routine $SAVRG. ;- .MACRO .SAVRG JSR R5,$SAVRG .ENDM .SAVRG ;+ ; This macro emulates the equivalent of a "jump if equal" instruction. ;- .MACRO JEQ PLACE BNE .+6 CALLR PLACE .ENDM ;+ ;CG01+ ; This macro generates calls to the formatting routine. The arguments ; are: ; BUFFER - a pointer to an output buffer. If not specified, ; R0 is assumed to point the output buffer. ; PICTUR - an ASCII string enclosed in '<>', containing the ; format string and/or formatting directives. See ; comments in file RESRC1.MAC. ; ARGUMENTS- values contained in '<>' to satisfy any formatting ; directives. SP addressing is not valid. ;- .MACRO FORMAT BUFFER,PICTUR,ARGUMENTS,LAB1 .IF NB PSECT $$$FMT ...FMT = . .ASCIZ \PICTUR\ PSECT * .ENDC ...ARG = 0 ..ARGC = 0 .IRP ARG, ..ARGC = ..ARGC +1 .ENDM ..LOOP = ..ARGC .REPT ..ARGC ..LOP1 = ..LOOP .IRP ARG, ..LOP1 = ..LOP1 -1 .IF EQ ..LOP1 MOV ARG,-(SP) ...ARG = ...ARG +1 .ENDC .ENDM ..LOOP = ..LOOP -1 .ENDR .IF NB MOV #...FMT,-(SP) .IFF .IF NB LAB1 MOV LAB1,-(SP) .IFF .ERROR ;No FORMAT string specified .ENDC .ENDC ...ARG = ...ARG +1 MOV #<...ARG*2>,-(SP) .IF NB BUFFER MOV BUFFER,R0 .ENDC .GLOBL $FORMAT CALL $FORMAT .ENDM FORMAT .MACRO UNORG .ENDM UNORG .MACRO ORIGIN SECT,LIST .MACRO UNORG .LIST BEX PSECT SECT, .ENDM UNORG PSECT , .NLIST BEX .ENDM ORIGIN .MACRO PSECT SECT,LIST .LIST BEX .IF IDN SECT,<*> UNORG .NLIST BEX .MEXIT .IFF .IF NB .PSECT SECT,LIST .IFF .PSECT SECT .ENDC .ENDC .NLIST BEX .ENDM PSECT ;+ ; This macro generates the error message text and sets up some symbol ; definitions and a table of pointers to the error messages. The ; arguments are: ; NAME - the 3 character name of the error message. ; ERROR - the error message text. ;- .MACRO MSG NAME ERROR PSECT PURE,D NAME: .ASCIZ \ERROR\ PSECT ERRORS,D 'NAME'... = ..MSG. ..MSG. = ..MSG.+2 .WORD NAME PSECT PURE,D .ENDM MSG ;+ ; This macro creates an ASCIZ string in psect PURE, and prints that string. ; The arguments are: ; NAME - the name of the ASCIZ string. ; TEXT - the message text, enclosed in '<>'. ; GLOBL - if specified, causes the name of the message to be global. ;- .MACRO PRINT NAME,TEXT,GLOBL .IF NB PSECT PURE,D .NLIST BEX NAME: .ASCIZ \TEXT\ .LIST BEX .ENDC .IF NB GLOBL .DSABL CRF .GLOBL NAME .ENABL CRF .ENDC PSECT * .PRINT #NAME .ENDM PRINT ;+ ; This macro generate the switch tables. The arguments are: ; CHAR - the switch character. Must be a single RAD50 character. ; ACTION - the routine to execute if this switch is given. ; DEFAULT- if present, indicates that this switch is the default ; operation if nothing is given. It must occur, and occur ; on only one switch. ;- .MACRO SWITCH CHAR,ACTION,DEFAULT PSECT CHARS,D .IF NB CHAR .BYTE ''CHAR .IFF .BYTE 0 .EVEN .ENDC .IF B DEFAULT .IF NB CHAR PSECT CLEAR$,D .WORD 'CHAR'$$ PSECT ACTS,D 'CHAR'$$: .WORD 0 .IFF PSECT ACTS,D .WORD 0 .ENDC .IFF PSECT ACTS,D 'CHAR'$$: $DEFLT::.WORD 0 .ENDC .WORD ACTION PSECT * .ENDM SWITCH .SBTTL SYMBOLIC AND OFFSET DEFINITIONS .SBTTL System Communication area $JSW = 44 ;Job Status Word J.RNTR = 20000 ; Reenter Bit J.SPEX = 40 ; Command to KMON w/o breaking .COMs J.CHNI = 4000 ; Command in chain area for KMON $USRLD = 46 ;USR swap address $HILIM = 50 ;Program high limit $EMTER = 52 ;EMT error return byte USERRB = 53 ;User program error byte NONE$ = 200 ; for SET ERROR NONE SUCCS$ = 1 ; Success WARN$ = 2 ; Warning ERROR$ = 4 ; Error FATAL$ = 10 ; Fatal UNCON$ = 20 ; Unconditional $SYPTR = 54 ;Pointer to base of the Resident Monitor .SBTTL System Fixed Offsets $SYUNT = 275 ;Unit number of the system device ;**-1 $SYVER = 276 ;Monitor version number $SYREL = 277 ;System release level $CNFG1 = 300 ;System configuration word #1 C1.CLCK = 100000 ; 1 => system has a clock C1.PCLK = 40000 ; 1 => KW11-P clock C1.LCKS = 20000 ; 1 => system clock has a status register C1.XM = 10000 ; 1 => XM monitor is running C1.LSI = 4000 ; 1 => Processor is an LSI-11 C1.QUE = 2000 ; 1 => QUEUE is running C1.USR = 1000 ; 1 => USR is set NOSWAP C1.SCRL = 400 ; 1 => user is linked to graphics scroller C1.FJOB = 200 ; 1 => a Foreground job is in memory C1.FPU = 100 ; 1 => 11/45 or 11/70 floating point C1.CYCL = 40 ; 1 => 50 cycle clock, 0 => 60 cycle clock C1.SL = 20 ; 1 => SL is running C1.VT = 4 ; 1 => Graphics display hardware on system C1.SLKM = 2 ; 1 => SL supporting KMON only $USRLC = 266 ;USR base if resident $MAXFL = 314 ;Maximum file size for 0 length .ENTER LOWMAP = 326 ;Low memory bit map. SYINDX = 364 ;Offset to system device index $STWRD = 366 ;DCLS/Indirect file state word S.ECHO = 2000 ; 1 => TT is set QUIET S.IND = 4 ; 1 => KMON is set IND $CNFG2 = 370 ;System configuration word #2 C2.60 = 100000 ; 1 => Processor is a PDP 11/60 C2.70 = 40000 ; 1 => Processor is a PDP 11/70 C2.PC = 20000 ; 1 => Processor is a Pro 300. C2.GSC = 10000 ; 1 => Global .SCCA support C2.KX = 4000 ; 1 => Processor is a KXJ11-CA C2.V48 = 1000 ; 1 => VT48 Graphics display if C1.VT set ; 0 => VT11 Graphics display if C1.VT set C2.EIS = 400 ; 1 => EIS option present C2.CIS = 200 ; 1 => CIS option present ;004 C2.BUS = 100 ; 1 => Processor is a QBUS machine C2.XSW = 40 ; 1 => EXIT is set NOSWAP C2.LIT = 10 ; 1 => Light register is present C2.SWT = 4 ; 1 => Switch register is present C2.PAR = 2 ; 1 => Parity memory is present C2.CCH = 1 ; 1 => Cache memory is present $SYSGN = 372 ;SYSGEN options word SY.TSX = 100000 ; 1 => System is TSX PLUS SY.SJB = 40000 ; 1 => System jobbing present SY.MTT = 20000 ; 1 => Multi-terminal support ; SY.??? = 10000 ; 1 => ; SY.??? = 4000 ; 1 => SY.MKT = 2000 ; 1 => SJ timer support SY.MPR = 1000 ; 1 => memory parity support SY.FPU = 400 ; 1 => Floating point unit support SY.RTE = 10 ; 1 => RT-11 emulator (RTEM/RSX/VMS) SY.TIM = 4 ; 1 => device I/O time out support SY.MMU = 2 ; 1 => XM monitor SY.EL = 1 ; 1 => Error logging support $USRSZ = 374 ;Size of USR in bytes $IALEV = 376 ;Indirect file abort level $IDDEP = 377 ;Indirect file nesting depth S.PNAM = 404 ;Offset to $PNAME offset S.MNAM = 406 ;Offset to booted monitor filename HSUFFX = 412 ;monitor offset to 3rd char. of handler. SPSTAT = 414 ;Spooler status word SP.SHO = 4000 ; 1 => Show spooler status SP.ON = 200 ; 1 => Spooler turned on INDSTA = 417 ;IND status word CC$GBL = 10 ; = 1 => global .SCCA is on CC$IND = 4 ; = 1 => global .SCCA turned on by IND $MEMSZ = 420 ;Offset to memory size word. $MEMPT = 430 ;Offset to low memory allocation list. RG.SIZ = 6 ;Size of an XM region control block. RG.NUM = 4 ;Number of RCBs per job. RG.STA = 4 ;Offset into RCB for status word. R.STOP = 1 ;Region created by SETTOP R.SHAR = 2 ;Shared bit in RCB status word. R.EXIT = 4 ;Eliminate region on exit/abort R.CACH = 10 ;CACHE bypass GR.NAM = 6 ;Global RCB name field. GR.STA = 4 ;Global RCB status field. GR.PRV = 100000 ;High bit - private region GR.AGE = 200 ;Automatic global elimintation bit GR.PRM = 100 ;Permanent global region bit GR.NRF = 40 ;Do not return memory to free list bit GR.CAC = 20 ;CACHE bypass GR.ESZ = 10. ;Size of global RCB entry. P1EXT = 432 ;P1EXT GETVEC = 436 ;Pointer to $GTVEC (get base vector for PRO) DWTYPE = 440 ;DW disk type PROGDF = 452 ;Editor program BYTE $$EDIT =: 026 ;Possible value (TECO,EDIT updated for V5.5) $$TECO =: 027 $$KED =: 022 $$K52 =: 023 $$KEX =: 024 DEFALT =: 200 ;set if this has NEVER been set $$F77 =: 030 ;Possible FORTRAN values $$FORT =: 006 $JOBS = 455 ;BYTE - number of job slots available $CNFG3 = 466 ;Sytem configuration word #3 $THKPT = 472 ;Pointer to terminal hooks data structure CF3.CO = 1 CF3.CR = 2 CF3.VB = 10 ;1 => Run appropriately marked job under VBGEXE CF3.UI = 20 ;1 => UB noinstal CF3.UA = 40 ;1 => UB active CF3.UB = 100 ;1 => UB loaded CF3.DM = 200 ;1 => Some handlers use DMA CF3.64 = 400 ;1 => extended-unit support CF3.AT = 1000 CF3.OW = 2000 ;1 => ownership table present CF3.US = 4000 ;1 => UMR support enabled $SLOT2 = 502 ;Offsets from word that $MEMPT points to $RAMSZ = -2 ;32 word block count of available memory .SBTTL Other system offsets $HOMBL = 1 ;Home block of disks $VERBL = 4 ;Block containing the monitor boot string $VEROF = 740 ;Offset to monitor boot string $HDVER = 0 ;Offset to handler version number H.STS2 = 36 ;Offset to second handler status word HS2.BI = 1 ; = 1 No BSTRAP $install HS2.KI = 2 ; = 1 No KMON $install $HDDST = 56 ;Offset to device status word DEV.LS = 41 ;value for LS handler LC.VEC = 220 ;fixed LS vector on PRO LC.CSR = 173400 ;fixed LS CSR on PRO $HDOPT = 60 ;Offset to handler option word H.64UM = 100 ;Offset to handler H.64UM word HUM.UB = 40 ; = 1 Handler is "ready" for UMR support $DDCSR = 174 ;Offset to display CSR information $HDCSR = 176 ;Offset to the handlers CSR information $HDVEC = 1000 ;Offset to the handlers vector information $HDVTS = 6 ;Size of vector table entries for multi- ; vectored handlers $HDCQE = 1010 ;Offset to the handler's CQE/Flag word $HDVC2 = 040000 ;bit on means 2nd multi-vec table follows first I.BLK = 36 ;OFFSET TO BLOCKING WORD IN IMPURE AREA ;SD SPND$ = 2000 ;SUSPEND BIT IN JOB BLOCKING WORD NORUN$ = 1000 ;JOB NOT RUNNING BIT EXIT$ = 400 ;JOB EXITING BIT KSPND$ = 100 ;KMON SUSPEND BIT .SBTTL Directory offsets and symbolics DH.NXT = 2 ;Offset to next directory segment in header DH.HI = 4 ;Offset to highest open directory segment DH.EXB = 6 ;Number of extra bytes DH.SIZ = 12 ;Size of the directory header DE.STA = 0 ;Directory entry status word DS.EOS = 4000 ; 1 => End of segment DS.PRM = 2000 ; 1 => Permanent file DS.EMP = 1000 ; 1 => Empty entry DS.TNT = 400 ; 1 => Tentative entry DE.NM1 = 2 ;First word of filename DE.NM2 = 4 ;Second word of filename DE.TYP = 6 ;File type DE.SIZ = 16 ;Size of a directory entry .SBTTL Multi-terminal Status information $MTSTS = 0 ;First word returned (set) by .MTGET (.MTSET) MT.BKS = 100000 ; 1 => Scope mode set MT.LC = 40000 ; 1 => Don't conver lower case to upper MT.REM = 20000 ; 1 => Unit is remote (Read Only) MT.SPC = 10000 ; 1 => Special mode input MT.LSP = 7400 ; Line speed mask for DZ's and DH's MT.PAG = 200 ; 1 => XON/XOFF processing enabled MT.WAT = 100 ; 1 => Inhibit TT WAIT MT.EFL = 40 ; 1 => Filter escape sequences MT.ESC = 20 ; 1 => Enable escape sequence processing MT.FBT = 10 ; 1 => Process CTRL/F and CTRL/B MT.FRM = 4 ; 1 => Hardware form feed MT.CRL = 2 ; 1 => Output when position > width MT.TAB = 1 ; 1 => Hardware tabs $MTWID = 6 ;Terminal width $MTSTA = 7 ;Terminal state byte MS.CNS = 200 ;Terminal is a console MS.CC = 100 ;Double CTRL/C was struck MS.DH = 40 ;Terminal is on a DH series interface MS.DZ = 20 ;Terminal is on a DZ series interface MS.HNG = 10 ;Terminal is hung up (remote) MS.SHR = 4 ;Terminal is a shared console ER.ATH = 6 ;Unit attached by handler error code MT.ERA = 4 ;"unit attached to another job" error return MT.ERU = 1 ;"unit unattached" error return .SBTTL Logical disk subsetting definitions. LDDVCD =: 46 ; RT11 device code for LD UPD$FN =: 372 ; SpFun code for LD update LDBFSZ =: 450. ; LD buffer size in words LD.ACT =: 100000 ; active unit ; /handler unloaded (2nd resorc only) LD.RDO =: 040000 ; read only bit in LD.FLG table LD.UOF =: 000200 ; offset unknown bit (dirty) in LD.FLG table .SBTTL Memory management and memory determination definitions. V.MMU = 250 ;KT11 Vector SR0 = 177572 ;KT11 Status register 1. SR3 = 172516 ;KT11 Status register 3. MODE22 = 000020 ;22 bit addressing mode bit in SR3. $KPAR = 172340 ;Kernel page address register $KPDR = 172300 ;Kernel page descriptor register $UPAR = 177640 ;User page address register $UPDR = 177600 ;User page descriptor register UISAR6 = 177654 ;User I-space PAR6 KB = 000020 ;1KB in 32 word blocks. PDR.4K = 077406 ;4K PDR pages, read/write. PAR1.B = 020000 ;Bottom address mapped by PAR 1. PAR6 = 140000 ;Bottom address mapped by PAR 6. PAR6CK = 1400 ;Chunk address of kernel PAR6 memory .SBTTL Other symbolics LF = 12 ;ASCII CR = 15 ;ASCII BLANK = 40 ;ASCII space ZERO = 60 ;ASCII zero COLIN = 72 ;ASCII colin OSPSIZ = 12 ;Size of output file spec from CSI (bytes) ISPSIZ = 10 ;Size of input file spec from CSI (bytes) SPCSIZ = + ;Size of file spec area needed by CSI (bytes) INBFSZ = 512. ;Size of the input buffer in words SRTBFSZ = 512. ;Size of the sort buffer in words. SBESIZ = 6 ;Number of words per sort table entry. HICHAN = 16 ;Highest channel number to purge ACTSIZ = 4 ;Size of a flag/action block created by SWITCH ACTWRD = 2 ; -> to action routine in flag/action block GTDSPL = 172000 ;Hardware display CSR VS60SP = 172032 ;VS60 stack pointer register PCSR1 = 172100 ;1st parity memory CSR PCSR16 = 172136 ;16th (last) parity memory CSR SGLERR = 20 ;Single Error bit in memory CSR EAECS0 = 177311 ;Status register for EAE hardware EAECS1 = 177331 ;Status register for EAE hardware UMRCSR = 170200 ;UMR CSR register DUID = 50 ;MSCP (DU) device code MUID = 60 ;TMSCP (MU) device code PDT130 = 36 ;PDT 11/130 device code PDT150 = 37 ;PDT 11/150 device code PROID = 173600 ;Address of Professional ID ROM. SWR = 177570 ;Switch register. LKS = 177546 ;Line clock status register. CHAIN = 500 ;Start of chain area SPCCMD = 510 ;Special chain exit command area start QCHAIN = 6 ;Number of words in the QUEUE chain area ..MSG. = 0 ;Used by macro MSG MFPT44 = 1 ;11/44 processor type code from MFPT MFPT23 = 3 ;11/23 processor type code from MFPT MFPTT11 =:4 ;T11 based processor MFPTJ11 =:5 ;J11 based processor ; Processor registers PSW = 177776 ;Processor status word PM.USER = 030000 ;Previous mode user bits in PSW. PR7 = 000340 ;Priority 7 in PSW. HMR = 177752 ;Hit/miss register CMR = 177750 ;Maintenance register CMR.FP =:000400;FPA present CMR.ID =:000360;Module ID area J11A =:1*20 ;KDJ11A module ID J11B =:2*20 ;KDJ11B module ID J11C =:3*20 ;KXJ11C module ID J11D =:4*20 ;KDJ11D module ID J11E =:5*20 ;KDJ11E module ID CCR = 177746 ;Cache control register CC.FLU = 000400 ;Flush cache ; Processor types from $PDP11 PDP.UNK = 0 ;unknown processor PDP.20 = 1 ;PDP11/15-20 PDP.40 = 2 ;PDP11/35-40 PDP.05 = 3 ;PDP11/05/10 PDP.45 = 4 ;PDP11/45-55 PDP.04 = 5 ;PDP11/04 PDP.34 = 6 ;PDP11/34(A) ;PDP.05 = 7 ;PDP11/05/10 PDP.70 = 10 ;PDP11/70 PDP.60 = 11 ;PDP11/60 PDP.LSI = 12 ;LSI11/* PDP.44 = 13 ;PDP11/44 PDP.24 = 14 ;PDP11/24 PDP.23 = 15 ;PDP11/23 PDT.130 = 16 ;PDT130 PDT.150 = 17 ;PDT150 PLUS.23 = 20 ;PDP11/23 PLUS SBC.21 = 21 ;SBC-11/21 PDP73A = 22 ;PDP11/73A PDP73B = 23 ;PDP11/73B PDP.83 = 24 ;PDP11/83 PDP.84 = 25 ;PDP11/84 ;reserve= 26 ;reserved??? PRO.380 = 27 ;PC380 CPU type code from $PDP11: PRO.3XX = 30 ;PC325, PC350 CPU type code from $PDP11: PDP.53 = 31 ;11/53 CPU type code PDP.KX = 32 ;KXJ11-CA PDP.93 = 33 ;PDP 11/93 PDP.94 = 34 ;PDP 11/94 .SBTTL PSECT DEFINITION ;+ ; This places the psects in the desired order and sets up reference labels. ;- .PSECT IMPURE,D ;Impure data area .PSECT .LIBD. ;Psect for library routine data .PSECT ACTS,D,GBL ;Psect for switch macro .PSECT $$$FMT ;Psect for format picture strings .PSECT PURE,D,GBL ;Psect for pure data .PSECT CHARS,D,GBL ;Psect for switch macro .PSECT CLEAR$,D,GBL ;Psect to contain address of items ; to be cleared on start-up .PSECT ERRORS,D,GBL ;Error message pointer table psect .PSECT .LIBC. ;Library routines