IDENT GETMST
ENTRY GETMST
SST
SPACE 4
*** GETMST - GET FIELDS FOR A DEVICE FROM THE *MST*.
*
* GETMST(EO,STAT,TYPE,FAM,DN,NUM,TPRU,SECT,MSKP,MSKS).
* (*SYMPL* CALL)
*
* ENTRY (EO) = *EST* ORDINAL.
*
* EXIT (STAT) = -2, INVALID ORDINAL.
* -1, NO MORE DISK ENTRIES.
* 1, EQUIPMENT (EO) IS NOT A DISK.
* 0, EQUIPMENT (EO) IS A DISK.
*
* IF (STAT) = 0, THE FOLLOWING PARAMETERS
* ARE MEANINGFUL.
* (TYPE) = DEVICE TYPE, FROM *EST* ENTRY (12/DT,48/0).
* (FAM) = FAMILY, FROM *MST* ENTRY (42/FAM,18/0).
* (DN) = DEVICE NUMBER, FROM *MST* ENTRY.
* (NUM) = NUMBER OF PHYSICAL DEVICES.
* (TPRU) = TOTAL *PRU* ON THIS DEVICE.
* (SECT) = NUMBER OF SECTORS PER TRACK.
* (MSKP) = PRIMARY DEVICE MASK.
* (MSKS) = SECONDARY DEVICE MASK.
*
* USES X - ALL.
* A - 1,2,3,4,5,6.
* B - 1.
SPACE 2
GETMST BSS 1
SB1 1
SX6 A1
MX0 60-24
SA6 PARM SAVE PARAMETER LIST ADDRESS.
* IF FIRST CALL, FETCH *EST* POINTER FROM LOW CORE.
SA2 ESTFWA
NZ X2,GM1 IF NOT FIRST CALL
SX3 ESTP
SX4 ESTWORD
SX5 B1
RJ RLC READ POINTER TO *EST*
SA2 ESTWORD
LX2 24-0
BX6 -X0*X2 EXTRACT FWA OF *EST*
SA6 ESTFWA
LX2 36-12
MX4 60-12
BX7 -X4*X2 EXTRACT ORDINAL OF LAST RMS
SX7 X7-1
SX3 ESTE GET *EST* ENTRY SIZE
IX7 X3*X7
IX7 X6+X7
SX7 X7+B1 DETERMINE LWA OF *EST*
SA7 LWARMS
BX2 X6
* VERIFY DESIRED ORDINAL IS VALID AND READ ITS *EST* ENTRY.
GM1 BSS 0
SA1 PARM
SA1 X1
SA1 X1 FETCH *EST* ORDINAL
SX6 -2
SB2 X1
LT B2,B1,GM2
SX3 ESTE
IX4 X1*X3
SB2 X4
SA5 LWARMS
SX3 X2+B2 ADDRESS OF DESIRED *EST* ENTRY
IX5 X3-X5
SX6 -B1
PL X5,GM2 IF ORDINAL TOO BIG
SX4 ESTENT
SX5 B1
RJ RLC READ *EST* ENTRY FOR SUPPLIED ORDINAL
SA1 ESTENT
SX6 B1
PL X1,GM2 IF NOT A DISK
SX6 B0
* X6 .NE. 0 IF ORDINAL IS NOT OK.
* X1 = CONTENT OF *EST* ENTRY.
* X0 = MASK FROM MX0 48.
GM2 BSS 0
SA5 PARM
SA2 X5+B1 FETCH ADD(STAT)
SA6 X2 (STAT) = REQUEST STATUS
NZ X6,GETMST RETURN IF NOT A DISK
MX0 48
BX3 -X0*X1
LX1 60-12
BX6 -X0*X1 EXTRACT DEVICE TYPE
LX6 60-12
SA2 A2+B1
SA6 X2 (TYPE) = DEVICE TYPE
SX4 MST
LX3 3 CONVERT TO *MST* ADDRESS
SX5 ISGL
SX3 X3+TDGL
RJ RLC READ *MST* ENTRY
SPACE 2
* EXTRACT NEEDED DATA FROM THE *MST* ENTRY TO
* PROVIDE THE REPLY PARAMETERS.
SA5 MST+PFGL-TDGL
SA2 A2+B1
MX7 42
BX6 X7*X5
SA6 X2 (FAM) = FAMILY
BX6 -X7*X5 DN*2**12
AX6 12
SA2 A2+B1
SA6 X2 (DN) = DEVICE NUMBER
MX7 60-3
BX6 -X7*X5 EXTRACT NUMBER OF DEVICES -1
SX6 X6+B1
SA2 A2+B1
SA6 X2 (NUM) = NUMBER OF DEVICES
* CALCULATE TOTAL SECTORS.
* = NUMBER OF TRACKS ON EACH DEVICE.
* * SECTORS PER TRACK (SECTOR LIMIT)
SA3 MST+TDGL-TDGL
LX3 12
BX4 -X0*X3 NUMBER OF TRACKS OF EACH PHYSICAL DEVICE
SA3 MST+MDGL-TDGL
BX3 -X0*X3
IX6 X4*X3
SA2 A2+B1
BX7 X3
SA6 X2 (TPRU) = TOTAL SECTORS
SA2 A2+B1
SA7 X2 (SECT) = NUMBER OF SECTORS PER TRACK
SPACE 2
SA5 MST+PUGL-TDGL FETCH DEVICE MASKS
MX7 60-8
BX6 -X7*X5
SA2 A2+B1
SA6 X2 (MSKP) = PRIMARY DEVICE MASK
LX5 60-8
BX6 -X7*X5
SA2 A2+B1
SA6 X2 (MSKS) = SECONDARY DEVICE MASK
EQ GETMST
SPACE 4
** RLC - READ LOW CORE.
*
* ENTRY (X3) = ADDRESS TO BE READ FROM LOW CORE.
* (X4) = ADDRESS OF BUFFER TO HOLD RESULTS OF READ.
* (X5) = WORD COUNT.
SPACE 2
RLC BSS 1
MX6 1
SA6 X4
LX5 36
LX3 18
BX6 X3+X4
BX6 X6+X5
SA6 RSBA
SYSTEM RSB,R,RSBA
EQ RLC
SPACE 4
PARM BSS 1
ESTES BSS 1
ESTFWA DATA 0
ESTWORD BSS 1
LWARMS BSS 1
ESTENT BSS 1
MST BSS ISGL
RSBA BSS 1
END