IDENT OSB,OSB
PERIPH
MACHINE 6,A INFORM CTI OF CLOCK SUPPORT
BASE M
SST
TITLE OSB - OPERATING SYSTEM BOOTSTRAP.
*COMMENT OSB - OPERATING SYSTEM BOOTSTRAP.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
OSB SPACE 4,10
***** OSB - OPERATING SYSTEM BOOTSTRAP.
*
* P. D. HAAS. 78/07/31.
OSB SPACE 4,10
*** *OSB* IS THE OPERATING SYSTEM BOOTSTRAP LOADED BY
* *CTI*. ITS SOLE PURPOSE IS TO LOAD *DIO* FROM THE DEAD-
* START MEDIUM TO THE PP ON THE DISPLAY CHANNEL.
SPACE 4,10
*** OPERATOR MESSAGES.
*
* *ERROR LOADING -DIO-.*
OSB SPACE 4,10
*CALL COMPMAC
*CALL COMSDSL
*CALL COMSMSP
*CALL COMSPIM
FWDL$ EQU 1 LINK CHANNEL INSTRUCTIONS FORWARD
*CALL COMPCHL
OSB SPACE 4,10
**** DIRECT LOCATION ASSIGNMENTS.
LOC 20
DT BSS 1 895 DEADSTART READ FLAG
ERRNZ DT-MP DIRECT CELL LOCATION IN *DIO* MUST MATCH
UN BSS 4 PHYSICAL DISK ADDRESS
L1 BSS 1 SCRATCH
L2 BSS 1 SCRATCH
AP BSS 1 DISK ADDRESS POINTER
****
OSB SPACE 4,10
** ASSEMBLY CONSTANTS.
BUF EQU 100 BUFFER ADDRESS
TITLE MAIN ROUTINE.
OSB SPACE 4,10
ORG DSLA+5*20
OSB LDM DPW10A DEADSTART CHANNEL
LPN 37
STD CM
LDC CH01$ SET ADDRESS OF FIRST CHANNEL INSTRUCTION
STD T1
LDM DCST SET DISPLAY CONSOLE STATUS
STD LA
LDN 0
OSB1 RAD T1 ADDRESS OF CURRENT CHANNEL INSTRUCTION
LDI T1 SAVE LINK TO NEXT INSTRUCTION
LPN 37
STD T2
LDD CM MODIFY CHANNEL INSTRUCTION
SBD T2
RAI T1
LDD T2
NJN OSB1 IF MORE INSTRUCTIONS TO MODIFY
STD DT PRESET NOT 895 DEVICE TYPE
RJM RDR READ DISK (TAPE) RECORD
ZJN ERR IF LOAD ERRORS
LDM BUF+5*1+1 CHECK RECORD NAME
SHN 6
LMM BUF+5*1+0
LMC 3RODI
NJN ERR IF NOT *DIO*
LDM PPSDA GET PP SPEED
STD T3
LDC MXRL TRANSMIT *DIO*
OAM. BUF+5*20,CH
LDN 77 TRANSMIT PARAMETERS
OAM. 0,CH
DCN. MR+40
CCF. *+2,MX ALLOW *MDD* TO EXECUTE
DCN. CH+40
ACN. CH
IAM. 0,CH INPUT *SET*
ERR LDD LA
ZJN ERR1 IF DEADSTART FROM CC545 CONSOLE
LCN 0 CLEAR DISPLAY
RJM CDDP
LCN 77-ERRA+ERR1
RAM ERRA
ERR1 LDC ERRB DISPLAY ERROR MESSAGE
RJM CDDP
ERRA UJN ERR1 HANG PP IN LOOP
ERRB CON ERRC
CON 0
ERRC CON 113
DATA C*ERROR LOADING -DIO-.*
TITLE MAJOR SUBROUTINES.
RDR SPACE 4,10
** RDR - READ DISK RECORD.
*
* EXIT (A) = 0 IF ERROR.
* (T4) = UNIT NUMBER.
* (T5) = SEEK FUNCTION + ALGORITHM INDEX.
*
* USES T1, T6, T7, UN.
*
* CALLS POS, RNS, RTR.
RDR4 RJM RTR READ TAPE RECORD
RDR SUBR ENTRY/EXIT
LDM DPW5A DEADSTART PANEL WORD 5
ZJN RDR4 IF TAPE DEADSTART
LDM OSDPA+3 *OSB* SEEK FUNCTION
STD T5
SHN 14
STM POSA
SHN -14
LMN AIDC
NJN RDR0 IF NOT 895
LDC 2000 SET 895 DEADSTART FLAG ON SEEK
STD DT SAVE 895 DEADSTART FLAG FOR *DIO*
SHN 6-12
RAM POSB
SOM POSC
RDR0 LDM OSDPA+4 *OSB* TRACK
STD T6
LDM DSLA-2 FIRST *DIO* SECTOR FROM *OSB* LINKAGE
STD T7
SHN 21-13
PJN RDR1 IF NOT TRACK SWITCH
SHN 13-21
STD T6 SET NEXT TRACK
LDN 0
STD T7
RDR1 LDM DPW6A UNIT NUMBER
LPN 77
STD UN
STD T4
LDC OSRPA DISK ADDRESS POINTER
STD AP
LDC BUF SET BUFFER ADDRESS
STD T1
RJM POS POSITION MASS STORAGE
RDR2 LDD T1 READ NEXT SECTOR
RJM RNS
PJN RDR3 IF ERROR / EOR
LDC DSLN ADVANCE BUFFER ADDRESS
RAD T1
LMC BUF+TPLN
NJN RDR2 IF NOT GREATER THAN TAPE PRU
RDR3 LJM RDRX RETURN
RTR SPACE 4,10
** RTR - READ TAPE RECORD.
*
* EXIT (A) = 0 IF ERROR.
* (T6) = 0.
* (T7) = DEADSTART FUNCTION.
RTR SUBR ENTRY/EXIT
LDM DPW6A DEADSTART FUNCTION
STD T7
LPC 7000 EXTRACT EQUIPMENT NUMBER
RAM RTRA
RTR2 LDN 0 SET TAPE DEADSTART FLAG
STD T6
FNC 40,0
RTRA EQU *-1
LDC TPLN+4 INPUT TAPE RECORD
ACN 0
IAM BUF,0
UJN RTRX RETURN
TITLE SUBROUTINES.
GDS SPACE 4,10
** GDS - GET DISK STATUS.
*
* EXIT (A) = GENERAL STATUS.
GDS SUBR ENTRY/EXIT
FNC 12,0 GET GENERAL STATUS
ACN 0
IAN 0
UJN GDSX RETURN
POS SPACE 4,15
** POS - POSITION MASS STORAGE.
*
* ENTRY (AP) = POINTER TO DISK ADDRESS.
* (UN) = UNIT NUMBER.
* (POSA) = SEEK FUNCTION.
*
* EXIT (UN+1) = PHYSICAL CYLINDER.
* (UN+2) = PHYSICAL TRACK.
* (UN+3) = PHYSICAL SECTOR.
* (AP) ADVANCED TO NEXT ADDRESS.
*
* CALLS GDS.
POS SUBR ENTRY/EXIT
LDI AP SET CYLINDER
STD UN+1
AOD AP ADVANCE ADDRESS POINTER
LDI AP UNPACK SECTOR
LPC 77
POSB EQU *-1
* LPC 177 (IF 895)
STD UN+3
LDI AP SET TRACK
POSC SHN -6
* SHN -7 (IF 895)
LMD DT SET 895 DEADSTART READ FLAG
STD UN+2
AOD AP ADVANCE POINTER ADDRESS
POS1 FNC 2,0 SEEK FUNCTION
POSA EQU *-1
* FNC 1,0 (1 TO 1 INTERLACE)
ACN 0
LDN 4 OUTPUT SEEK PARAMETERS
OAM UN,0
FJM *,0
DCN 0+40
RJM GDS GET DISK STATUS
ZJN POSX IF READY
UJN POS1 LOOP UNTIL READY
RNS SPACE 4,10
** RNS - READ NEXT SECTOR.
*
* ENTRY (A) = READ ADDRESS.
*
* EXIT (A) = 0 IF ERROR.
* .GT. 0 IF EOR.
* .LT. 0 IF FULL SECTOR WORD COUNT.
* (T6) = LOGICAL TRACK FOR NEXT READ.
* (T7) = LOGICAL SECTOR FOR NEXT READ.
*
* USES T3, L1, L2.
*
* CALLS GDS, POS.
RNS SUBR ENTRY/EXIT
SBN 2 SET READ ADDRESS
STD T3
STM RNSA
LDI T3 SAVE LOCATIONS OVERLAID BY LINKAGE
STD L1
LDM 1,T3
STD L2
FNC 4,0 READ DISK SECTOR
LDC DSLN+2
ACN 0
IAM BUF,0
RNSA EQU *-1
RNS1 RJM GDS GET DISK STATUS
NJN RNS1 IF NOT READY
AOD T7 ADVANCE LOGICAL SECTOR
LMI T3
ZJN RNS2 IF MATCHING SECTOR LINKAGE
LDN 0 SET FIRST SECTOR
STD T7
LDI T3 SET NEXT TRACK
STD T6
SHN 0-13
ZJN RNS3 IF NOT TRACK SWITCH
RJM POS POSITION MASS STORAGE
RNS2 LDD L1 RESTORE CELLS OVERLAID BY LINKAGE
STI T3
AOD T3
LDI T3
SHN -6
SHN 21-0 SIGN BIT = FULL SECTOR FLAG
LMD L2
STI T3
ADN 1 NO ERROR ON EOR
RNS3 LJM RNSX RETURN
SPACE 4,10
HERE TERMINATE LINKED CHANNEL INSTRUCTIONS
SPACE 4,10
ERRPL *-DSLA-473 *OSB* OVERFLOWS ONE SECTOR
END