Trailing-Edge
-
PDP-10 Archives
-
BB-BT99S-BB_1990
-
10,7/mon/monbts.mac
There are 10 other files named monbts.mac in the archive. Click here to see a list.
TITLE MONBTS - MONITOR/BOOTSTRAP INTERFACE V102
SUBTTL D. MASTROVITO /DPM 17-OCT-89
SEARCH F,S,BTSPRM
SALL ;FOR CLEAN LISTINGS
.DIRECTIVE FLBLST ;FOR CLEANER LISTINGS
$RELOC
$HIGH
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
; OR COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1979,1980,1982,1984,1986,1988.
;ALL RIGHTS RESERVED.
.CPYRT<1979,1988>
XP VMNBTS,102 ;VERSION NUMBER FOR LOADER STORAGE MAP
MONBTS::!ENTRY MONBTS ;LOAD IF SPECIFIED BY COMMON
; MICROCODE OFFSETS IN THE BOOTSTRAP VECTOR
DEFINE X (L,PFX,NAM,EXT,TXT,MOD,SIZ),<
IFNB <PFX>,<.BT'PFX==:ZZ>
ZZ==ZZ+2
>
ZZ==0
UCODES
PURGE ZZ
SUBTTL BOOT FILESPEC ROUTINES
SETBFL::MOVSI T1,-BOOTLN ;-LENGTH OF TRANSLATION TABLE
SETBF1: HRRZ T2,BOOTBL(T1) ;GET MONITOR ADDRESS
MOVE T2,(T2) ;FETCH WORD OF FILESPEC
HLRZ T3,BOOTBL(T1) ;GET AN OFFSET
ADD T3,BOOTVA ;INDEX INTO BOOT VECTOR
MOVEM T2,(T3) ;SAVE WORD
AOBJN T1,SETBF1 ;LOOP
POPJ P, ;RETURN
BOOTBL: .BTDEV,,STRMON## ;DEVICE
.BTFIL,,FILMON## ;FILE NAME
.BTEXT,,EXTMON## ;EXTENSION
.BTPTH+0,,PPNMON## ;PPN
.BTPTH+1,,SFDMON##+0 ;SFD #1
.BTPTH+2,,SFDMON##+1 ;SFD #2
.BTPTH+3,,SFDMON##+2 ;SFD #3
.BTPTH+4,,SFDMON##+3 ;SFD #4
.BTPTH+5,,SFDMON##+4 ;SFD #5
BOOTLN==.-BOOTBL ;LENGTH OF TABLE
SUBTTL SYSTEM SEARCH LIST ROUTINES
SSLBLD::SE1ENT ;ENTER SECTION ONE
MOVEI T1,.BTSSL ;OFFSET
PUSHJ P,BTDATA ;GET BOOTSTRAP VECTOR ADDRESS
POPJ P, ;SSL NOT AVAILABLE
PUSHJ P,ZERBLK ;CLEAR THE SSL
MOVE T4,SYSSRC## ;GET BYTE POINTER TO SSL
SSLBL1: ILDB T3,T4 ;GET FS NUMBER AND BITS
ANDI T3,FS.NMK ;KEEP ONLY THE FS NUMBER
CAIN T3,.FSFNC ;FENCE?
JRST SSLBL1 ;YES
CAIN T3,.FSEND ;END?
JRST CPOPJ1## ;YES
MOVE T3,TABSTR##(T3) ;GET TABSTR ENTRY
MOVE T3,STRNAM##(T3) ;GET STRUCTURE NAME
MOVEM T3,(T2) ;SAVE IN PRESERVED SSL
AOS T2 ;ADVANCE POINTER
AOBJN T1,SSLBL1 ;LOOP
JRST CPOPJ1## ;AND RETURN
SUBTTL ACTIVE SWAPPING LIST ROUTINES
ASLBLD::SE1ENT ;ENTER SECTION ONE
MOVEI T1,.BTASL ;OFFSET
PUSHJ P,BTDATA ;GET BOOTSTRAP VECTOR ADDRESS
POPJ P, ;ASL NOT AVAILABLE
PUSHJ P,ZERBLK ;CLEAR THE ASL
MOVSI T4,MSWPMX## ;AOBJN POINTER TO SWPTAB
ASLBL1: HRRZ T3,SWPTAB##(T4) ;GET ADDR OF FIRST UNIT DATA BLOCK IN ASL
JUMPE T3,ASLBL2 ;MISSING ENTRY?
MOVE T3,UNIHID##(T3) ;GET UNIT-ID
MOVEM T3,(T2) ;SAVE IN PRESERVED ASL
AOS T2 ;ADVANCE POINTER
AOBJP T1,CPOPJ1## ;DONE IF END OF TABLE
ASLBL2: AOBJN T4,ASLBL1 ;LOOP THROUGH TABLE
JRST CPOPJ1## ;RETURN
SUBTTL SYSTEM DUMP LIST ROUTINES
SDLBLD::SE1ENT ;ENTER SECTION ONE
MOVEI T1,.BTSDL ;OFFSET
PUSHJ P,BTDATA ;GET BOOTSTRAP VECTOR ADDRESS
POPJ P, ;SDL NOT AVAILABLE
PUSHJ P,SAVE1## ;PRESERVE AN AC
HLRE P1,T1 ;GET -VE LENGTH
MOVMS P1 ;FORM POSITIVE LENGTH
PUSHJ P,ZERBLK ;CLEAR THE SDL
MOVEI T4,DIFSTR## ;POINT TO PREDECESSOR OF FIRST STR IN SYSTEM
SDLBL1: HLRZ T4,STRSYS##(T4) ;STEP TO NEXT STR DATA BLOCK
JUMPE T4,CPOPJ1## ;DONE AT END
SKIPL T3,STRSDL##(T4) ;GET POSITION IN SDL
CAIL T3,(P1) ;AND RANGE CHECK IT
JRST SDLBL1 ;SKIP IT IF NOT IN SDL OR OUT OF RANGE
ADD T3,T2 ;POINT TO STORAGE WORD
SKIPE T1,STRNAM##(T4) ;GET STR'S NAME
MOVEM T1,(T3) ;SAVE IN OUR LIST
JRST SDLBL1 ;LOOP OVER ALL STRS IN SYSTEM
ZERBLK: PUSH P,T1 ;SAVE AOBJN POINTER
PUSH P,T2 ;SAVE ADDRESS
HLRES T1 ;GET -LENGTH
SETCA T1, ;MAKE POSITIVE
SETZM (T2) ;CLEAR FIRST WORD
IFE FTXMON,<
ADDI T1,0(T2) ;COMPUTE END OF BLOCK
HRLI T2,1(T2) ;MAKE A BACKWARDS BLT POINTER
MOVSS T2 ;FIX IT
BLT T2,-1(T1) ;CLEAR BLOCK
> ;END IFE FTXMON
IFN FTXMON,<
MOVEI T3,1(T2) ;GET SECTION RELATIVE ADDRESS + 1
HLL T3,T2 ;INCLUDE THE SECTION NUMBER
EXTEND T1,[XBLT] ;CLEAR BLOCK
> ;END IFN FTXMON
POP P,T2 ;RESTORE ADDRESS
POP P,T1 ;RESTORE AOBJN POINTER
POPJ P, ;RETURN
SUBTTL RELOAD MONITOR
RLDMON::
IFN FTKL10,<PUSHJ P,ENTSPC##> ;ENTER SECONDARY PROTOCOL
IFN FTKS10,<PUSHJ P,DISKAL##> ;DISABLE KEEP ALIVE FUNCTION
IFN FTXMON,<XJRST [MCSEC1+.+1]> ;ENTER SECTION ONE
MOVEI T1,.BTDAT ;OFFSET TO DATA STORAGE POINTER
PUSHJ P,BTDATA ;GET ADDRESS OF DATA STORAGE IN BOOTSTRAP
JRST NOBOOT ;NOT AVAILABLE
HLRE T3,T1 ;GET -LENGTH IN WORDS
SKIPN MBTCOM## ;FORGET IT SUSPENDED
CAMLE T3,[-BTXLEN##] ;ENOUGH WORDS FOR BOOTXT?
JRST BTBOOT ;NO--JUST RESTART BOOTSTRAP
MOVE T1,DEBUGF## ;GET DEBUGGING FLAGS
TLNE T1,(DF.RIP) ;IS THIS A FORCED RELOAD?
JRST RLDMN1 ;YES. DON'T CHECK KSYS OR UPTIME
TLNN T1,(DF.NAR) ;ALLOW AUTO-RELOAD?
SKIPGE SYSKTM## ;KSYS?
JRST BTBOOT ;YES, DON'T TAKE A DUMP NOR AUTO RELOAD
SKIPLE ARFLAG## ;SKIP IF .LE. 5 MIN UPTIME
JRST RLDMN1 ;NO, CONTINUE ONWARD
SKIPE [ATODMP##] ;IS DUMPING DESIRED IF UPTIME .LT. 5 MINS?
PUSHJ P,BTDUMP ;DO THE DUMP
JFCL ;I TRIED
JRST BTBOOT ;DON'T DO A LOAD
RLDMN1:
IFE FTXMON,<
MOVEI T1,BTXLEN##(T2) ;COMPUTE END OF BLT
HRLI T2,BOOTXT## ;MAKE A BLT POINTER
BLT T2,-1(T1) ;COPY BOOTXT INTO BOOTSTRAP DATA AREA
> ;END IFE FTXMON
IFN FTXMON,<
MOVEI T1,BTXLEN## ;NUMBER OF WORDS
MOVE T3,T2 ;DESTINATION
XMOVEI T2,BOOTXT## ;SOURCE
EXTEND T1,[XBLT] ;COPY BOOTXT INTO BOOTSTRAP DATA AREA
> ;END IFE FTXMON
JRST BTLOAD
NOBOOT: MOVEI T1,CTYWAT## ;CTY TYPEOUT ROUTINE
MOVEM T1,.CPTOA## ;SET FOR SCNSER
MOVEI T1,RLDTXT ;POINT TO RELOAD TEXT
PUSHJ P,CONMES## ;TYPE ON THE CTY
PJRST DOLOAD## ;GO FORCE A RELOAD (MAYBE)
RLDTXT: ASCIZ /
?Bootstrap not available
/
SUBTTL SYSTEM SLEEP AND PAGE REPLACEMENT
SLPDMP::SE1ENT ;YES, GET INTO RIGHT SECTION
PUSHJ P,BTAVAL ;MAKE SURE WE HAVE A BOOTSTRAP
POPJ P, ;PROPAGATE LOSSAGE
MOVE T1,BOOTPA ;GET START OF BOOTSTRAP
LSH T1,W2PLSH ;MAKE A PAGE NUMBER
HLL T1,.BTSIZ(T2) ;FORM XWD -SIZE,START (IN PAGES)
MOVEM T1,MBTCOM## ;SAVE FOR /REBOOT
PJRST BTSSLP ;GO DO IT
PAGRPL::SE1ENT ;BOOTSTRAP IS IN NZS SPACE
PUSHJ P,SAVE2## ;PRESERVE SOME ACS
DMOVE P1,T1 ;SAVE VIRTUAL PAGE & NEW PHYSICAL ADDRESS
MOVEI T1,.BTDAT ;OFFSET TO POINT TO SUBROUTINE DATA
PUSHJ P,BTDATA ;GET 2-WORD POINTER TO ARGUMENT STORAGE
POPJ P, ;BOOTSTRAP NOT AVAILABLE
CAMLE T1,[XWD -2,0] ;BETTER BE AT LEAST TWO WORDS OF SPACE
POPJ P, ;NO SUCH LUCK
DMOVEM P1,(T2) ;YES, SAVE OUR ARGUMENTS
PJRST BTREPL ;AND GO REPLACE THE PAGE
SUBTTL DISPATCH TO BOOTSTRAP
BTDISP::! ;DISPATCH TABLE
BTBOOT::PUSHJ P,BTCALL ;RESTART BOOT (DO NOT LOAD)
BTDUMP::PUSHJ P,BTCALL ;DUMP CRASH
BTLOAD::PUSHJ P,BTCALL ;LOAD (READ BOOTXT)
BTSSLP::PUSHJ P,BTCALL ;SYSTEM SLEEP DUMP
BTREPL::PUSHJ P,BTCALL ;PAGE REPLACE
BTCALL: SKIPN BOOTVA ;IS BOOT MAPPED?
JRST TPOPJ## ;NO
DMOVEM T1,BOOTXX ;SAVE T1 AND T2
SKIPE DINITF## ;SYSTEM INITIALIZATION?
JRST BTCAL1 ;YES--MEMSIZ MAY NOT BE SET YET
PUSH P,T3 ;AND T3
MOVE T2,BOOTVA ;GET VIRTUAL ADDRESS OF BOOT
MOVE T1,MEMSIZ## ;GET MAXIMUM MEMORY ADDRESS
LSH T1,W2PLSH ;MAKE NUMBER OF PAGES
MOVE T3,.BTMSZ(T2) ;GET OFFSET TO BOOT'S MEMSIZE IN P
ADD T3,T2 ;MAKE ADDRESS
MOVEM T1,(T3) ;STORE FOR BOOT
MOVEI T1,.BTNXM ;POINTER OFFSET FOR BOOT'S NXMTAB
PUSHJ P,BTDATA ;FETCH DATA POINTER
JFCL ;CAN'T FAIL
HLRES T1 ;GET -VE LENGTH
MOVNS T1 ;MAKE +VE
CAILE T1,NXMTBL## ;BIGGER THAN THE ONE IN COMMON?
MOVEI T1,NXMTBL## ;YES, USE OUR LENGTH
IFN FTXMON,<
MOVE T3,T2 ;COPY DESTINATION ADDRESS
XMOVEI T2,NXMTAB## ;SOURCE ADDRESS
EXTEND T1,[XBLT] ;COPY THE DATA
>
IFE FTXMON,<
ADD T1,T2 ;GET END ADDRESS+1
HRLI T2,NXMTAB## ;MAKE XFER POINTER
BLT T2,-1(T1) ;COPY DATA
>
POP P,T3 ;RESTORE AC
BTCAL1: POP P,T1 ;GET CALLER'S PC
SUBI T1,BTDISP ;COMPUTE FUNCTION CODE
MOVE T2,BOOTVA ;GET VIRTUAL ADDRESS OF BOOT
HRRZM T1,.BTFNC(T2) ;SAVE FUNCTION CODE
MOVE T1,.CPCPN## ;GET CPU NUMBER BOOT WAS CALLED ON
MOVEM T1,.BTCPN(T2) ;SAVE FOR KL CACHE STRATEGY STUFF
DMOVEM 16,.BTACS(T2) ;SAVE ACS (BOOT NEEDS ACS TO RELOCATE SELF)
MOVE T1,.BTDSP(T2) ;GET OFFSET TO SUBR DISPATCH FROM VECTOR BASE
ADD T1,T2 ;INDEX INTO BOOT
MOVEM T1,.BTXPC+3(T2) ;SAVE
XMOVEI T1,.BTXPC(T2) ;ADDRESS OF XPCW ENTRY POINT
EXCH T1,BOOTXX ;SAVE ADDRESS, RESTORE T1
MOVE T2,BOOTXX+1 ;RESTORE T2
XPCW @BOOTXX ;CALL BOOT AS A SUBROUTINE
SKIPA ;FAILURE RETURN
AOS (P) ;SUCESSFUL RETURN
MOVE T2,BOOTVA ;GET VIRTUAL ADDRESS OF BOOT
DMOVE 16,.BTACS(T2) ;RESTORE ACS 16 AND 17
POPJ P, ;AND RETURN
SUBTTL SUBROUTINES
; ROUTINE TO VALIDATE IN-CORE BOOTSTRAP AND RETURN ITS VECTOR ADDRESS
; CALL: PUSHJ P,BTAVAL
; <NON-SKIP> ;NOT AVAILABLE
; <SKIP> ;AVAILABLE, T2 = VECTOR ADDRESS
$CSENT (BTAVAL::)
SKIPN T2,BOOTVA ;GET MONITOR VIRTUAL ADDRESS OF BOOT ORIGIN
POPJ P, ;NOT THERE
PUSH P,T1 ;SAVE T1
MAP T1,(T2) ;TRANSLATE TO PHYSICAL
AND T1,PHYMAX ;KEEP ONLY THE ADDRESS
SKIPE MOFLPG## ;MONITOR MEMORY BEING SET OFFLINE?
MOVEM T1,BOOTPA ;YES, BOOT MAY HAVE MOVED, TRUST BOOTVA HERE
CAME T1,BOOTPA ;PHYSICAL ADDRESSES MUST MATCH
JRST TPOPJ## ;NO GOOD
MOVE T1,.BTNAM(T2) ;GET NAME
CAMN T1,['BOOT '] ;MUST BE BOOT
SKIPL .BTSIZ(T2) ;AND MUST HAVE A -PAGE COUNT IN LH OF SIZE WORD
JRST TPOPJ## ;NO GOOD
JRST TPOPJ1## ;LOOKS LIKE A GOOD BOOTSTRAP
PHYMAX:
IFN FTKL10,<LG.EPT*PAGSIZ+PG.BDY> ;HIGHEST PHYSICAL ADDRESS
IFN FTKS10,<SG.EPT*PAGSIZ+PG.BDY> ;HIGHEST PHYSICAL ADDRESS
; ROUTINE TO RETURN A MONITOR VIRTUAL ADDRESS WITHIN BOOT
; CALL: MOVE T1, .BTXXX OFFSET
; PUSHJ P,BTADDR
; <NON-SKIP> ;BOOT NOT LOADED
; <SKIP> ;T1 = UNCHANGED, T2 = 30-BIT ADDRESS
BTADDR::PUSHJ P,BTAVAL ;GET BOOTSTRAP VECTOR ADDRESS
POPJ P, ;NOT LOADED
ADDI T2,(T1) ;OFFSET TO DESIRED LOCATION
JRST CPOPJ1## ;RETURN
; ROUTINE TO RETURN A POINTER TO DATA STORAGE WITHIN BOOT
; CALL: MOVE T1, .BTXXX OFFSET
; PUSHJ P,BTDATA
; <NON-SKIP> ;BOOT LOAD LOADED
; <SKIP> ; T1 = -LENGTH,,0 AND T2 = 30-BIT ADDRESS
BTDATA::PUSHJ P,BTAVAL ;GET BOOTSTRAP VECTOR ADDRESS
POPJ P, ;NOT AVAILABLE
ADDI T2,(T1) ;OFFSET TO DESIRED LOCATION
MOVE T1,(T2) ;GET -LENGTH,,OFFSET
HRRZ T2,T1 ;ISOLATE OFFSET
HLLZS T1 ;T1 HAS -LENGTH
ADD T2,BOOTVA ;T2 GETS THE ADDRESS
JRST CPOPJ1## ;RETURN
; ROUTINE TO ENABLE/DISABLE MICROCODE LOADING
; CALL: MOVE T1, ADDRESS OF UCODE LOADER BLOCK
; MOVE T2, ARGUMENT ;DISABLE = 0, ENABLE = 1
; PUSHJ P,BTUEDL
; <NON-SKIP> ;NO MICROCODE AVAILABLE
; <SKIP> ;ENABLE/DISABLE BIT SET ACCORDINGLY
$CSENT (BTUEDL::)
DMOVE T3,T1 ;COPY UCODE LOADER BLOCK ADDRESS AND ARG
PUSHJ P,BTAVAL ;GET BOOTSTRAP VECTOR ADDRESS
POPJ P, ;NO BOOTSTRAP AVAILABLE
HRRZ T1,.ULIDX(T3) ;GET MICROCODE INDEX
ADDI T2,.BTUCD(T1) ;OFFSET TO UCODE WORD PAIR
SKIPN (T2) ;CHECK LENGTH WORD, IS UCODE LOADED?
POPJ P, ;NO UCODE AVAILABLE
TRC T4,1 ;TOGGLE BIT
DPB T4,[POINT 1,.ULIDX(T3),0] ;SET ENABLE/DISABLE STATUS
JRST CPOPJ1## ;AND RETURN
; ROUTINE TO RETURN A POINTER TO MICROCODE WITHIN BOOT
; CALL: MOVE T1, ADDRESS OF UCODE LOADER BLOCK
; PUSHJ P,BTUCOD
; <NON-SKIP> ;BOOT OR UCODE NOT LOADED
; <SKIP> ;UCODE LOADER BLOCK UPDATED
$CSENT (BTUCOD::)
PUSHJ P,SAVE1## ;SAVE P1
MOVE P1,T1 ;COPY UCODE LOADER BLOCK ADDRESS
MOVSI T1,(UE.DAE) ;CLEAR RANDOM BITS AND PIECES OF DATA FOR
ANDCAB T1,.ULIDX(P1) ; DAEMON ERROR REPORTING AND GET INDEX
PUSHJ P,INTLVL## ;AT INTERRUPT LEVEL?
HRRZS T1 ;NO--INVOKED BY UUO (IGNORE DISABLED BIT)
JUMPL T1,UCOD1 ;UCODE LOADING DISABLED?
PUSHJ P,BTAVAL ;GET BOOTSTRAP VECTOR ADDRESS
JRST UCOD2 ;NO BOOT, NO UCODE
HRRZ T1,.ULIDX(P1) ;GET MICROCODE INDEX
ADDI T2,.BTUCD(T1) ;OFFSET TO UCODE WORD PAIR
SKIPN T1,(T2) ;CHECK LENGTH WORD, IS UCODE LOADED?
JRST UCOD2 ;NO UCODE AVAILABLE
MOVEM T1,.ULWDS(P1) ;SAVE LENGTH
MOVE T2,1(T2) ;GET OFFSET TO MICROCODE STORAGE
ADD T2,BOOTVA ;NOW GET THE ACTUAL ADDRESS
MOVE T1,(T2) ;GET VERSION NUMBER
MOVEM T1,.ULVER(P1) ;SAVE IT
CAMGE T1,.ULMVR(P1) ;VERSION GT OR EQ TO MINIMUM?
JRST UCOD3 ;NO
AOS T2 ;POINT PAST THE VERSION NUMBER
MOVEM T2,.ULADR(P1) ;SAVE ADDRESS
MOVEI T1,0 ;ZAP OLD ERROR CODE THAT MAY BE
DPB T1,ULBEBP ; LEFT FROM A PREVIOUS LOAD FAILURE
JRST CPOPJ1## ;RETURN
UCOD1: MOVEI T1,.UEDIS ;LOADING DISABLED
JRST UCODX
UCOD2: MOVEI T1,.UENOM ;NO MICROCODE
JRST UCODX
UCOD3: MOVEI T1,.UEWVR ;WRONG VERSION
UCODX: DPB T1,ULBEBP ;STORE
POPJ P, ;AND RETURN
$CSUB
ULBEBP::POINT 6,.ULIDX(P1),17 ;BYTE POINTER TO ERROR CODE
$HIGH
; REPORT A MICROCODE LOAD SUCESS OR FAILURE
$CSENT (BTURPT::)
PUSHJ P,SAVE1## ;SAVE P1
MOVE P1,T1 ;COPY UCODE LOADER BLOCK
PUSHJ P,CTYERM## ;SET FOR OUTPUT TO CTY
MOVE T1,DATE## ;GET UDT
MOVEM T1,.ULDTM(P1) ;SAVE FOR ERROR.SYS
MOVE T1,.CPCPN## ;GET THE CPU NUMBER
DPB T1,[POINT 3,.ULDEV(P1),8] ;SAVE FOR DAEMON
SKIPE DINITF## ;SYSTEM INITIALIZATION?
JRST URPT1 ;YES--FORGET THE DAEMON STUFF
MOVSI T1,(UE.USR) ;BIT TO SET
PUSHJ P,INTLVL## ;AT INTERRUPT LEVEL?
IORM T1,.ULIDX(P1) ;LOAD INVOKED BY A USER (DIAG. UUO)
MOVEI T1,.ULDAE ;LENGTH OF ERROR BLOCK
PUSHJ P,ALCSEB## ;ALLOCATE A SYSTEM ERROR BLOCK
JRST URPT1 ;GIVE UP IF NONE AVAILABLE
MOVEI T2,.ERULD ;GET THE BLOCK TYPE
DPB T2,[POINT 9,.EBTYP(T1),8] ;SAVE
MOVEI T2,.ULDAE ;NUMBER OF WORDS
XMOVEI T3,(P1) ;POINT TO MICROCODE LOADER BLOCK IN KDB
MOVEI T4,.EBHDR(T1) ;POINT TO THE ERROR BLOCK
EXTEND T2,[XBLT] ;COPY THE PACKET
PUSHJ P,QUESEB## ;QUEUE UP THE ERROR BLOCK FOR DAEMON
URPT1: MOVEI T2,ULDSUC ;ASSUME SUCESSFUL LOAD
LDB T1,ULBEBP ;GET ERROR CODE
SKIPE T1 ;CHECK
MOVEI T2,ULDERR ;FAILURE
PUSHJ P,(T2) ;REPORT MICROCODE LOAD/FAILURE
PJRST PCRLF## ;ADD A CRLF AND RETURN
ULDERR: PUSH P,T1 ;SAVE ERROR CODE
MOVEI T1,[ASCIZ /%% /]
PUSHJ P,CONMES## ;PRINT INTRODUCTION
MOVE T2,.ULINM(P1) ;GET INTERFACE NAME
PUSHJ P,PRNAME## ;PRINT IT
MOVEI T1,[ASCIZ / microcode load failed on /]
PUSHJ P,CONMES## ;PRINT TEXT
PUSHJ P,ULDDEV ;PRINT DEVICE INFO
PUSHJ P,PCRLF## ;PRINT A NEW LINE
MOVEI T1,[ASCIZ / /];SPACE
PUSHJ P,CONMES## ; OVER
POP P,T1 ;GET ERROR CODE BACK
MOVE T1,ULDETB-1(T1) ;AND ASSOCIATED TEXT
PJRST CONMES## ;PRINT IT AND RETURN
ULDSUC: PUSHJ P,PRLBK## ;PRINT A LEFT BRACKET
MOVE T2,.ULINM(P1) ;GET INTERFACE NAME
PUSHJ P,PRNAME## ;PRINT IT
MOVEI T1,[ASCIZ / microcode %/]
PUSHJ P,CONMES## ;PRINT TEXT
MOVE T1,.ULVER(P1) ;GET VERSION NUMBER
PUSHJ P,PRVERS## ;PRINT IT
MOVEI T1,[ASCIZ / loaded on /]
PUSHJ P,CONMES## ;PRINT TEXT
PUSHJ P,ULDDEV ;PRINT DEVICE INFO
PJRST PRRBK## ;END LINE WITH A BRACKET AND RETURN
; PRINT CPUN DEVICE XXX
ULDDEV: MOVEI T1,M.CPU## ;GET NUMBER OF CPUS IN THIS MONITOR
SOJE T1,ULDDE1 ;DON'T PRINT CPUN IF THERE'S ONLY ONE
MOVE T2,.CPLOG## ;GET THE CPU NAME
PUSHJ P,PRNAME## ;PRINT IT
MOVEI T1,[ASCIZ /, /] ;SEPARATOR
PUSHJ P,CONMES## ;PRINT IT
ULDDE1: MOVE T2,['RH20 '] ;ASSUME RH20
LDB T1,[POINT 9,.ULDEV(P1),17] ;GET DEVICE CODE
CAIL T1,540 ;IS IT REALLY AND
CAILE T1,574 ; RH20 OF SOME SORT?
MOVEI T2,[ASCIZ /device/] ;GENERIC
HRRZ T1,.ULDEV(P1) ;GET POSSIBLE UNIT NUMBER
CAIN T1,-1 ;MULTI-UNIT?
MOVE T2,.ULDNM(P1) ;NO--GET REAL DEVICE NAME
TLNE T2,-1 ;SIXBIT CHANNEL NAME?
JRST ULDDE2 ;YES
MOVE T1,T2 ;COPY ADDRESS OF ASCIZ NAME
PUSHJ P,CONMES## ;PRINT IT
JRST ULDDE3 ;ONWARD
ULDDE2: PUSHJ P,PRNAME## ;PRINT IT
ULDDE3: PUSHJ P,PRSPC## ;PRINT A SPACE
LDB T1,[POINT 9,.ULDEV(P1),17] ;GET DEVICE CODE
PUSHJ P,PRTDI8## ;PRINT THE DEVICE CODE
HRRZ T1,.ULDEV(P1) ;GET UNIT NUMBER
CAIN T1,-1 ;MULTI-UNIT?
JRST ULDDE4 ;NO
MOVEI T1,[ASCIZ /, /] ;SEPARATOR
PUSHJ P,CONMES## ;PRINT IT
MOVE T2,.ULDNM(P1) ;GET DEVICE NAME
PUSHJ P,PRNAME## ;PRINT IT
PUSHJ P,PRSPC## ;PRINT A SPACE
HRRZ T1,.ULDEV(P1) ;GET UNIT NUMBER
PUSHJ P,PRTDI8## ;PRINT IT
ULDDE4: SKIPE DINITF## ;STARTUP?
POPJ P, ;DATE/TIME NOT AVAILABLE
MOVEI T1,[ASCIZ / on /]
PUSHJ P,CONMES## ;PRINT TEXT
PJRST DATIME## ;PRINT DATE/TIME AND RETURN
ULDETB: [ASCIZ /Loading disabled/]
[ASCIZ /No microcode/]
[ASCIZ /Wrong version/]
[ASCIZ /Load error/]
[ASCIZ /Verify error/]
[ASCIZ /Microprocessor check/]
[ASCIZ /CRAM load error/]
[ASCIZ /CRAM verify error/]
[ASCIZ /DRAM load error/]
[ASCIZ /DRAM verify error/]
SUBTTL LITERALS
LITERAL:$LIT
SUBTTL IMPURE DATA
$LOW
BOOTVA::BLOCK 1 ;VIRTUAL ADDRESS OF BOOTSTRAP
BOOTXX: BLOCK 2 ;TEMP STORAGE FOR CALLING BOOTSTRAP
; AS A SUBROUTINE
$HIGH
MBTEND::!END