
ASMB,A,B,L,F   2000F (OPTION 200/205) TSB SYSTEM
*                        VERSION B      FEBRUARY 14, 1974 
      ORG 2002B 
* 
*  LINKAGE INFORMATION USED BY THE TSB LOADER AND THE 
*  MAG TAPE DUMP. 
* 
      DEF LIBRA     SYSTEM LIBRARY PROGRAM ORIGIN 
      DEF COM6      => SYSTEM LIBRARY DISC ADDRESSES
      ABS TTY01-TTY00    LENGTH OF A TTY TABLE
      DEF TTY00+?DISC    ADDRESS OF USER DISC ADDRESS 
      DEF TTY00+?ID      ADDRESS OF ID-NAME 
      DEF LNAME     ADDRESS OF USER-DEPENDENT ITEMS 
      ABS USER-PROGB-1   LENGTH OF SWAP AREA
      DEF USER      CORE ADDRESS OF SWAP AREA 
      DEF TSB       SYSTEM STARTING ADDRESS 
      JSB POWIN,I   TO GO INTO LOC 4. 
      DEF GMQB      MESSAGE BUFFER GETTER 
      ABS $SLPL-LIBRA   NUMBER OF LIBRARY PROGRAMS
      HED BASE PAGE 
A     EQU 0         A REGISTER ADDRESS
B     EQU 1         B REGISTER ADDRESS
DEATH EQU 0 
FTEL  EQU 15        FILE TABLE ENTRY LENTH
      ORG 2 
      HLT DEATH+2   FOR SYSTEM
      JMP *-1         PROTECTION
      HLT 4,C       CHANGED BY LOADER.
      HLT DEATH+5   PARITY ERROR
      CLC 6,C 
      CLC 7,C 
CH1   JSB R14DR,I   COMMUNICATION FROM I/O PROCESSOR
CH2   HLT DEATH+11B 
?SC   JSB T35DR,I   CONSOLE LINK
      CLC 13B,C 
CLOCK JSB CLKDR,I   CLOCKLINK 
      SPC 2 
* 
**    TEMPORARIES AND POINTERS
* 
      ORG 30B 
LTEMP BSS 16        TEMPS USED BY NONRESIDENT FUNCS.
MOVES BSS 1         SOURCE AND DESTINATION
MOVED BSS 1           FOR MOVEW ROUTINE.
ID    BSS 1         USED FOR RESULTS OF GETID ROUTINE.
MID   BSS 1 
T35CP BSS 1         T35 BUFFER PNTR FOR LIBR.PROGS. 
T35LC BSS 1         RESULT OF T35CH ROUTINE.
PBPTR BSS 1         POINTER TO END OF CURRENT PROGRAM 
TIMER BSS 1         POINTS TO CLOCK OF ACTIVE USER. 
SBHED BSS 1 
SCHL  BSS 1 
TTQ   BSS 1 
SCHID BSS 1 
SCHP  BSS 1 
SCNT  BSS 1 
SCHT  BSS 1 
SCHPR BSS 1 
CMA   BSS 1 
CMB   BSS 1 
CME   BSS 1 
SVCH2 BSS 1 
TCNT  BSS 1 
IDTAD BSS 1         => IDT DISC ADDRESS 
IDTLN BSS 1         => IDT TRACK LENGTH 
STDAP BSS 1         SYSTEM TABLE DISC ADDRESS POINTR
      SKP 
* 
********************************************************************************
* 
*     BEGINNING OF EQUIPMENT TABLE
* 
*  THE NEXT SECTION, ORIGINED AT 100B, CONSTITUTES THE RESIDENT 
*  INFORMATION ABOUT THE DISC RESIDENT TABLES.  THESE TABLES ARE
*  INITIALIZED BY THE VARIOUS LOADERS AND THEIR CONTENTS ARE
*  WRITTEN ON DISC BY THE SLEEP ROUTINE.
* 
      ORG 100B
IDEC  BSS 12        ID TABLE HEADERS
*                                   EACH 4 WORD ENTRY CONSISTS OF:
*                                     1) FIRST ID ON THE TRACK
*                                     2) DISC 
*                                     3)   ADDRESS
*                                     4) LENGTH IN -WORDS 
NIDT  BSS 1         NUMBER OF ID TRACKS 
      SPC 1 
NDIRT BSS 1         NUMBER OF DIRECTORY TRACKS/DISC 
      SPC 1 
ADTAT BSS 24        ADT DISC ADDRESS TABLE
*                                   EACH 3 WORD ENTRY CONSISTS OF:
*                                     1) DISC 
*                                     2)   ADDRESS
*                                     3) LENGTH IN -WORDS 
ADTLN EQU ADTAT+2   POINTS TO LENGTH OF DISC 0
      SPC 1 
DKTBL BSS 8         DISC SELECT CODE/UNIT NUMBER
DADSL BSS 2         DISC ADDRESS OF SYSTEM LIBRARY
DLNSL BSS 1         DISC LENGTH OF SYSTEM LIBRARY 
SYSID BSS 5         SYSTEM IDENTIFICATION 
MAGSC BSS 1         MAG TAPE SELECT CODE
NPORT BSS 1         -NUMBER OF AVAILABLE PORTS
YEAR  BSS 1         CURRENT YEAR - 0 TO 99
DATIM BSS 2         TWO WORD ENTRY FOR TIME OF YEAR 
*                                     1) HOUR OF YEAR 
*                                     2) # OF 100MS UNITS IN HOUR 
HDATE BSS 1         LAST HIBERNATE DATE 
SLEPT BSS 1         0 SEZ SLEPT, -1 SEZ NO
* 
*     END OF THE EQUIPMENT TABLE
* 
*********************************************************************** 
* 
LDBSA BSS 1         DISC BOOTSTRAP ADDRESS
LSTDA BSS 1         LOADER SEGMENT TABLE ADDRESS
MHAD  BSS 1         ADDRESS OF M. H. DISC TABLE 
GMQBP BSS 1         => MESSAGE BUFFER GETTER
DISCA BSS 1         ADDRESS OF DISC DRIVER ENTRY
DISCB BSS 1         DISC DRIVER INTERRUPT ENTRY ADDR
MBUSY BSS 1         DISC DRIVER BUSY FLAG 
MWORD BSS 1         DISC REQUESTED WORD COUNT 
DREDP BSS 1         => DISC AUTO RESTART ROUTINE
* 
*     END OF AREA THAT MUST CORRESPOND WITH THE LOADER
* 
*********************************************************************** 
* 
DISCZ DEF ZDISC 
* 
* 
**    DISC ERROR ROUTINE POINTERS 
* 
SICKP DEF SICK      SYSTEM TRACK CAN'T BE READ
PTZAP DEF JETPT     SWAP TRACK CAN'T BE READ/WRITTEN
SLVAG DEF SALVG     SYSTEM TRACK CAN'T BE WRITTEN 
DEADP DEF DEAD      SYSTEM TRACKS INCOMPATABLE
      SPC 3 
* 
**
***    MUERTO 
**
* 
*   ALL SYSTEM HALTS CAN BE REFERENCED BY THE LABEL 'DEATH'.  THE 
*   FOLLOWING IS A LIST OF THE HALTS AND THEIR MEANINGS AS WELL 
*   AS AN INDICATION OF POSSIBLE RECOVERY OR A MESSAGE OF DOOM. 
* 
*       2  - ERRONEOUS, NON-RECOVERABLE SYSTEM TRANSFER HAS OCCURRED
* 
*       5  - A PARITY ERROR HAS OCCURRED.  CHECK THE HARDWARE.
* 
*      11B - UNEXPECTED INTERRUPT FROM THE PROCESSOR INTERCONNECT.
*              TAKE A COLD DUMP OF THIS UNRECOVERABLE SYSTEM. 
* 
*      30B - DISC DRIVER IS BUSY.  RECOVERY NOT POSSIBLE. 
* 
*      31B - DISC CALLED IS NOT PRESENT.  NO WAY TO RECOVER.
* 
*      32B - DISC ERROR WHILE WRITING A SYSTEM TRACK.  SYSTEM 
*              TRACK HAS BEEN MOVED AND ALL TABLES HAVE BEEN
*              UPDATED.  RECOVERY IS POSSIBLE.
* 
*      33B - DISC ERROR WHILE READING TRACK OR WRITING NON- 
*              ESSENTIAL TRACK.  RECOVERY IS POSSIBLE.
* 
*      34B - DISC ERROR CAUSING THE SYSTEM TABLES TO BE INCOMPAT- 
*              ABLE.  RECOVERY IS OUT OF THE QUESTION.
* 
*      35B - A DIRECTORY TRACK COULD NOT BE FOUND.  RECOVERY IS 
*              IMPOSSIBLE.
* 
*      36B - POWERFAIL HAS OCCURRED.  CHECK RESTART SWITCH POSITION.
* 
*      37B - BAD ADT DISC ADDRESS GENERATED.  RECOVERY - NO WAY.
* 
      SKP 
* 
**    I/O PROCESSOR SEND DRIVER OPCODES 
* 
OCR   OCT 000000    OUTPUT CHARACTER
STE   OCT 020000    START TIMING ENTER
GTC   OCT 040000    GET CHARACTER 
PHO   OCT 060000    PHONES TIME 
SPE   OCT 100000    BAUD RATE INFO
SBP   OCT 120000    SAVE BUFFER POINTER 
RBP   OCT 140000    RESTORE BUFFER POINTER
FBP   EQU SBP       FREE SAVED SPACE
INI   OCT 160000    INITIALIZE SYSTEM 
UIR   OCT 160001    USER IS RUNNING 
UNR   OCT 160002    USER NOT RUNNING
IWT   OCT 160003    INPUT WAIT
HUU   OCT 160004    HANG USER UP
ULO   OCT 160005    USER LOGGED ON
ECO   OCT 160006    ECHO-ON 
ECF   OCT 160007    ECHO-OFF
TPO   OCT 160010    TAPE MODE ON
ILI   OCT 160011    ILLEGAL INPUT?
NUC   OCT 160012    NEW USER CALLED 
KAO   OCT 160013    KILL ALL OUTPUT 
ALI   OCT 160014    ALLOW INPUT 
OWT   OCT 160015    OUTPUT WAIT 
IBF   OCT 160016    IS BUFFER FULL? 
PSC   OCT 160017    LINE PRINTER SELECT CODE
LPR   OCT 160020    LINE PRINTER REQUEST
LPD   OCT 160021    LINE PRINTER DISCONNECT 
LPS   OCT 160022    LINE PRINTER STATUS 
BKS   OCT 160023    BACKSPACE IN BUFFER 
CHS   OCT 160024    CHARACTER SIZE
STP   OCT 160025    SUBTYPE INFO
GRP   OCT 160026    GET RECEIVE PARAMETER 
ABT   OCT 160027    USER IS BEING ABORTED 
WTP   OCT 160030    WHAT TERMINAL TYPE? 
*               KSN   OCT 160031    I/O PROCESSOR CORE DUMP 
      SPC 2 
* 
**        SYSTEM STATUS VARIABLES 
* 
PRIST NOP           LP INDICATOR
LFLAG NOP 
NACTP DEC -1        NUMBER OF USERS+1            [B]
MAIN  NOP           INDICATES USER IN CORE,0 IF NONE
LIB   NOP           => DISC ADDRESS OF LIBRARY
*                                     PROGRAM IN CORE, 0 IF NONE
DIRWD NOP           => DISC ADDRESS OF DIRECTORY
*                                     TRACK IN CORE, 0 IF NONE
HQDIS NOP           = 0 UNLESS HEAD OF QUEUE
*                                     IS DISCONNECTED 
* 
ULEN  EQU 10240     LENGTH OF USER AREA 
LIBRA EQU 75000B    SYSTEM LIBRARY PROGRAM ADDRESS
      SKP 
* 
**
***     POINTERS AND TEMPORARIES FOR ASR-35 DRIVER
**
* 
T35FG NOP           PSEUDO-FLAG;MUST BE 11
*                                     WORDS BEFORE T35CL
TIMEF NOP           = 1 WHEN CURRENT PROGRAM
*                                     IS TIMED
T35LN DEF T35LK 
LCHCR NOP 
READY DEF *+1 
      OCT 5122      LF-R
      ASC 2,EADY
MLINK DEF *+1       POINTS TO BASIC QUEUE ENTRY.
      DEF *         LINK TO HEAD OF QUEUE.
      OCT 77777     MAX. PRIORITY USED FOR Q INSERTS
INF   EQU MLINK+2 
* 
**    TTY TABLE ENTRY FOR TTY35 
* 
T35CL NOP           PSEUDO CLOCK. 
T35RS NOP           RESTART ADDRESS 
T35ST NOP           STATUS
T35LK NOP           LINK
T35PR NOP           PRIORITY
* 
T35B2 ABS T35BF+T35BF  CHAR POINTER TO TTY35 BUFFER 
T35ND ABS T35BF+T35BF+72  POINTS TO END OF BUFFER 
T35B1 DEF T35BF     POINTS TO WORD ADDRESS OF BUFFER
      SPC 2 
MESLN EQU 39        LENGTH OF OPERATOR MESSAGES 
MESBN EQU MESLN+MESLN+MESLN+MESLN+MESLN+MESLN 
MSQCT OCT 0         MESSAGE COUNTER 
MSQP1 DEF MSQHD+MESBN-MESLN 
MSQP3 DEF MSQHD 
MSQND DEF MSQHD+MESBN LIMITS
MSQBG DEF MSQHD         OF MESSAGE QUEUE
      SPC 2 
T35F1 NOP           SYSTEM
T35F2 NOP            CONSOLE
T35F3 NOP             FLAGS 
      SKP 
* 
**   GENERAL USAGE CONSTANTS
* 
      SUP 
M8184 DEC -8184 
M512  DEC -512
M256  DEC -256
M96   OCT -140
D100  OCT -100
M73   DEC -73 
D72   OCT -72 
M72B  EQU D72 
      DEC -28,-27,-26,-25,-24,-23,-22,-21 
      DEC -20,-19,-18,-17,-16,-15,-14,-13,-12,-11 
      DEC -10,-9,-8,-7,-6,-5,-4,-3,-2,-1
.     DEC 0,1,2,3,4,5,6,7,8,9 
      DEC 10,11,12,13,14,15,16,17,18,19 
      DEC 20,21,22,23,24,25,26,27,28,29 
      DEC 30,31,32,33,34,35,36,37,38,39 
      DEC 40,41,42,43,44,45,46,47,48,49 
      DEC 50,51 
BIT14 EQU GTC 
%ABOR EQU .+1 
%INPT EQU .+2 
%OUTW EQU .+3 
%SYNT EQU .+4 
%DISC EQU .-2 
%ENTO EQU .-3 
%PUN  EQU .-4 
      UNS 
      SKP 
* 
* 
**  LANGUAGE PROCESSOR CONSTANTS AND ADDRESSES
* 
DFILT DEF FLSTS 
SBJTB DEF #FSC
SYNTA DEF SYNTX 
      DEF #SBCK 
M32   DEC -32 
      DEF #FRCR 
.58   DEC 58
      DEF #FPOP 
B73   OCT 73
      DEF #VROP 
D60   DEC 60
      DEF #ARID 
B77   OCT 77
      DEF #PGIN 
B100  OCT 100 
      DEF #TBSR 
E     OCT 105 
      DEF #GTPF 
.72   DEC 72
      DEF #LPCK 
.140  OCT 140 
      DEF #RPCK 
.100  DEC 100 
      DEF #LTR
B177  OCT 177 
      DEF #STOP 
B200  OCT 200 
      DEF #CRST 
B377  OCT 377 
      DEF #DGCK 
B400  OCT 400 
      DEF #LTCK 
B777  OCT 777 
      DEF #SBPU 
B1000 OCT 1000
      DEF #SYCK 
D600  DEC 600 
      DEF #FINC 
B1777 OCT 1777
      DEF #NMCK 
B2000 OCT 2000
      DEF #MB10 
B3000 OCT 3000
      DEF #DB10 
B4000 OCT 4000
      DEF #NRML 
B20M  OCT 20000 
      DEF #PACK 
B30M  OCT 30000 
      DEF #OVFL 
D36K  ABS 30000+6000
      DEF #DLPR 
ASC00 ASC 1,00
      DEF #FDPS 
ASCBB ASC 1,
      DEF #SSYM 
COMOP OCT 45000 
      DEF #ASYM 
DATOP OCT 62000 
      DEF #DCMP 
DIMOP OCT 47000 
      DEF #PNST 
ENDOP OCT 60000 
      DEF #CUSP 
FILOP OCT 70000 
      DEF #STRI 
IMGOP OCT 44000 
      DEF #RSTO 
INTFL OCT 100003
      DEF #GTST 
LETOP OCT 73000 
      DEF #FORM 
LBOP  OCT 12000 
      DEF #STST 
LPOP  OCT 13000 
      DEF #SBFX 
MULOP OCT 22000 
      DEF #PSTR 
NXTOP OCT 55000 
      DEF #OUCK 
OFOP  OCT 174003
      DEF #TRST 
OPDMK OCT 100777
      DEF #CMPR 
OPMSK OCT 77000 
      DEF #PCHK 
PDFFL OCT 100017
      DEF #FTCH 
PRTOP OCT 65000 
      DEF #STDP 
REMOP OCT 51000 
      DEF #FDAT 
RPOP  OCT 10000 
      DEF #FSCH 
SCOMM OCT 16000 
      DEF #PSHS 
USEOP OCT 43000 
      DEF #ARIN 
#LIB# DEF LIBRA 
      DEF #BNOP 
#LIBI DEF LIBRA,I 
      DEF #STTP 
M2000 OCT 176000
      DEF #OPCK 
ABCK  DEF ABCHK 
      DEF #RSCK 
ACC5A DEF ACCS5 
      DEF #FAD
ACCSA DEF ACCST 
      DEF #FSB
ANOT  DEF NOT 
      DEF #FMP
ATAB  DEF TAB 
      DEF #FDV
ATHEN DEF THEN
      DEF #FLUN 
CLKDR DEF CLKIN 
      DEF #IFIX 
DCLC1 DEF CLC1
      DEF #ENOT 
DCLC2 DEF CLC2
      DEF #NMOT 
DEH   DEF EH
      DEF #GTDG 
DLTEM DEF LTEMP 
      DEF #OTLN 
DTT32 DEF TTY32 
      DEF #EDLM 
DTTY0 DEF TTY00 
      DEF #STPT 
ERS32 DEF ERSEC+32
      DEF #EXP
ERSCA DEF ERSEC 
      DEF #LOG
EXITA DEF EXIT
      DEF #CHEB 
FCUCA DEF FCUC
      DEF #IENT 
FDT4A DEF FDAT4 
      DEF #PWR2 
FOPBS DEF QUOTE-2 
      DEF #INCL 
FRET  DEF FOR10 
      DEF #GTCR 
FSCHA DEF FSCH
      DEF #BKSP 
FUSS  DEF COM6+2    POINTER TO DISC ADDRESS OF FUSS 
      DEF #OTCR 
IHB   DEF HB
      DEF #OTIN 
L1024 DEF LIBUS+1024
      DEF #MCOT 
L8192 DEF LIBUS+8192
      DEF #OTST 
LIBD  DEF LIBUS 
      DEF #SINI 
LIBDI DEF LIBUS,I 
      DEF #BLDI 
LOGBG DEF LOGGR     POINTS TO BEGINNING OF LOGGR
      DEF #RDIM 
LOGND DEF LOGGR+64  POINTS TO END OF LOGGR
      DEF #VCHK 
LOGP1 DEF LOGGR+63  POINTERS TO FIRST AND 
      DEF #SERR 
LOGP2 DEF LOGGR+63    LAST ENTRIES IN LOGGR 
      DEF #CHOU 
LULEN DEF LIBUS+ULEN
      DEF #MOVE 
LW97  DEF USER+ULEN-97
      DEF #RECR 
LWAUS DEF USER+ULEN 
      DEF #FILR 
MCBOP DEF MCBOS 
      DEF #VLFI 
ONEI  DEF 1,I 
      DEF #RQST 
OUTCH DEF #OUTC 
      DEF #FILS 
PBUFF DEF PROGB+1 
      DEF #GTTY 
PDFNS DEF PRDFS 
      DEF #WRBU 
POWIN DEF POW 
      DEF #ALCO 
R14DR DEF R14CM 
      DEF #RSTP 
S14SC DEF S14SH 
      DEF #FENC 
SCHEN DEF SCHEQ 
      DEF #MTG1 
SCHIN DEF SCHIQ     LINKAGE FOR INPUT REQUEST.
      DEF #DTL1 
SCHLB DEF SCHLQ 
      DEF #RUND 
SCOM1 DEF COM1
      DEF #OTBL 
SCOM5 DEF COM5-1
      DEF #OTCL 
STBAS DEF SYNTB-42B,I 
      DEF #DSCH 
T35CH DEF T35CQ 
      DEF #MCHR 
T35DR DEF ?TT2
      DEF #EVEP 
TTY35 DEF ?TT35 
      DEF #USCK 
XEC1A DEF XEC1
      DEF #PFSH 
XEC3I DEF XEC3
      DEF #FRMT 
XEC5I DEF XEC5
      DEF #EPRU 
MAXSN DEC -10000
      DEF #SLCK 
LOGCT NOP           NUMBER OF ELEMENTS IN LOGGR 
      DEF #LCDL 
MLIBD ABS -LIBUS
      DEF #FCUC 
MULEN ABS -ULEN 
      DEF #EDAB 
PDFBS JMP PDFTB-1,I 
S14LP EQU S14SC 
* 
**  FUNCTION EXECUTION ENTRY ADDRESSES
* 
PDFTB DEF ETAB
      DEF ELIN
      DEF ESPA
      DEF ETAN
      DEF EATN
      DEF EEXP
      DEF ELOG
      DEF EABS
      DEF ESQR
      DEF EINT
      DEF ERND
      DEF ESGN
LDVSR DEF DVSRS     'LEN' IS DONE IN A SPECIAL WAY
      DEF ETYP
      DEF ETIM
      DEF ESIN
      DEF ECOS
      DEF EBRK
      SPC 2 
DVSRS DEC 10000 
      DEC 1000
      DEC 100 
      DEC 10
MNEG  OCT 100000
      OCT 376 
HALF  DEC 0.5 
M64   EQU D100
HIMSK EQU M256
EOF   EQU .-1 
EOR   EQU .-2 
BIT15 EQU MNEG
A000  EQU B2000 
* 
* THE FOLLOWING CONSTANTS ARE MASKS FOR THE BIT-FLAG WORD 
*  IN EACH USER'S TTY TABLE 
* 
TERR  EQU .+1       TAPE ERROR
CFLAG EQU .+2       COMPILE MODE
HFLAG EQU .+4       $HELLO IS RUNNING 
TAPEF EQU .+8       USER IN TAPE MODE 
UNABT EQU .+16      UNABLE TO ABORT 
OUTWT EQU .+32      OUTPUT BUFFER FULL
COM14 EQU B100      COMMUNICATION FROM 2114 
ABTRY EQU B200      ABORT ATTEMPT 
DFCHK EQU B400      CHECK FOR DIRTY FILES 
CHNFG EQU B1000     CHAIN RUNNING 
PUALT EQU B2000     PROGRAM UNALTERED            [B]
MBUST EQU B4000     MBUSY POSITIVE
PBFLG EQU RPOP      ABORT CAPABILITY DISABLED 
CBFLG EQU B20M      "BREAK" COMMAND GIVEN 
* 
**  ERROR JUMP TABLE
* 
SERRS DEF SERR
      REP 35
      DEF SERR
RERRS DEF SERR
      REP 50
      DEF SERR
FERRS DEF SERR
      REP 14
      DEF SERR
WERRS DEF SERR
      REP 9 
      DEF SERR
