Trailing-Edge
-
PDP-10 Archives
-
bb-kl11c-bm_tops20_v6_1_atpch1_16
-
autopatch/ddt.c16
There are no other files named ddt.c16 in the archive.
REP 1/1 ;16C1
; UPD ID= 113, SNARK:<6.1.UTILITIES>DDT.MAC.15, 12-Apr-85 12:28:46 by JMARTIN
SUBTTL DDT /TW/PFC/TWE/DAL/EJW/JNG/RDH/BPK/DIB/DLM/JBS/PTR/JM 10-Jan-85
WIT
SUBTTL DDT /TW/PFC/TWE/EJW/JNG/RDH/DIB/DLM/JBS/PTR/JM/RCB 03-Jun-87
REP 9/1 ;16C2
Copyright (C) 1980, 1981, 1983, 1984
Digital Equipment Corporation, Maynard, Massachusetts, U.S.A.
This software is furnished under a license and may be used and copied only
in accordance with the terms of such license and 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. No title to
and ownership of the software is hereby transferred.
The information in this software is subject to change without notice and
should not be construed as a commitment by Digital Equipment Corporation.
Digital assumes no responsibility for the use or reliability of its
software on equipment which is not supplied by Digital.
WIT
;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1970,1980,1983,1984,1987.
;ALL RIGHTS RESERVED.
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY
;IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND 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. NO TITLE TO AND
;OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
;SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
;
REP 29/1 ;16C3
MAJVER==43 ;MAJOR VERSION LEVEL
MINVER==0 ;MINOR (MAINTENANCE RELEASE) LEVEL
CSTVER==0 ;CUSTOMER VERSION (WHO LAST . . .)
EDTVER==627 ;EDIT LEVEL
WIT
MAJVER==44 ;MAJOR VERSION LEVEL
MINVER==3 ;MINOR (MAINTENANCE RELEASE) LEVEL
CSTVER==0 ;CUSTOMER VERSION (WHO LAST . . .)
EDTVER==673 ;EDIT LEVEL
INS 125/12 ;16C4
;(MATCH ANGLE BRACKETS:>)
INS 172/12 ;16C5
;DDT %42A(362) SHIPPED WITH TOPS-10 7.02
DEL 1/13 ;16C6
INS 37/23 ;16C7
;DDT %43(627) SHIPPED WITH TOPS-20 6.1
;630 PTR/RCB/RDH 25-SEP-85
; FOR TOPS-10, IF .JBSYM .GT. 0 THEN IT IS THE GLOBAL ADDRESS OF A
; SYMBOL TABLE VECTOR. DITTO $5M. LOOK FOR TOPS-10 ENTRY VECTOR
; ON $G. FIX UP $L, $Y COMMANDS. CHKADR, FETCH, STORE CAN SEE
; BEYOND SEC. 0 FROM SEC. 0 (TOPS-10 EDDT ONLY). FIX EXEC-MODE CHKSEC.
;631 RCB 3-OCT-85
; MAKE DEFAULT PAGING BE KL ALWAYS. ADD BLTBU/BLTUB TO $X (KS-10).
;632 RDH 7-OCT-85
; MAKE IO INSTRUCTION TYPEOUT PAY ATTENTION TO CPU TYPE (KS HAS DIFFERENT
; IO INSTRUCTION SET). ADD $20/21/22/23U TO SET KA/KI/KL/KS CPU TYPE.
;633 RDH/PTR 8-OCT-85
; MAKE SYMBOL "$NB" GLOBAL AS # BREAKPOINTS AVAILABLE (EDDT-10 ONLY);
; ENHANCE BREAKPOITN INSERT/REMOVE TO DEAL WITH ERRORS (PARTICULARLY
; BREAKPOINTS THAT MOVED); ONLY TYPE ONE ERROR MESSAGE PER BREAKPOINT
; FAILURE.
;634 RDH 29-OCT-85
; MAKE DDT %43 WORK ON TOPS-10 (ASSORTED TYPOS, ETC.). *NEVER* INSERT
; BREAKPOINTS ON $X (IT CAN'T WORK). IF AN $4M BLOCK HAS BEEN SPECIFIED,
; UNCONDITIONALLY USE IT (ALWAYS 3-WORD JSR'S, ETC.), OTHERWISE VERIFY
; THAT DDT IS MAPPED INTO THE APPROPRIATE SECTION AND BLINDLY JUMP
; INTO THAT SECTION FOR $X'ING. ALLOW NZS REFERENCES FROM SECTION ZERO
; (RENAMES NZSXCT INTO PZAFI, CALLED LIKE PCAFI; RENAMES DEFSEC INTO
; CEFFAS). FIX $L. IF NZS SYMBOL TABLE(S) AND DDT IN SECTION 0 THEN
; TRY FOR NZS, MAPPING SECTION 0 INTO SECTION 1 (USER MODE ONLY) IF
; POSSIBLE. MAKE <INSTR>$$NX TRY TO EXECUTE THE INSTRUCTION IN SECTION
; "N" (IF BLANK, THEN OK TO EXECUTE IN DDT SECTION). ALLOW BOTH .JBSYM
; AND .JBHSM TO POINT TO GLOBAL SYMBOL VECTOR ADDRESS (BUT UNDEFINEDS
; ONLY FROM .JBSYM).
;635 RCB 9-JAN-86
; FIX $X OF NZS LUUO (TOPS10). FIX USAGE OF ENTVC. UUO (TOPS10)
; IN PARTICULAR TO HELP LOCATE USER'S SYMBOL TABLE FOR RUN/USE:N WHERE
; PROGRAM CAN GET "RELOCATED" TO DIFFERENT SECTION.
;636 RDH 10-JAN-86
; $M, $I, AND $U DON'T RETURN ADDRESS AS VALUE (EDIT 333 LOST).
;637 RDH 11-JAN-86
; FILDDT CAN'T UPDATE 7.03 EXE FILE SYMBOL TABLE.
;640 RDH 19-JAN-86
; MAKE THE "N" OF $NM AND $NI COMMANDS BE *DECIMAL*.
;641 PTR 30-JAN-86
; MAKE CEFFAS DEAL WITH IMPOSSIBLE SECTION NUMBERS A BIT BETTER.
; MAKE <INSTR>$X ALWAYS EXECUTE IN THE DEFAULT SECTION, INSTEAD OF
; SOMETIMES IN DDT'S SECTION.
;642 RDH 4-MAR-86
; MAKE TAG DEFINITIONS TAKE FULL 36-BIT VALUE, RATHER THAN JUST THE
; RIGHT-HALF (18-BIT) VALUE OF "."
;DDT %44(642) Released with TOPS10 version 7.03, Spring 1986
;643 RDH 12-Apr-86 QAR 869027
; $4M falls off end of literal, Ill Mem Refs (typo in [636]).
;DDT %44A(643) Released on Autopatch tape 14, Summer 1986
;644 RCB 1-Jul-86
; Introduce $X to PMOVE & PMOVEM. Add them to the opcode tables.
;645 RCB 10-Jul-86
; Fix effective address calculation wrt global references to ACs.
; Needed for LUUO handlers and $1T typeout.
;646 RCB 11-Jul-86
; Fix some problems with supporting $$Y. Only changes the I/O setup,
; doesn't add any logic for interpreting .SYM files.
;647 RCB 11-Jul-86
; Prepare for further changes to TOPS-10 entry vector format by allowing
; IFIW as well as global address in $[n]G.
;650 RCB 11-Jul-86
; I don't know what the authors of 626 & 627 meant to accomplish, but
; those edits broke the symmetry of $nT with $7T. Restore it, this
; time correctly.
;651 RCB 15-Jul-86
; Finally teach EDDT about CPNDDT. Accomplished via new EDV words:
; .EDCPN (physical address of CPNDDT) and .EDCPU (AOBJN-style pointer
; to table of APR serial numbers).
;652 RCB 15-Jul-86
; Finally teach FILDDT about the EDV. This allows FILDDT to set up
; mapping on a crash dump (if MCO 12993 is installed). Requires EDV
; word .EDCAC (pointer to crash ACs).
;653 RCB 16-Jul-86
; Enhance foo$? (ABBREV) to accept LLIMIT, ULIMIT, and WRD2O for
; additional constraints upon symbol value, flags, and module.
; $1? will dump the open module (error if none). $4? will dump only
; globals. $40? will dump only half-killed symbols. The 74 mask
; is anded and then compared. 2 is reserved. LLIMIT and ULIMIT are
; used in the obvious fashion for restricting possible values of
; symbols to be displayed.
;654 RCB 19-Sep-86
; Fix up changing sections for NZS symbol table access to account for
; the fact that the flags are changed by PUSHJ, and hence not always
; what we expect at the first entry in PDL.
;655 RCB 30-Sep-86
; Fix up changing sections for $X of pc-reference instructions. Always
; do RESTOR/SAVE (rather than SWAP) so that SECDDT and the various
; SKPS0/SKPNS0 side-effects will be right.
;656 DPM 30-Sep-86
; Enhance FILDDT-10 by making it type the filespec being examined
; or patched like the -20 version does. Also type filespec of
; file being yanked and the number of symbols loaded.
;DDT %44B(656) released on Autopatch tape 15, Fall 1986
;657 RCB 4-Nov-86
; Fixup symbol table information typed out by $1: in FILDDT.
;660 RCB 21-Nov-86
; Fix 0$nB in non-zero sections not to set 1,,0 as the B.P. address.
;661 RCB 6-Jan-87
; Fix global breakpoints using the breakpoint block not to assume the
; JSR came from section 0.
;662 RCB 16-Jan-87
; Fix hidden symbol processing problems with TOPS-10 EDDT, especially
; for SMP. This has the side-effect of replacing edit 657.
;663 RCB 21-Jan-87
; Finally physically remove the papertape code. This finishes edits 247,
; 307, and 322. FTPTP has been completely removed.
;664 RCB 26-Jan-87
; Fix up all symbol tables in the ring of EDVs when using hidden symbol
; processing. EDDT-10 only.
;665 RCB 1-Feb-87
; Fix up $? for NZS DDT examining a program's symbols in S0.
;666 RCB 6-Mar-87
; Fix up $X of ILDB/IDPB with byte pointer in an AC and PC not in DDT's
; section to not increment the B.P. twice.
;667 RCB 6-Mar-87
; Fix up for "3/-1,,400<SP><TAB>" nonsense.
; Don't mistake garbage for an attempt at a DDT internal address, and
; allow space after a comma to override the left half for section
; defaulting.
;670 RCB 10-Mar-87
; Revoke the second half of 667.
;671 RCB 15-May-87
; Fix PDFSEC. It gets in TOPS-20's way, too.
;672 RCB 02-Jun-87
; Fixup some definitions for TOPS-20 to account for the continued
; existance of 4.1 monitors.
;673 RCB 03-Jun-87
; 672 is incomplete. Forgot about FILDDT and XPEEK%. Deal with it.
DEL 9/24 ;16C8
;FTPTP ;PAPER TAPE FACILITIES (EXEC MODE ONLY)
INS 19/24 ;16C9
;FTEX10 ;TOPS-10 EXEC DDT (SHORTHAND FOR FTDEC10&FTEXEC)
DEL 32/24 ;16C10
IFNDEF FTPTP,<FTPTP==0>
DEL 39/24 ;16C11
FTUD20==FTDEC20&<^-FTEXEC>&<^-FTFILE>&<^-FTMON> ;[504] USER -20
REP 48/24 ;16C12
..N <FTDEC10,FTDEC20,FTEXEC,FTEX20,FTPTP,FTFILE,FTYANK,FTVMX,FTMON>
..N <FTOPX,FTDBUG,FTPAGM,FTSCSH>
WIT
..N <FTDEC10,FTDEC20,FTEXEC,FTEX20,FTFILE,FTYANK,FTVMX,FTMON>
..N <FTOPX,FTDBUG,FTPAGM,FTSCSH>
FTUD20==FTDEC20&<^-FTEXEC>&<^-FTFILE>&<^-FTMON> ;[504] USER -20
FTEX10==FTDEC10&FTEXEC ;[664] EDDT-10
REP 54/24 ;16C13
IFN ^-FTEXEC&<FTPTP!FTEX20>,<PRINTX ? Illegal ^-FTEXEC>
IFN FTFILE&<FTEXEC!FTPTP!FTVMX!FTMON!FTEX20>,<PRINTX ? Illegal FTFILE>
WIT
IFN ^-FTEXEC&<FTEX20>,<PRINTX ? Illegal ^-FTEXEC>
IFN FTFILE&<FTEXEC!FTVMX!FTMON!FTEX20>,<PRINTX ? Illegal FTFILE>
REP 3/26 ;16C14
IFN FTFILE,< ;ONLY FILDDTS SET UP VERSION NUMBER
WIT
IFN FTFILE!FTVMX,< ;[663] ONLY FILDDTS SET UP VERSION NUMBER
REP 7/26 ;16C15
> ;END IFN FTFILE
IFN FTDEC10,< ;ONLY TOPS-10 USES .JBDDT
IFE FTFILE!FTVMX,<
WIT
> ;END IFN FTFILE!FTVMX
IFN FTDEC10,< ;ONLY TOPS-10 USES .JBDDT
IFE FTFILE,<
REP 14/26 ;16C16
> ;END IFE FTFILE!FTVMX
WIT
> ;END IFE FTFILE
INS 10/28 ;16C17
;[662] IN CASE NOT YET IN UUOSYM
ND .EDLNK,14 ;[662] RING POINTER LINK WORD IN EDV
INS 26/28 ;16C18
IFNDEF XJRST,<
OPDEF XJRST [JRST 15,] ;[672] NOT IN 4.1
>
ND .EDSEC,5 ;[672] NOT IN 4.1
IFNDEF ERJMPR,< ;[672] MORE 4.1 FIXUP
SYN ERJMP,ERJMPR
SYN ERJMP,ERJMPS
.NODDT ERJMPR,ERJMPS ;[672] DON'T CLOBBER THE REAL THING
> ;[672] END OF 4.1 FIXUPS
IFNDEF XPEEK%,< ;[673] XPEEK% FIXUPS FOR 4.1
OPDEF XPEEK% [JSYS 501]
ND .XPPEK,1
ND .XPABL,0
ND .XPFNC,.XPABL+1
ND .XPCN1,.XPFNC+1
ND .XPCN2,.XPCN1+1
ND .XPMAD,.XPCN2+1
ND .XPUAD,.XPMAD+1
ND .XPLEN,.XPUAD+1
> ;[673] END OF 4.1 FIXUPS FOR XPEEK%
REP 18/30 ;16C19
TT2=15 ;TEMPORARY (USED FOR PTR INPUT ONLY)
; AND FOR DTE COMMUNICATIONS
.XCREF F, P, R, S, W, A, B, C, T, W1, W2, TT, TT1, TT2 ;SAVE SOME PAPER
.XCREF ..DD, ..MX1, ..MX2, ..TX1, ..TX2
WIT
TT2=15 ;TEMPORARY
TT3=16 ;TEMPORARY ;[630]
.XCREF F, P, R, S, W, A, B, C, T, W1, W2, TT, TT1, TT2, TT3 ;SAVE SOME PAPER
.XCREF ..DD
REP 31/30 ;16C20
.XCREF T1, T2, T3, P ;SAVE SOME MORE PAPER
WIT
.XCREF T1, T2, T3, T4, P ;[630] SAVE SOME MORE PAPER
.XCREF ..MX1, ..MX2, ..TX1, ..TX2 ;[630] SUPPRESS JUNK SYMBOLS
INS 31/34 ;16C21
OPDEF BLTBU [716000,,000000];[631] KS-10 BLT BYTE TO UNIBUS
OPDEF BLTUB [717000,,000000];[631] KS-10 BLT UNIBUS TO BYTE
OPDEF PMOVE [052000,,000000];[644] KL-10 PHYSICAL MOVE
OPDEF PMOVEM [053000,,000000];[644] KL-10 PHYSICAL MOVEM
INS 45/35 ;16C22
IFN FTEX10,<$NB==:NBP> ;[633] FOR TOPS-10 MONITOR
INS 20/36 ;16C23
PG$SXI==PA.GSN ;[630] SECTION EXISTS
PG$SMA==PA.GIN ;[630] SECTION MAPPED ELSEWHERE
PG$SIN==PA.GIN ;[630] SECTION MAPPED INDIRECTLY
PG$SFJ==0 ;[630] NONSENSE BIT
PG$SEC==PA.GSC ;[630] SECTION NUMBER MAPPED TO
PG$FRK==0 ;[630] NONSENSE FIELD
INS 39/36 ;16C24
PG$SXI==PA%PEX ;[630] SECTION EXISTS
PG$SMA==1B12 ;[630] SECTION MAPPED ELSEWHERE
PG$SIN==SM%IND ;[630] SECTION MAPPING IS INDIRECT
PG$SFJ==1B11 ;[630] SECTION MAPPED TO FORK OR JFN
PG$SEC==37B17 ;[630] SECTION NUMBER MAPPED TO
PG$FRK==777777 ;[630] FORK/JFN MAPPED TO
REP 55/36 ;16C25
PTCACH==1B5 ;[603] POINTER CACHE BIT
WIT
PTCACH==1B6 ;[630] POINTER CACHE BIT
INS 7/37 ;16C26
PC$UIO==PC.UIO ;[631] USER IO MODE
INS 13/37 ;16C27
PC$UIO==PC%UIO ;[631] USER IO MODE
REP 28/38 ;16C28
.PVCNT==0 ;[461] PDV LENGTH
.PVNAM==1 ;[472] POINTER TO NAME STRING
.PVSYM==6 ;[461] SYMBOL VECTOR WORD
.PVLVR==12 ;[461] LINK VERSION WORD
WIT
.PVCNT==0 ;PDV LENGTH
.PVNAM==1 ;[472] POINTER TO NAME STRING
.PVSYM==6 ;SYMBOL VECTOR WORD
.PVLVR==12 ;LINK VERSION WORD
REP 45/38 ;16C29
.SVVEC==1775 ;[461] EXE DIRECTORY ENTRY VECTOR TYPE
.SVPDV==1774 ;[461] EXE DIRECTORY PDV TYPE
;[461] PDV SYMBOL VECTOR SYMBOLS
.STLEN==0 ;[461] LENGTH WORD IN SYMBOL VECTOR
.STDAT==0 ;[461] TYPE/LENGTH WORD IN SUBTABLE
.STPTR==1 ;[461] ADDRESS WORD IN SUBTABLE
ST%TYP==77B5 ;[461] TYPE FIELD IN .STDAT WORD
ST%LEN==^-ST%TYP ;[461] LENGTH FIELD IN .STDAT WORD
.UNDFD==0 ;[461] UNDEFINED SYMBOL TYPE CODE
.R50D==1 ;[461] RADIX-50 DEFINED TYPE CODE
.R50U==2 ;[461] RADIX-50 UNDEFINED TYPE CODE
WIT
.SVVEC==1775 ;EXE DIRECTORY ENTRY VECTOR TYPE
.SVPDV==1774 ;EXE DIRECTORY PDV TYPE
;PDV SYMBOL VECTOR SYMBOLS
.STLEN==0 ;LENGTH WORD IN SYMBOL VECTOR
.STDAT==0 ;TYPE/LENGTH WORD IN SUBTABLE
.STPTR==1 ;ADDRESS WORD IN SUBTABLE
ST%TYP==77B5 ;TYPE FIELD IN .STDAT WORD
ST%LEN==^-ST%TYP ;LENGTH FIELD IN .STDAT WORD
.UNDFD==0 ;UNDEFINED SYMBOL TYPE CODE
.R50D==1 ;RADIX-50 DEFINED TYPE CODE
.R50U==2 ;RADIX-50 UNDEFINED TYPE CODE
REP 51/41 ;16C30
ASCII "Copyright (C) Digital Equipment Corporation 1984"
WIT
ASCIZ "
COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1970,1987. ALL RIGHTS RESERVED.
"
REP 15/42 ;16C31
IFN FTMON,<
BRKLCK> ;[612] GIVE UP MDDT LOCK IF HOLDING IT.
WIT
IFN FTMON,<BRKLCK> ;[612] GIVE UP MDDT LOCK IF HOLDING IT.
REP 24/42 ;16C32
DMOVE T,USYMP+S$ADR ;[461] GET ORIGINAL UNDEFINED SYMBOL PTR
DMOVEM T,ESTUT ;[461] INIT UNDEFINED SYM ASSEMBLER COPY
LIS0C: TXZ F,<^-<STF>&<-1,,0>>!LF1!CF1!OKAF!ITF!Q2F
SETZM LCOMF ;[534] CLEAR COMMA FLAG FOR LLIMIT
SETZM UCOMF ;[534] CLEAR COMMA FLAG FOR ULIMIT
WIT
DMOVE T,USYMP+S$ADR ;GET ORIGINAL UNDEFINED SYMBOL PTR
DMOVEM T,ESTUT ;INIT UNDEFINED SYM ASSEMBLER COPY
LIS0C: TXZ F,<^-<STF>&<-1,,0>>!LF1!CF1!OKAF!ITF!Q2F
REP 36/44 ;16C33
DMOVE W1,ESTUT ;[461] GET ADR AND LENGTH FOR DEPRA
CAMN W1,USYMP+S$ADR ;[461] IF THERE ARE ANY UNDEFINED SYMBOLS IN
WIT
DMOVE W1,ESTUT ;GET ADR AND LENGTH FOR DEPRA
CAMN W1,USYMP+S$ADR ;IF THERE ARE ANY UNDEFINED SYMBOLS IN
REP 24/45 ;16C34
SOS ESTUT ;[461] MAKE ROOM IN UNDEF TABLE
SOS ESTUT ;[461]
AOS ESTUTL ;[461] UPDATE LENGTH TOO
WIT
SOS ESTUT ;MAKE ROOM IN UNDEF TABLE
SOS ESTUT ;[461]
AOS ESTUTL ;UPDATE LENGTH TOO
REP 20/47 ;16C35
D (PUNCH,ERR,ERR); (22) ^R ^S ^T
WIT
D (ERR,ERR,ERR); (22) ^R ^S ^T
REP 38/47 ;16C36
D (HWRDS,PILOC,BLKEND); (110) H I J
WIT
D (HWRDS,PILOC,ERR); (110) H I J
DEL 37/48 ;16C37
DEL 49/51 ;16C38
IFN FTFILE,<PILOC==ERR>
REP 30/52 ;16C39
JRST [ TXNE F,QF ;[601] YES, ANYTHING TYPED IN FRONT?
WIT
JRST [ TXNE F,QF!SAF!FAF!Q2F ;[653] YES, ANYTHING TYPED IN FRONT?
REP 47/52 ;16C40
WIT
REP 3/53 ;16C41
ABBREV: SKIPN W1,SYM ;[601] ANYTHING RESEMBLING A SYMBOL TYPED?
JRST ERR ;[601] NO, COMPLAIN
MOVE W2,W1 ;[601] GET ANOTHER COPY
ABBRE1: CAMLE W1,[RADIX50 0,%%%%%] ;[601] PADDED ENOUGH YET?
WIT
ABBREV: TXNE F,TIF!COMF!PTF!MF!CCF ;[653] CHECK FOR LEGAL ARGUMENTS
JRST ERR ;[653] $$ AND EXPRESSION ARE ILLEGAL
SKIPN W1,SYM ;[601] ANYTHING RESEMBLING A SYMBOL TYPED?
TXNE F,SAF!FAF!Q2F ;[653] NO, IS IT OK ANYWAY?
SKIPA W2,W1 ;[653] YES, GET ANOTHER COPY
JRST ERR ;[653] NO, COMPLAIN
TXNN F,Q2F ;[653] DID WE GET ANY FLAGS?
SETZM WRD2O ;[653] NO, MAKE SURE WE KNOW IT
MOVX T,1B0 ;[653] NEGATIVE INFINITY
TXNN F,FAF ;[653] HAVE A LOWER LIMIT?
MOVEM T,LLIMIT ;[653] NO, SET IT UP
TXNE F,FAF ;[653] CHECK AGAIN
SKIPA T,LLIMIT ;[653] YES, COPY IT
MOVX T,<^-<1B0>> ;[653] NO, USE POSITIVE INFINITY
TXNN F,SAF ;[653] IF NO UPPER LIMIT GIVEN,
MOVEM T,ULIMIT ;[653] USE WHAT WE JUST SET UP
MOVE T,ULIMIT ;[653] GET UPPER LIMIT
CAMGE T,LLIMIT ;[653] LIMITS IN THE RIGHT ORDER?
JRST ERR ;[653] NO, COMPLAIN
MOVEI T,75 ;[653] ONLY MASKS CURRENTLY DEFINED
ANDCA T,WRD2O ;[653] SEE IF ANY UNKNOWN BITS ARE ON
JUMPN T,ERR ;[653] COMPLAIN IF SO
ABBRE1: CAMLE W2,[RADIX50 0,%%%%%] ;[601] PADDED ENOUGH YET?
REP 17/53 ;16C42
ABBRE3: TRNN R,76 ;[605] EVERY 32 SYMBOLS
WIT
MOVE T,WRD2O ;[653] GET FLAGS AGAIN
TRZE T,1 ;[653] WANT ONLY OPEN SYMBOL TABLE?
TXNN F,PNAMEF ;[653] YES, IS THERE ONE OPEN?
CAIA ;[653] IT'S OK, PROCEED
JRST ERR ;[653] NO, GIVE UP
ANDCAM T,WRD2O ;[653] MAKE 0/NON-0 FLAG FOR LATER
ROT T,-6 ;[653] SHIFT TO MATCH PNAME
MOVEM T,ABBSY3 ;[653] SAVE FOR FLAG TESTING
ABBRE3: TRNN R,36 ;[605] EVERY FEW SYMBOLS
INS 25/53 ;16C43
MOVE T,W2 ;[653] KEEP A COPY WITH THE FLAGS
REP 33/53 ;16C44
SOJA R,ABBRE3 ;[601] AND TRY NEXT SYMBOL
WIT
SKIPN WRD2O ;[653] IF ALL MODULES DESIRED,
SOJA R,ABBRE3 ;[653] TRY NEXT SYMBOL
AOS T,WRD2O ;[653] INCREMENT COUNTER
CAIN T,2 ;[653] IF JUST PASSING OUR DESIRED MODULE NAME,
SOJA R,ABBRE3 ;[653] KEEP GOING
JRST DD1 ;[653] ELSE DONE
INS 38/53 ;16C45
AND T,ABBSY3 ;[653] YES, GET ITS FLAGS
CAME T,ABBSY3 ;[653] SEE IF A MATCH
SOJA R,ABBRE3 ;[653] NO, TRY NEXT
XMOVEI T,@SYPTR ;[653] POINT TO SYMBOL ENTRY
AOJ T, ;[653] WANT VALUE WORD
MOVE T,@T ;[665] FETCH IT
CAML T,LLIMIT ;[653] IN RANGE?
CAMLE T,ULIMIT ;[653] BOTH WAYS?
SOJA R,ABBRE3 ;[653] NO, TRY NEXT SYMBOL
PUSH P,R ;[653] YES, SAVE SYMBOL INDEX
PUSH P,T ;[653] AND VALUE
REP 49/53 ;16C46
XMOVEI T,@SYPTR ;[601] POINT TO SYMBOL ENTRY
AOS T ;[617] WANT VALUE WORD
MOVE T,@T ;[617] GET SYMBOL'S VALUE
PUSH P,R ;[601] SAVE SYMBOL INDEX
PUSH P,T ;[601] AND VALUE
WIT
MOVE T,(P) ;[653] RETRIEVE VALUE
REP 11/55 ;16C47
HRRZ W,LLOCO ;DEFINE SYMBOL (TAG) TO BE "."
WIT
MOVE W,LLOCO ;[642] DEFINE SYMBOL (TAG) TO BE "."
REP 28/55 ;16C48
SKIPN SYMP+S$ADR ;[461] DEFINE A NEW SYMBOL
JRST [ SKIPN HSYMP+S$ADR ;[461] NO ST, TRY HISEG PTR
JRST ERR ;[461] NONE THERE EITHER
WIT
SKIPN SYMP+S$ADR ;DEFINE A NEW SYMBOL
JRST [ SKIPN HSYMP+S$ADR ;NO ST, TRY HISEG PTR
JRST ERR ;NONE THERE EITHER
REP 53/55 ;16C49
JRST DEF3 ;NO
WIT
JRST DEF3 ;NO, JUST DEC ADDRESS OF WHERE IT WOULD EXIST
REP 23/56 ;16C50
DEF3: MOVEI W1,USYMP ;[470] IT ALL WORKED, MAKE OUR WORKING COPY
PUSHJ P,DECSYA ;[470] OFFICIAL BY DECREMENTING UNDEF PTR
JRST DMER1 ;[544] BUT... BUT...
WIT
DEF3: MOVEI W1,USYMP ;IT ALL WORKED, MAKE OUR WORKING COPY
PUSHJ P,DECSYA ; OFFICIAL BY DECREMENTING UNDEF PTR
JRST DMER1 ;BUT... BUT...
REP 36/58 ;16C51
MOVEI R,SYMP ;[517] ASSUME FROM NORMAL SYM TABLE
TXZE T,1B0 ;[517] UNLESS IT'S FROM THE HISEG TABLE
MOVEI R,HSYMP ;[517] WHICH IT IS
ADD T,S$ADR(R) ;[517] POINT TO 2ND WORD OF SYMBOL ENTRY
SOS R,T ;[517] POINT TO 1ST WORD
PUSHJ P,FETCH ;[517] GRAB THE MODULE NAME IN RAD50
WIT
SOS R,T ;[662] POINT TO FIRST WORD OF SYMBOL ENTRY
PUSHJ P,FETSYM ;[662] GET THE WORD
REP 3/59 ;16C52
IFN FTEXEC!FTMON,<PDVSET==ERR> ;[466] ILLEGAL IN MONITORS
IFE FTEXEC!FTMON,<
WIT
IFN FTEX20!FTMON!FTDEC10,<PDVSET==ERR> ;[630][466] ILLEGAL IN MONITORS, -10
IFE FTEX20!FTMON!FTDEC10,<
INS 13/59 ;16C53
IFN FTEXEC,<
SKPUSR ;[665] MUST BE IN USER MODE
JRST ERR ;[665] OR WE CAN'T DO IT
> ;END IFN FTEXEC
REP 36/59 ;16C54
IFN FTDEC10,<
JRST ERR> ;[466] NO PDVOP% ON TOPS-10
IFN FTDEC20,<
WIT
;**;[630] At PDVSE2:+6L, delete 3, PTR, 28-Aug-85
REP 52/59 ;16C55
> ;END IFN FTDEC20
> ;END IFE FTFILE
;STILL IFE FTEXEC!FTMON
WIT
;**;[630] At PDVSE2:+22L, delete 1, PTR, 28-Aug-85
> ;END IFE FTFILE
;STILL IFE FTEXEC!FTMON!FTDEC10
REP 33/60 ;16C56
JRST MASK5 ;[466] GO TRADE SYMBOL TABLES
;STILL IFE FTEXEC!FTMON AND IFN FTFILE
WIT
JRST MASK5C ;[466] GO TRADE SYMBOL TABLES
;STILL IFE FTEXEC!FTMON!FTDEC10 AND IFN FTFILE
REP 42/61 ;16C57
WIT
REP 62/61 ;16C58
> ;END IFE FTEXEC!FTMON
WIT
> ;END IFE FTEXEC!FTMON!FTDEC10
REP 28/62 ;16C59
IFE FTEXEC!FTMON,< ;[472] IF USER MODE,
TXNN F,TXF ;[466] IN TEXT COMMAND?
JRST TEXI4 ;[466] NO, SKIP TEST
> ;END IFE FTEXEC!FTMON
WIT
IFE FTEXEC!FTMON!FTDEC10,< ;[630][472] IF USER MODE -20,
TXNN F,TXF ;[466] IN TEXT COMMAND?
JRST TEXI4 ;[466] NO, SKIP TEST
> ;END IFE FTEXEC!FTMON!FTDEC10
REP 41/62 ;16C60
IFE FTEXEC!FTMON,< ;[472] MONITORS DON'T HAVE PDVS
TXNN F,TXF ;[466] PDV NAME?
JRST PDVSE2 ;[466] YES, GO CHECK IT OUT
> ;END IFE FTEXEC!FTMON
WIT
IFE FTEXEC!FTMON!FTDEC10,< ;[630][472] MONITORS, -10 DON'T HAVE PDVS
TXNN F,TXF ;[466] PDV NAME?
JRST PDVSE2 ;[466] YES, GO CHECK IT OUT
> ;END IFE FTEXEC!FTMON!FTDEC10
REP 19/64 ;16C61
IFE FTEXEC,< ;[560] NO STUB IN EDDT
WIT
IFN FTUD20,< ;[630][560] NO STUB EXCEPT USER-20
REP 27/64 ;16C62
> ;END IFE FTEXEC
> ;END IFE FTMON!FTEX20
JRST GO4 ;[440] RESTORE CONTEXT AND JUMP
WIT
> ;END IFN FTUD20
> ;END IFE FTMON!FTEX20
JRST GO1 ;[440] RESTORE CONTEXT AND JUMP
DEL 15/65 ;16C63
PUSH P,LCOMF ;[534]
PUSH P,UCOMF ;[534]
REP 28/65 ;16C64
CAME R,USYMP+S$ADR ;[461] ANY UNDEFINED'S CREATED YET?
WIT
CAME R,USYMP+S$ADR ;ANY UNDEFINED'S CREATED YET?
DEL 16/66 ;16C65
POP P,UCOMF ;[534]
POP P,LCOMF ;[534]
REP 2/71 ;16C66
;CALL IS:
;
; MOVX T,<ADDR-EXPR>
WIT
;CEFFAS - CALCULATE ADDRESS ARGUMENT FOR $G, ETC. (SECTION DEFAULT ONLY)
;CALL IS:
;
; MOVX T,<ADDR>
REP 9/71 ;16C67
;WHERE <ADDR-EXPR> IS THE EXPLICITLY-TYPED ADDRESS EXPRESSION (IF
;ANY).
WIT
;WHERE <ADDR> IS THE EXPLICITLY-TYPED ADDRESS EXPRESSION (IF ANY).
REP 14/71 ;16C68
;IF AN EXPLICIT QUANTITY HAS NOT BEEN TYPED BY THE USER THEN
;THE LAST WORD TYPED IS USED AS THE BASIS FOR ADDRESS CALCU-
;LATION. IF THE DDT COMMAND (E.G., "/") WAS PREFIXED WITH A
;SINGLE <ESC> THEN THE FULL-WORD VALUE FROM ABOVE WILL BE TREA-
;TED AS AN INSTRUCTION-FORMAT-INDIRECT-WORD (IFIW) WHOSE EFFEC-
;TIVE ADDRESS "E" WILL BE CALCULATED AS IT WOULD BE BY THE HARD-
;WARE WERE IT TO EXECUTE THE WORD AS AN INSTRUCTION (ASSUMING
;A VALID OPCODE); IF THE DDT COMMAND IS PRECEDED WITH A DOUBLE
;<ESC> (E.G., $$/) THEN THE FULL WORD VALUE FROM ABOVE WILL BE
;TREATED AS AN EXTENDED-FORMAT-INDIRECT-WORD (EFIW) WHOSE EF-
;FECTIVE ADDRESS "E" WILL BE CALCULATED AS IT WOULD BE BY THE
;HARDWARE WERE IT TO ENCOUNTER THE WORD AS AN INDIRECTED WORD
;IN AN EFFECTIVE ADDRESS CALCULATION IN A NON-ZERO SECTION.
;IF NO <ESC>'S WERE TYPED THEN THE HIGH-
;ORDER 18-BITS (I.E., THE "SECTION ADDRESS") OF THE 36-BIT
;ADDRESS-TO-BE-OPENED WILL BE SUPPLIED FROM THE CURRENTLY OPENED
;SECTION (I.E., THE LEFT HALF OF ".").
;IF A FETCH ERROR OCCURS OR ILLEGAL EFIW WORD FOUND THE ERROR
;RETURN IS TAKEN OTHERWISE THE SUCCESSFUL (SKIP) RETURN IS TAKEN
;WITH THE 36-BIT GLOBAL ADDRESS IN REGISTER T.
WIT
; FOR CEFFAD (E.G., "/", <TAB>, ETC.) ONLY: IF AN EXPLICIT QUANTITY HAS
; NOT BEEN TYPED BY THE USER THEN THE LAST WORD TYPED IS USED AS THE BASIS
; FOR ADDRESS CALCULATION. IF THE COMMAND WAS PREFIXED WITH A SINGLE <ESC>
; (E.G., $/) THEN THE FULL-WORD VALUE FROM ABOVE WILL BE TREATED AS AN
; INSTRUCTION-FORMAT-INDIRECT-WORD (IFIW) WHOSE EFFECTIVE ADDRESS "E" WILL
; BE CALCULATED AS IT WOULD BE BY THE HARDWARE WERE IT TO EXECUTE THE WORD
; AS AN INSTRUCTION (ASSUMING A VALID OPCODE); IF THE COMMAND IS PRECEDED
; WITH A DOUBLE <ESC> (E.G., $$/) THEN THE FULL WORD VALUE FROM ABOVE WILL
; BE TREATED AS AN EXTENDED-FORMAT-INDIRECT-WORD (EFIW) WHOSE EFFECTIVE
; ADDRESS "E" WILL BE CALCULATED AS IT WOULD BE BY THE HARDWARE WERE IT TO
; ENCOUNTER THE WORD AS AN INDIRECTED WORD IN AN EFFECTIVE ADDRESS CALCULA-
; TION IN A NON-ZERO SECTION.
;
; IF THE COMMAND WAS NOT PREFIXED BY ANY <ESC>'S, AND IF NO EXPLICIT QUANTITY
; WAS TYPED, THEN THE ADDRESS VALUE (THE LAST WORD TYPED) IS REDUCED TO A
; SECTION-LOCAL ADDRESS VALUE (I.E., RH ONLY, THE LH IS ZEROED).
;
; FOR CEFFAS (E.G., $G) AND CEFFAD (FROM ABOVE): IF ",," WAS USED IN THE
; ADDRESS EXPRESSION THEN THE ADDRESS VALUE IS EXACTLY AS TYPED BY THE USER;
; OTHERWISE IF EITHER A SPACE OR COMMA WAS USED IN THE ADDRESS EXPRESSION,
; OR IF THE ADDRESS EXPRESSION IS A SECTION-LOCAL VALUE (AS ABOVE) THEN THE
; SECTION-VALUE (LEFT HALF) OF THE ADDRESS VALUE WILL BE DEFAULTED FROM THE
; CURRENT SECTION (I.E., LH OF ".").
;
;NOTE: IF A DDT-INTERNAL ADDRESS VALUE WAS USED IN THE ADDRESS EXPRESSION
; (LEGAL ONLY FOR CEFFAD, ERROR FOR CEFFAS-CLASS COMMANDS) THEN THE
; ADDRESS VALUE IS ASSUMED TO BE A SECTION-LOCAL VALUE IN DDT'S
; EXECUTING SECTION. THE VALUE IS FLAGGED "DDT-INTERNAL", AND LEFT
; FOR FETCH/ETC TO ACTUALLY PROCESS.
;
;IF A FETCH ERROR OCCURS, OR AN ILLEGAL EFIW WORD IS ENCOUNTERED IN AN
;EFFECTIVE-ADDRESS CALCULATION, OR IF A DDT-INTERNAL ADDRESS IS SUPPLIED
;TO CEFFAS, THE ERROR RETURN IS TAKEN; OTHERWISE THE SUCCESSFUL (SKIP)
;RETURN IS TAKEN WITH THE 36-BIT GLOBAL ADDRESS VALUE IN REGISTER T.
REP 1/72 ;16C69
;CALCULATE EFFECTIVE ADDRESS
CEFFAD: TXNE F,DDLF ;DDT INTERNAL LOCATION TYPED?
JRST [ HRLI T,(DDAF) ;YES, FLAG IN ADDRESS
JRST CPOPJ1] ;DO NOTHING ELSE
WIT
;CALCULATE EFFECTIVE ADDRESS
CEFFAD: TXNE F,DDLF ;DDT INTERNAL LOCATION TYPED?
JRST [HRLI T,(DDAF) ;YES, FLAG IN ADDRESS
JRST CPOPJ1] ;DO NOTHING ELSE
REP 13/72 ;16C70
TXNN F,QF ;USING LWT?
JRST [ HRRZ T,T ;YES, Y FIELD ONLY
CAIL T,20 ;AC?
HLL T,LLOCO ;NO, DEFAULT SECTION TO CURRENT
JRST .+1]
PUSHJ P,DEFSEC ;DEFAULT THE SECTION MAYBE
HLLM T,LLOCS ;UPDATE DEFAULT
JRST CPOPJ1 ;[557]
;DEFAULT SECTION WHERE EFFECTIVE ADDRESS COMPUTATION CAN'T BE SPECIFIED
; T/ ARG
; PUSHJ P,DEFSEC
; RETURN +1: MEMORY LOCATION
; +2: AC
; T/ UPDATED ADDRESS
DEFSEC: ;[557]
IFE FTFILE,< ;[557]
SKPNS0 ;DDT IN SECTION 0?
JRST [ HRRZ T,T ;YES, IGNORE LH JUNK
POPJ P,]
> ;END IFE FTFILE ;[557]
TXZE T,77B5 ;JUNK LH DEFINITELY NOT SECTION NO?
JRST DEFSC4 ;[566]
SKIPL ACCCF ;[542] COMMACOMMA PROCESSING ENCOUNTERED?
TLNE T,-1 ;[451] EXPLICIT SECTION?
POPJ P, ;[451] YES, BELIEVE SECTION NUMBER
DEFSC4: HRRZ T,T ;[566] CLEAR LEFT HALF
TRNE T,-20 ;[566] AC?
JRST GDFSE0 ;[451] NO, DEFAULT IT
JRST CPOPJ1 ;[566] YES, DONE
WIT
TXNN F,QF ;EXPLICIT ADDRESS EXPRESSION TYPED?
ANDI T,-1 ;NO, REDUCE TO SECTION-LOCAL LWT
;ENTER HERE TO GENERATE SECTION DEFAULT ADDRESS VALUE
CEFFAS: TXNE F,DDLF ;DDT INTERNAL LOCATION TYPED?
POPJ P, ;YES - TSK TSK - BOMB THE KLOWN
SKIPGE ACCCF ;COMMACOMMA PROCESSING ENCOUNTERED?
JRST CEFFAZ ;YES, USE ADDRESS VALUE EXACTLY AS IT WAS TYPED
TDNN T,[777777,,777740] ;ADDRESS VALUE A "LOCAL REGISTER"?
JRST CEFFAC ;[645] YES, CHECK NEED FOR GLOBAL REFERENCE
; NOTE THAT "1,,REG" WILL BE HANDLED "RIGHT"
; BY FETCH/ET AL, AND WILL ALSO SET THE
; DEFAULT SECTION TO "1" . . . CAVEAT EMPTOR
TXNN F,SPF!COMF ;SPACE OR COMMA TYPED (I.E., AN INSTRUCTION)?
TLNN T,-1 ;OR IS THE VALUE SECTION-LOCAL (LH = 0)?
JRST CEFFS5 ;[641] YES, DEFAULT THE SECTION
TXNN T,77B5 ;[641] IS THE LH OBVIOUSLY NOT A SECTION NUMBER?
JRST CEFFAZ ;[641] ASSUME IT'S A SECTION NUMBER
CEFFS5: HLL T,LLOCS ;GET DEFAULT ADDRESS VALUE SECTION
SKIPL PDFSEC ;OVER-RIDING DEFAULT SECTION ($6M) SET?
HLL T,PDFSEC ;YES, IT OVERRIDES LLOCS DEFAULT
CEFFAZ: HLLZM T,LLOCS ;SET NEW DEFAULT SECTION
JRST CPOPJ1 ;RETURN WITH ADDRESS VALUE IN T
CEFFAX: PUSHJ P,CEFFAS ;CALCULATE SECTION DEFAULT (IF NEEDED)
JFCL ;IGNORE NON-SKIP RETURN
POPJ P, ;AND RETURN NON-SKIP ALWAYS
CEFFAC: HLL T,LLOCS ;[645] GET CURRENT DEFAULT SECTION
TLZE T,-1 ;[645] IS THIS GLOBAL?
TLO T,1 ;[645] YES, FLAG IT
JRST CPOPJ1 ;[645] RETURN SUCCESS TO CEFFAD
REP 48/73 ;16C71
JRST CPOPJ1 ;NO, ALL DONE
WIT
PJRST CEFIW9 ;[645] NO, CHECK OUT AC'S AND RETURN
REP 27/74 ;16C72
TXNN R,EFIWI1 ;EFIW I BIT ON?
JRST CPOPJ1 ;NO, ALL DONE
HLLZ S,T ;YES, SET NEW CURRENT SECTION
JRST CIFIW8 ;AND LOOP ON INDIRECTION
WIT
HLLZ S,T ;[645] SAVE FOR CEFIW9
TXNE R,EFIWI1 ;[645] EFIW I BIT ON?
JRST CIFIW8 ;[645] YES, LOOP ON INDIRECTION
;[645] NO, CHECK OUT AC'S AND RETURN
;[645] CHECK AC ADDRESSING
CEFIW9: TDNN T,[-2,,-20] ;[645] AC REFERENCE?
TLNN S,-1 ;[645] FROM NON-ZERO SECTION?
JRST CPOPJ1 ;[645] NO, JUST RETURN IT
HRLI T,1 ;[645] YES, MAKE IT GLOBAL
JRST CPOPJ1 ;[645] RETURN SUCCESS FROM CEFFAD
REP 8/75 ;16C73
DMOVE TT,USYMP+S$ADR ;[461] GET POINTER TO ALL OLD UNDEF ITEMS
SUB W2,TT1 ;[470] FIND OUT HOW MANY NEW ONES THERE ARE
JUMPE W2,DEPRA4 ;[476] DON'T UPDATE IF NO NEW SYMS
DMOVEM TT,ESTUT ;[461] FAKE OUT USYSET
WIT
DMOVE TT,USYMP+S$ADR ;GET POINTER TO ALL OLD UNDEF ITEMS
SUB W2,TT1 ;[470] FIND OUT HOW MANY NEW ONES THERE ARE
JUMPE W2,DEPRA4 ;[476] DON'T UPDATE IF NO NEW SYMS
DMOVEM TT,ESTUT ;FAKE OUT USYSET
REP 35/76 ;16C74
IFN FTEXEC&FTDEC10,< ;[430]
PUSHJ P,SYMSPC ;MAKE SURE AFTER FETCHL AND DMEMER
> ;END IFN FTEXEC&FTDEC10
WIT
IFN FTEX10,< ;[430]
PUSHJ P,SYMSPC ;MAKE SURE AFTER FETCHL AND DMEMER
> ;END IFN FTEX10
REP 23/79 ;16C75
;TYPE THE ASCIZ STRING AT CURRENTLY OPEN LOCATION
WIT
;TYPE THE ASCIZ STRING AT CURRENTLY OPEN LOCATION
REP 28/79 ;16C76
MOVE T,LLOCO ;[616] NO, USE "."
PUSHJ P,DEFSEC ;[616] SET ANY DEFAULT SECTION
HLLZM T,LLOCS ;[616] REMEMBER NEW DEFAULT SECTION
MOVEM T,LLOCO ;[616] SAVE NEW "."
MOVE R,LLOCO ;GET LAST LOCATION OPEN
WIT
SKIPA T,LLOCO ;[634] NO, USE "."
PUSHJ P,CEFFAX ;[634] YES, DEFAULT SECTION IF NEEDED
MOVEM T,LLOCO ;[634] SAVE NEW "."
MOVE R,T ;[634] GET LAST LOCATION OPEN
REP 3/82 ;16C77
LLIM: TXNE F,CF!CCF ;$ PRECEEDED?
JRST PTCHB ;YES, PATCH COMMAND
MOVEM T,LLIMIT ;NO, SET FIRST ARG
TXO F,FAF
SKIPGE ACCCF ;[542] TWO COMMAS SEEN?
SETOM LCOMF ;[534] YES.
WIT
LLIM: TXNE F,CF!CCF ;$< OR $$< COMMAND?
JRST PTCHB ;YES, PATCH COMMAND
MOVEM T,LLIMIT ;NO, SET FIRST ARGUMENT
TXO F,FAF ;AND FLAG FIRST ARGUMENT SEEN
MOVEM F,LLREGF ;[634] SAVE "F" FOR SETUP/LLMSEC/CEFFAS
MOVE TT1,ACCCF ;[634] ALSO SAVE "ACCCF" FLAG
MOVEM TT1,LLACCF ;[634] FOR SETUP/LLMSEC/CEFFAS
REP 12/82 ;16C78
JRST ERR ;YES, NOT DEFINED
TXNE F,CF ;NO, $> ?
JRST PTCHE ;YES, END PATCH
TXO F,SAF ;NO, SET SECOND ARG
MOVEM T,ULIMIT
SKIPGE ACCCF ;[542] TWO COMMAS SEEN?
SETOM UCOMF ;[534] YES.
WIT
JRST ERR ;YES, NOT DEFINED
TXNE F,CF ;NO, $> ?
JRST PTCHE ;YES, END PATCH
MOVEM T,ULIMIT ;NO, SET SECOND ARG
TXO F,SAF ;AND FLAG SECOND ARGUMENT SEEN
MOVEM F,ULREGF ;[634] SAVE "F" FOR SETUP/ULMSEC/CEFFAS
MOVE TT1,ACCCF ;[634] ALSO SAVE "ACCCF" FLAG
MOVEM TT1,ULACCF ;[634] FOR SETUP/ULMSEC/CEFFAS
REP 45/84 ;16C79
IFN FTDEC10&FTEXEC,<
WIT
IFN FTEX10,<
INS 55/86 ;16C80
;(MATCH ANGLE BRACKETS: >)
INS 17/88 ;16C81
; 12-19 RESERVED FOR FUTURE
; 20 SET KA-10 CPU TYPE (FOR EMULATION, IGNORED IN EDDT)
; 21 SET KI-10 CPU TYPE (FOR EMULATION, IGNORED IN EDDT)
; 22 SET KL-10 CPU TYPE (FOR EMULATION, IGNORED IN EDDT)
; 23 SET KS-10 CPU TYPE (FOR EMULATION, IGNORED IN EDDT)
; 24+ RESERVED FOR FUTURE
REP 23/88 ;16C82
;$U WITH NO ARGUMENTS CLEARS 0,1,2,8 ANDS SETS 3 (I.E., RESTORES "NORMAL
;VIRTUAL ADDRESSING"). $$U WITH NO ARGUMENTS SET PHYSICAL ADDRESSING
WIT
;$U WITH NO ARGUMENTS CLEARS 0,1,2,8 AND SETS 3 (I.E., RESTORES "NORMAL
;VIRTUAL ADDRESSING"). $$U WITH NO ARGUMENTS SETS PHYSICAL ADDRESSING
REP 13/90 ;16C83
; HLL T,SECDDT ;CONCOCT AN INTERNAL-TO-DDT ADDRESS
; PJRST MASK2 ;AND RETURN VALUE AS IF USER TYPED IT
;***; TEMP CODE TILL DDT CAN DISTINGUISH THIS TYPE OF SPECIAL ADDRESS
SETPA9: PUSH P,(T) ;***;SAVE VALUE
PUSHJ P,TSEP ;***;[461] TYPE SEPARATOR
POP P,T ;***;GET THE VALUE BACK
PUSHJ P,CONSYM ;***;AND DISPLAY IT FOR THE USER
PJRST TCRLF ;***;AND CAP OFF LINE SO USER NOT TEMPTED TO
;***; TYPE IN A NEW VALUE, <CR><LF>
WIT
ANDI T,-1 ;CONCOCT AN INTERNAL-TO-DDT ADDRESS
PJRST MASK02 ;AND RETURN VALUE AS IF USER TYPED IT
INS 19/91 ;16C84
FAF!SAF!CCF+ ERR ;(12) RESERVED
FAF!SAF!CCF+ ERR ;(13) RESERVED
FAF!SAF!CCF+ ERR ;(14) RESERVED
FAF!SAF!CCF+ ERR ;(15) RESERVED
FAF!SAF!CCF+ ERR ;(16) RESERVED
FAF!SAF!CCF+ ERR ;(17) RESERVED
FAF!SAF!CCF+ ERR ;(18) RESERVED
FAF!SAF!CCF+ ERR ;(19) RESERVED
FAF!SAF!CCF+ SETKAC ;(20) SET KA-10 CPU TYPE
FAF!SAF!CCF+ SETKIC ;(21) SET KI-10 CPU TYPE
FAF!SAF!CCF+ SETKLC ;(22) SET KL-10 CPU TYPE
FAF!SAF!CCF+ SETKSC ;(23) SET KS-10 CPU TYPE
INS 34/91 ;16C85
0,, 777777 ;(12) RESERVED
0,, 777777 ;(13) RESERVED
0,, 777777 ;(14) RESERVED
0,, 777777 ;(15) RESERVED
0,, 777777 ;(16) RESERVED
0,, 777777 ;(17) RESERVED
0,, 777777 ;(18) RESERVED
0,, 777777 ;(19) RESERVED
0,, KAFLG ;(20) KA-10 FLAG
0,, KIFLG ;(21) KI-10 FLAG
0,, KLFLG ;(22) KL-10 FLAG
0,, KSFLG ;(23) KS-10 FLAG
REP 20/93 ;16C86
PUSHJ P,DEFSEC ;[530] SET CORRECT SECTION
HLLZM T,LLOCS ;[530] SET DEFAULT SECTION IF T NOT AN ACC
WIT
PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
REP 5/94 ;16C87
SETCAC: PUSHJ P,DEFSEC ;[530] SET CORRECT SECTION
HLLZM T,LLOCS ;[530] SET DEFAULT SECTION IF T NOT AN ACC
MOVE R,T ;ADDRESS IN R
MOVEM R,FAKEAD ;SAVE FOR USER TO READ LATER
WIT
SETCAC: PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
MOVE R,T ;ADDRESS IN R
SETCA1: MOVEM R,FAKEAD ;[652] SAVE FOR USER TO READ LATER
REP 24/94 ;16C88
SETSPT: PUSHJ P,DEFSEC ;[530] SET CORRECT SECTION
HLLZM T,LLOCS ;[530] SET DEFAULT SECTION IF T NOT AN ACC
WIT
SETSPT: PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
REP 32/94 ;16C89
SETCST: PUSHJ P,DEFSEC ;[530] SET CORRECT SECTION
HLLZM T,LLOCS ;[530] SET DEFAULT SECTION IF T NOT AN ACC
WIT
SETCST: PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
REP 5/95 ;16C90
SETREL: PUSHJ P,DEFSEC ;[530] SET CORRECT SECTION
HLLZM T,LLOCS ;[530] SET DEFAULT SECTION IF T NOT AN ACC
WIT
SETREL: PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
REP 10/95 ;16C91
SETPRT: PUSHJ P,DEFSEC ;[530] SET CORRECT SECTION
HLLZM T,LLOCS ;[530] SET DEFAULT SECTION IF T NOT AN ACC
WIT
SETPRT: PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
INS 37/95 ;16C92
;SET KA/KI/KL/KS CPU TYPE, ERROR IF IN EXEC MODE
SETKAC: PUSHJ P,SETKZC ;[632] INITIALIZE CPU FLAGS
MOVEM T,KAFLG ;[632] SET KA-10 EMULATION
POPJ P, ;[632] DONE
SETKIC: PUSHJ P,SETKZC ;[632] INITIALIZE CPU FLAGS
MOVEM T,KIFLG ;[632] SET KI-10 EMULATION
POPJ P, ;[632] DONE
SETKLC: PUSHJ P,SETKZC ;[632] INITIALIZE CPU FLAGS
MOVEM T,KLFLG ;[632] SET KL-10 EMULATION
MOVEM T,KLSFLG ;[632] SET KL/KS EMULATION
POPJ P, ;[632] DONE
SETKSC: PUSHJ P,SETKZC ;[632] INITIALIZE CPU FLAGS
MOVEM T,KSFLG ;[632] SET KS-10 EMULATION
MOVEM T,KLSFLG ;[632] SET KL/KS EMULATION
POPJ P, ;[632] DONE
SETKZC: ;[632] HELPER TO CLEAR CPU FLAGS AND SUCH
IFN FTEXEC,< ;[632] NEVER NEVER DO THIS IN EXEC MODE!
SKPUSR ;[632] USER MODE?
JRST ERR ;[632] EXEC, DISALLOW UNDER THREAT OF DEATH
> ;END IFN FTEXEC
SETZM BZ$CPF ;[632] CLEAR START OF CPU FLAGS AREA
MOVE TT,[BZ$CPF,,BZ$CPF+1] ;[632] BLT POINTER TO
BLT TT,ZZ$CPF-1 ;[632] CLEAR REST OF CPU FLAGS AREA
CAIE T,0 ;[632] ARG TO "SET" OR "CLEAR"?
SETO T, ;[632] SET, NORMALIZE TO -1
POPJ P, ;[632] GO SET/CLEAR APPROPRIATE FLAG
DEL 40/95 ;16C93
REP 7/96 ;16C94
PAGMAP:
WIT
;(MATCH ANGLE BRACKETS: >)
PAGMAP: TXNN F,Q2F ;[630] $NL FORMAT?
TXNE F,SAF ;[630] OR SECOND ANGLE?
JRST ERR ;[630] USER IS CONFUSED
REP 15/96 ;16C95
JRST [ ;[603] NO, DETERMINE DEFAULT
IFE FTFILE,<
SKPNS0 ;[603] IN SECTION 0?
TDZA T,T ;[603] SECTION 0 CAN ONLY SEE SECTION 0
> ;END IFE FTFILE
MOVEI T,37 ;[603] NON-0 CAN SEE LOTS
JRST PAGMA1] ;[603] REJOIN FLOW
JUMPL T,ERR ;[603] NEG ARG IS NO GOOD
JUMPE T,PAGMA1 ;[603] ZERO ARG IS ALWAYS OK
IFE FTFILE,<
SKPS0> ;[603] IN SECTION 0?
CAILE T,37 ;[603] NO, CAN GO UP TO 37
JRST ERR ;[603] OUT OF RANGE, SORRY
PAGMA1: MOVEM T,ULIMIT ;[603] SAVE UPPER LIMIT AWAY
TXNN F,FAF ;[603] LOWER LIMIT GIVEN?
JRST [ TXNN F,QF ;[603] NO, WAS THERE AN EXPLICIT ARG?
WIT
MOVEI T,37 ;[630] NO, DEFAULT TO MAX
JUMPL T,ERR ;[603] NEG ARG IS NO GOOD
CAILE T,37 ;[603] CAN GO UP TO 37
JRST ERR ;[603] OUT OF RANGE, SORRY
MOVEM T,ULIMIT ;[630] SAVE UPPER LIMIT AWAY
TXNN F,FAF ;[603] LOWER LIMIT GIVEN?
JRST [TXNN F,QF ;[603] NO, WAS THERE AN EXPLICIT ARG?
REP 34/96 ;16C96
MOVE T,LLIMIT ;[603] FETCH SPECIFIED LOWER LIMIT
JUMPL T,ERR ;[603] NEG ARG IS NO GOOD
JUMPE T,PAGMA2 ;[603] ZERO ALWAYS OK
IFE FTFILE,<
SKPS0> ;[603] SECTION 0?
CAILE T,37 ;[603] NO, CAN SEE NON-ZERO SECTIONS
WIT
SKIPL T,LLIMIT ;[630] FETCH SPECIFIED LOWER LIMIT
CAILE T,37 ;[630] IN RANGE?
REP 7/97 ;16C97
IFN FTEXEC&FTDEC10,< ;[623] IF SYMS IN ALTERNATE ADDRESS SPACE,
PUSHJ P,NORSPC> ;[623] MAKE SURE WE'RE IN NORMAL SPACE
PAGMA3: PUSHJ P,LISTEN ;[603] USER WANT TO HANG IT UP?
AOSA TT,LLIMIT ;[603] NO, GET NEXT SECTION NUMBER
JRST DD1 ;[603] YES, QUIT
WIT
IFN FTEX10,<PUSHJ P,NORSPC> ;[623] MAKE SURE WE'RE IN NORMAL SPACE
PAGMA3: PUSHJ P,LISCK ;[634] USER WANT TO HANG IT UP?
JRST PAGM30 ;[634] NO, KEEP SCANNING
JRST DD1 ;[603] YES, QUIT
MOVEI W1,[ASCIZ\Scanning memory: \] ;[634] "?", NICE TEXT
PUSHJ P,TSTRG ;[634] TELL USER
MOVE T,LLIMIT ;[634] LAST SECTION CHECKED
ADDI T,1 ;[634] CURRENT SECTION TO BE CHECKED
HRLZ T,T ;[634] CURRENT WORD ADDRESS TO BE CHECKED
PUSHJ P,PADR ;[634] TYPE OUT ADDRESS
PUSHJ P,TCRLF ;[634] CAP OFF "?" SUMMARY WITH <CR><LF>
PAGM30: AOS TT,LLIMIT ;[634] GET NEXT SECTION TO CHECK
REP 15/97 ;16C98
TXNN TT,PG$EXI ;[603] DOES IT EXIST?
JRST PAGMA3 ;[603] NO, TRY NEXT SECTION
WIT
TXNN TT,PG$SXI ;[634] DOES IT EXIST?
JRST PAGMA3 ;[603] NO, TRY NEXT SECTION
;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE
REP 22/97 ;16C99
POP P,ODF ;[603] RESTORE RADIX
WIT
TXNN TT,PG$SMA ;[630] SECTION MAPPED ELSEWHERE?
JRST PAGM34 ;[630] NO, JUST TYPE ACCESS BITS
MOVEI W1,[ASCIZ / shared/] ;[630] ASSUME SHARED
TXNE TT,PG$SIN ;[630] UNLESS PROVEN INDIRECT
MOVEI W1,[ASCIZ / indirect/] ;[630] IT'S INDIRECT
PUSHJ P,TSTRG ;[630] TELL 'EM
IFN FTEXEC,<SKPUSR> ;[630] USER MODE?
IFN FTEXEC!FTMON,<JRST PAGM34>;[630] SKIP THIS STUFF
MOVEI W1,[ASCIZ / to section /] ;[630] SAY WHERE TO
PUSHJ P,TSTRG ;[630] TYPE IT
LDB T,[POINTR TT,PG$SEC] ;[630] GET THE TARGET SECTION
PUSHJ P,TOC ;[630] AND TYPE IT TOO
IFN FTDEC20,< ;[630] -20 CAN MAP TO FILES, OTHER FORKS
TXNN TT,PG$SFJ ;[630] MAPPED TO EITHER FORK OR JFN?
JRST PAGM34 ;[630] NO, ALL DONE
MOVEI W1,[ASCIZ /, fork /] ;[630] ASSUME FORK
TXZN TT,.FHSLF ;[630] FORK OR FILE?
MOVEI W1,[ASCIZ /, JFN /] ;[630] IT'S A FILE
PUSHJ P,TSTRG ;[630] TYPE WHICH
HRRZ T,TT ;[630] LOAD UP FORK/JFN NUMBER
PUSHJ P,TOC ;[630] AND TYPE IT TOO
> ;END IFN FTDEC20
PAGM34: POP P,ODF ;[630] RESTORE RADIX
REP 10/98 ;16C100
PAGMA4: PUSHJ P,LISTEN ;[603] USER WANT TO HANG IT UP?
AOSA R,HGHPAG ;[603] NO, GET NEXT PAGE
JRST DD1 ;[603] YES, ABORT
TRNN R,PAGMSK ;[603] REACHED END OF SECTION?
JRST [ MOVE TT,OLDBTS ;[603] YES, GET MOST RECENT ACCESS BITS
WIT
PAGMA4: PUSHJ P,LISCK ;[634] USER WANT TO HANG IT UP?
JRST PAGM40 ;[634] NO, PROCESS NEXT PAGE
JRST DD1 ;[603] YES, ABORT
MOVEI W1,[ASCIZ\Scanning memory: \] ;[634] "?" TEXT, NICE TEXT
PUSHJ P,TSTRG ;[634] TELL USER
MOVE T,HGHPAG ;[634] LAST PAGE CHECKED
ADDI T,1 ;[634] CURRENT PAGE TO BE CHECKED
LSH T,PG2WRD ;[634] MAKE A WORD ADDRESS
PUSHJ P,PADR ;[634] TYPE OUT ADDRESS
PUSHJ P,TCRLF ;[634] CAP OFF "?" SUMMARY WITH <CR><LF>
PAGM40: AOS R,HGHPAG ;[634] GET NEXT PAGE
TRNN R,PAGMSK ;[603] REACHED END OF SECTION?
JRST [MOVE TT,OLDBTS ;[603] YES, GET MOST RECENT ACCESS BITS
REP 30/98 ;16C101
WIT
REP 37/98 ;16C102
JRST [ MOVEI W1,[ASCII /File/] ;[603] YES, MAYBE
WIT
JRST [MOVEI W1,[ASCII /File/] ;[603] YES, MAYBE
REP 10/99 ;16C103
JRST [ MOVE W1,[ASCIZ / /] ;[603] YES, SPACE OVER SOME
WIT
JRST [MOVE W1,[ASCIZ / /] ;[603] YES, SPACE OVER SOME
DEL 34/100 ;16C104
REP 3/104 ;16C105
BPS1: PUSHJ P,DEFSEC ;SET PROPER SECTION
HLLZM T,LLOCS ;[530] SET DEFAULT SECTION IF T NOT AN ACC
WIT
BPS1: PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
TDNN T,[^-1,,^-17] ;[660] IS THIS AN AC?
HRRZS T ;[660] YES, FIX UP JUST IN CASE OF ZERO
REP 29/104 ;16C106
JRST MASK2] ;TREAT AS DDT INTERNAL ADDRESS
WIT
JRST MASK02] ;TREAT AS DDT INTERNAL ADDRESS
INS 39/106 ;16C107
IFN FTEX10,< ;[651] CPNDDT ONLY ON A -10
SKIPN T,CPNBIT ;[651] DID WE LIGHT A BIT IN CPNDDT?
JRST PROCD9 ;[651] NO, DON'T CLEAR IT
MOVE R,CPNDDT ;[651] YES, GET ADDRESS TO CLEAR
SETZ T, ;[651] AND A ZERO TO PUT THERE
PUSHJ P,STOREP ;[651] LET OTHER CPUS RUN AGAIN
JFCL ;[651] C'EST LA VIE
PROCD9:
> ;END IFN FTEX10
REP 13/107 ;16C108
IFN FTEXEC,<
PUSHJ P,RSTAC> ;ENSURE PROPER CONTEXT AC BLOCK
SETZM SKPCT ;INIT SKIP COUNT
IFN FTMON,<
CHKIN> ;[614] LOCK BREAKPOINT BLOCK
SKPNS0 ;[440] IN SECTION 0?
JRST XEC6 ;[440] YES, JUST EXECUTE IT
WIT
IFN FTEXEC,<PUSHJ P,RSTAC> ;ENSURE PROPER CONTEXT AC BLOCK
SETZM SKPCT ;INIT SKIP COUNT
IFN FTMON,<CHKIN> ;[614] LOCK BREAKPOINT BLOCK
TXNN F,CCF ;[634] <INSTR>$$X FORM?
JRST XEC2 ;[634] NO, CHECK OUT $X SECTION
TXNN F,Q2F ;[634] EXPLICIT SECTION TYPED?
JRST XEC4 ;[634] NO, JUST XCT THE **** INSTRUCTION!
MOVS T,WRD2O ;[634] YES, POSITION USER-SPECIFIED SECTION
JRST XEC3 ;[634] AND TRY TO EXECUTE IN THAT SECTION
REP 25/107 ;16C109
PUSHJ P,GDFSEC ;[451] GET DEFAULT SECTION
CAMN T,SECDDT ;[440] SAME AS OURS?
JRST XEC6 ;[440] YES, JUST EXECUTE IT
XMOVEI W1,XEC1 ;[521] ADDRESS TO RETURN TO
WIT
XEC2: PUSHJ P,GDFSEC ;[451] GET DEFAULT SECTION
XEC3: CAMN T,SECDDT ;[440] SAME AS OURS?
JRST XEC4 ;[440] YES, JUST EXECUTE IT
SKIPN BPBLK ;[634] GOT A GLOBAL BREAKPOINT/EXECUTE BLOCK?
JRST XEC3L ;[634] NO, SEE IF MAPPED INTO SPECIFIED SECTION
XMOVEI W1,XEC5 ;[521] ADDRESS TO RETURN TO
INS 34/107 ;16C110
XEC3L: MOVE R,T ;[634] POSITION SECTION NUMBER
PUSHJ P,RWEMAP ;[634] ARE WE MAPPED IN DESIRED SECTION?
JRST $XBLKE ;[634] NO, CAN'T DO THE $X
HRRI R,XEC4 ;[634] YES, DDT ADDRESS IN TARGET SECTION
HLLZM R,SECDDT ;[634] NOTE DDT IN THAT SECTION
XJRST R ;[634] GO DO THE XCT IN TARGET SECTION
;[634] NOTE THAT THIS HAS THE EFFECT OF
;[634] LEAVING DDT IN THE TARGET SECTION!
REP 3/108 ;16C111
XEC6: PUSHJ P,INSRTB ;[447] INSTALL BREAKPOINTS
JSP T,RESTORE ;[440]
XCT I.NST ;[460]
XEC1: REPEAT SKPMAX,<AOS SKPCT> ;NOTE COUNT OF LOCS SKIPPED
XEC2: JSR SAVE ;SAVE CONTEXT
PUSHJ P,REMOVB ;REMOVE BRKPTS
IFN FTMON,<
CHKOUT> ;[612] UNLOCK BREAKPOINT BLOCK
WIT
XEC4: PUSHJ P,INSRTB ;[447] INSTALL BREAKPOINTS
JSP T,RESTORE ;[440]
XCT I.NST ;[460]
XEC5: REPEAT SKPMAX,<AOS SKPCT> ;NOTE COUNT OF LOCS SKIPPED
XEC6: JSR SAVE ;SAVE CONTEXT
PUSHJ P,REMOVB ;REMOVE BRKPTS
IFN FTMON,<CHKOUT> ;[612] UNLOCK BREAKPOINT BLOCK
REP 16/108 ;16C112
JUMPE TT,XEC4 ;IF INST DIDN'T SKIP, JUST CLOSE BRACKETS
WIT
JUMPE TT,XEC8 ;IF INST DIDN'T SKIP, JUST CLOSE BRACKETS
REP 20/108 ;16C113
JRST XEC4 ;YES, JUST CLOSE OFF
WIT
JRST XEC8 ;YES, JUST CLOSE OFF
REP 24/108 ;16C114
XEC4: MOVEI T,">" ;CLOSE OFF SKIP MESSAGE
WIT
XEC8: MOVEI T,">" ;CLOSE OFF SKIP MESSAGE
REP 14/110 ;16C115
JRST [ SMERS <CAN'T $X, NO $4M>
WIT
$XBLKE: JRST [SMERS <Inter-section reference and no $4M global breakpoint/execute block>
DEL 23/114 ;16C116
SKIPGE I.NXIT ;;[510] DANGEROUS INSTRUCTION?
PUSHJ P,INSRTB ;;[510] YES, INSERT BREAKPOINTS
INS 25/116 ;16C117
CAIE W2,716 ;[631] IF BLTBU
CAIN W2,717 ;[631] OR BLTUB
JRST $X05 ;[631] TREAT NORMALLY
REP 35/116 ;16C118
TXNN T,-20 ;IF NOT AN AC
SKIPE EAGLOB ;OR IF GLOBAL REFERENCE
MOVE T,[Z @I.NSTE] ;SETUP INTERCEPT ADDRESS POINTER
DPB T,[POINT 23,I.NST,35] ;STORE INTERCEPT ADR IN CURRENT INST
WIT
TDNN T,[-2,,-20] ;[645] IF NOT AN AC
SKIPE EAGLOB ;OR IF GLOBAL REFERENCE
SKIPA T,[Z @I.NSTE] ;[645] SETUP INTERCEPT ADDRESS POINTER
ANDI T,17 ;[645] ELSE KEEP TRACK OF AC REFERENCE
DPB T,[POINT 23,I.NST,35] ;STORE INTERCEPT ADR IN CURRENT INST
MOVEM S,I.NSTS ;[645] KEEP TRACK OF SECTION-NESS OF EA
REP 31/117 ;16C119
SKIPN T ;[514] THEN
SETOM I.PCREF ;[514] IT MUST BE EXECUTED IN ZERO
SETZM I.CJMP ;[514] NOT A CONDITIONAL JUMP (YET)
WIT
JUMPN T,$X15 ;[634] (SKIP IF NOT)
SKPS0 ;[634] AND IF WE'RE NOT IN ZERO
SETOM I.PCREF ;[514] THEN IT MUST BE EXECUTED IN ZERO
$X15: HLLZ S,I.NSTS ;[645] IF EFFECTIVE ADDRESS
JUMPE S,$X16 ;[645] IS NOT IN SECTION 0,
SKPS0 ;[645] BUT WE ARE,
JRST $X16 ;[645] (NO)
SETOM I.PCREF ;[645] THEN MUST CHANGE SECTIONS TO EXECUTE IT
$X16: SETZM I.CJMP ;[634][645] NOT A CONDITIONAL JUMP (YET)
REP 42/117 ;16C120
IFN FTMON,<
CHKIN> ;[614] LOCK BREAKPOINT BLOCK
WIT
IFN FTMON,<CHKIN> ;[614] LOCK BREAKPOINT BLOCK
REP 12/118 ;16C121
;THE $X CODE RESTORES THE COMPLETE USER ENVIRONMENT AND INSERTS
WIT
;THE $X CODE RESTORES THE COMPLETE USER ENVIRONMENT SHORT OF INSERTING
REP 16/122 ;16C122
777000,,IOTS ; 700-777 I/O INSTRUCTIONS
WIT
715000,,IOTS ; 700-715 I/O INSTRUCTIONS ;[631]
BLTUB KSBBLT ; 716-717 KS BLT BYTE ;[631]
777000,,IOTS ; 720-777 I/O INSTRUCTIONS
REP 23/122 ;16C123
054000,,MONUAI ; 052-054 UNDEFINED
WIT
PMOVEM PREF ; 052-053 PMOVE,PMOVEM ;[644]
054000,,MONUAI ; 054 UNDEFINED ;[644]
REP 41/124 ;16C124
MOVE T,[JRST DOITX0+3] ;INIT "NON-SKIP" RETURN
WIT
MOVE T,[JRST DOITX3+2] ;[634] INIT "NON-SKIP" RETURN
REP 45/124 ;16C125
MOVE T,[JRST I.NJR0] ;NOW INTERCEPT DOITX'S XCT
WIT
HRRI T,I.NJR0 ;[634] NOW INTERCEPT DOITX'S XCT
INS 1/125 ;16C126
;STILL IFE FTFILE
DEL 19/125 ;16C127
IFN FTDEC10,<
XUSRUU: JRST SETEA> ;[533] NOT ON TOPS-10 (YET)
IFN FTDEC20,<
REP 32/125 ;16C128
HRRI R,1(R) ;[521] POINT TO SECOND WORD
WIT
AOS R ;[521][645] POINT TO SECOND WORD
REP 37/125 ;16C129
HRRI R,1(R) ;[521] POINT TO THIRD WORD
WIT
AOS R ;[521][645] POINT TO THIRD WORD
REP 41/125 ;16C130
HRRI R,1(R) ;[521] POINT TO FOURTH WORD
WIT
AOS R ;[521][645] POINT TO FOURTH WORD
INS 48/125 ;16C131
IFN FTDEC10,<
RDLUUB: MOVX T,<.UTRED,,TT1> ;[635] UUO ARG <READ,,BLOCK>
MOVEI TT1,2 ;[635] TWO WORDS FOLLOWING
MOVX TT2,.UTLUU ;[635] TRAP TYPE IS LUUO BLOCK
UTRP. T, ;[635] READ THE BLOCK ADDRESS
TDZA T,T ;[635] NONE AFTER ALL?
MOVE T,TT3 ;[635] RETURN IT IN CORRECT AC
POPJ P, ;[635] GOT IT
> ;END IFN FTDEC10
IFN FTDEC20,<
DEL 15/129 ;16C132
SKIPGE I.NXIT ;[431] DANGEROUS INSTRUCTION?
PUSHJ P,REMOVB ;[426] YES, REMOVE BREAKPOINTS
INS 38/131 ;16C133
;STILL IFE FTFILE
DEL 75/131 ;16C134
REP 19/133 ;16C135
PUSH P,[IBP @I.NSTE] ;[624] GENERAL CASE FOR XCT BELOW
HLLZ R,I.NPC ;[624] IF SECTION OF INSTRUCTION PC IS
JUMPE R,IIXBP4 ;[624] 0, GLOBAL REFERENCE ALWAYS WORKS
MOVE T,I.NSTE ;[624] GET BYTE POINTER EA
TXNN T,-20 ;[624] IF NOT ACCUMULATOR
SKIPE EAGLOB ;[624] OR NOT LOCAL
CAIA ;[624] THEN STICK WITH GENERAL CASE
DPB T,[POINT 23,(P),35] ;[624] LOCAL ACC REF; NON-0 SECTION
IIXBP4: POP P,I.NJR0 ;[624] A SOMEWHAT ARBITRARY LOCATION
WIT
MOVE T,[IBP @I.NSTE] ;[645] GET NEW INSTRUCTION
MOVEM T,I.NJR0 ;[645] XCT IT FROM HERE
REP 3/134 ;16C136
IXBP0: HLLZ S,I.NPC ;BYTE POINTER SECTION MIGHT BE PC SECTION
SETOM I.PCREF ;[460] FLAG SPECIAL PC-REF INSTRUCTION
CAME S,SECDDT ;[460] IF OUTSIDE DDT'S SECTION
TXNE R,-20 ;[460] AND BYTE POINTER IS IN AN AC
SETZM I.PCREF ;[460] OTHERWISE IT'S SAFE
TXNE R,-20 ;[460] POINTER IN AN AC?
HLLZ S,I.NSTE ;[460] NO, DEFAULT SECTION IS EA SECTION
WIT
IXBP0: HLLZ S,I.NSTS ;[645] GET SECTION OF B.P. REFERENCE
CAME S,SECDDT ;[460] IF OUTSIDE DDT'S SECTION
TDNE R,[-2,,-20] ;[460][645] AND BYTE POINTER IS IN AN AC
CAIA ;[645] NO, IT'S SAFE
SETOM I.PCREF ;[645] YES, MUST CHANGE SECTIONS TO GET IT RIGHT
DEL 13/134 ;16C137
MOVEM S,I.NEA2 ;PRESERVE S OVER FETCH
REP 17/134 ;16C138
MOVE S,I.NEA2 ;RESTORE S
PUSHJ P,CEFFEX ;GET EA OF IT'S TARGET BYTE
WIT
MOVE S,I.NSTS ;[645] RESTORE S
PUSHJ P,CEFFEX ;GET EA OF ITS TARGET BYTE
REP 24/134 ;16C139
EXCH F,FLAGS ;BACK TO $X FLAGS
WIT
SKIPN I.PCREF ;[645] IF MUST CHANGE SECTIONS
JRST IXBP6 ;[645] (NO, SKIP THIS)
MOVE R,I.NPC ;[645] YES, GET INSTRUCTION
PUSHJ P,FETCHI ;[645] UNCHANGED BY OUR FIXUPS
POPJ P, ;[645] CAN'T?!?
TXO T,1B8 ;[666] DON'T INCREMENT TWICE
MOVEM T,I.NST ;[645] RESTORE FOR PROPER EA HANDLING
IXBP6: EXCH F,FLAGS ;[645] BACK TO $X FLAGS
INS 12/135 ;16C140
INS 24/135 ;16C141
INS 32/135 ;16C142
INS 41/135 ;16C143
;STILL IFE FTFILE
INS 3/136 ;16C144
;KS-10 BYTE BLT INSTRUCTIONS (BLTBU, BLTUB)
KSBBLT: SKPKS ;[631] ON A KS?
JRST IOTS ;[631] NO, TREAT LIKE ANY OTHER IO INSTRUCTION
SETOM I.KRCK ;[631] YES, SET THE SPECIAL FLAG
PUSHJ P,GETAID ;[644] FETCH APRID
KSBBL1: TXNE T,1B3 ;[631] ARE BLTBU/BLTUB DEFINED?
JRST SETI ;[631] YES, TREAT LIKE BLT
JRST IOTS ;[631] NO, NORMAL IO INSTRUCTIONS
PREF: SKPKLS ;[644] ONLY DEFINED ON A KL
POPJ P, ;[644] ILLEGAL OTHERWISE
MOVE T,PCFLG ;[644] GET PC FLAGS
IFN FTEXEC,< ;[644]
SKPEXC> ;[644] IF EXEC MODE
TXNE T,PC$UIO ;[644] OR USER-I/O
JRST PREF1 ;[644] OK TO PROCEED
POPJ P, ;[644] ILLEGAL FOR NON-PRIV'ED USER
PREF1: PUSHJ P,GETAID ;[644] FETCH APR OPTIONS
TXNN T,1B4 ;[644] TEST MAGIC BIT FOR PMOVE/PMOVEM
POPJ P, ;[644] ILLEGAL IF UNDEFINED
JRST SETEA ;[644] ELSE ACT LIKE MOVE/MOVEM
GETAID: SKPKLS ;[644] ONLY VALID FOR KL/KS
JRST GETAI0 ;[644] NO, RETURN ZERO
MOVE T,PCFLG ;[631][644] FETCH THE USER'S FLAGS
IFN FTEXEC,< ;[631]
SKPEXC> ;[631] IF IN EXEC MODE
TXNE T,PC$UIO ;[631] OR USER-IO
JRST [ APRID T ;[631] THEN WE CAN DO STRAIGHT APRID
POPJ P,] ;[644] RETURN IT
IFN FTDEC10,< ;[631] ASK MONITOR FOR APRID
MOVX T,%CCCSB ;[631] CPU STATUS BLOCK POINTER
GETTAB T, ;[631] FIND IT
JRST GETAI0 ;[644] CAN'T, RETURN ZERO
MOVSI T,%CVSAI(T) ;[631] INDEX INTO VARIABLES AREA
HRRI T,.GTC0V ;[631] USE CPU0'S AREA
GETTAB T, ;[631] ASK FOR THE APRID
> ;END IFN FTDEC10
GETAI0: SETZ T, ;[644] NO APRID AVAILABLE
POPJ P, ;[644] RETURN OUR ANSWER
INS 13/136 ;16C145
;STILL IFE FTFILE
REP 41/137 ;16C146
XMOVEI W1,DOITX0+2 ;[527] YES, TREAT LIKE NORMAL SKIP RETURN
JRST DOXX1 ;[527] GO DO OUT-OF-SECTION STUFF
WIT
XMOVEI W1,DOITX3+1 ;[634] YES, TREAT LIKE NORMAL SKIP RETURN
JRST DOXX1 ;[527] GO DO OUT-OF-SECTION STUFF
REP 24/138 ;16C147
JRST DOITX0+2 ;[527] TREAT LIKE NORMAL SKIP
JRST DOITX0+3 ;[527] TREAT LIKE NORMAL DOUBLE SKIP
ERSCJS: ERXCT <ERJMPS @I.ECJA>;[527] EXECUTE AND SUPPRESS ERROR CODE
JRST DOITX0+2 ;[527] LIKE NORMAL SKIP
JRST DOITX0+3 ;[527] LIKE NORMAL DOUBLE SKIP
ERSCJ: ERXCT <ERJMP @I.ECJA>;[527] DO THE EXECUTE
JRST DOITX0+2 ;[527] NORMAL SKIP
JRST DOITX0+3 ;[527] NORMAL DOUBLE SKIP
WIT
JRST DOITX3+1 ;[634] TREAT LIKE NORMAL SKIP
JRST DOITX3+2 ;[634] TREAT LIKE NORMAL DOUBLE SKIP
ERSCJS: ERXCT <ERJMPS @I.ECJA>;[527] EXECUTE AND SUPPRESS ERROR CODE
JRST DOITX3+1 ;[634] LIKE NORMAL SKIP
JRST DOITX3+2 ;[634] LIKE NORMAL DOUBLE SKIP
ERSCJ: ERXCT <ERJMP @I.ECJA>;[527] DO THE EXECUTE
JRST DOITX3+1 ;[634] NORMAL SKIP
JRST DOITX3+2 ;[634] NORMAL DOUBLE SKIP
REP 19/139 ;16C148
JRST DOITX4 ;COMMON CODE
WIT
JRST DOITX7 ;COMMON CODE
REP 29/139 ;16C149
JRST DOITX4 ;COMMON CODE
WIT
JRST DOITX7 ;COMMON CODE
REP 7/140 ;16C150
SKIPGE I.NXIT ;[431] DANGEROUS INSTRUCTION?
PUSHJ P,INSRTB ;[426] YES, INSERT BREAKPOINTS
$XRET ;[510] RESTORE USER'S CONTEXT
DOITX0: XCT I.NST ;EXECUTE THE INSTRUCTION
;(IF IN EXEC MODE THIS MAY BE PXCT)
REPEAT SKPMAX,<AOS SKPCT> ;[527] NOTE COUNT OF SKIPS
$XSAVE ;[510] SAVE USER'S CONTEXT
MOVEI T,SKPMAX+1 ;MAX AMOUNT CAN BE SKIPPED
SUB T,SKPCT ;MINUS THOSE NOT SKIPPED
DOITX4: SETZM SKPCT ;RESET SKIP COUNTER
WIT
DOITX1: $XRET ;[510] RESTORE USER'S CONTEXT
DOITX2: XCT I.NST ;EXECUTE THE INSTRUCTION
;(IF IN EXEC MODE THIS MAY BE PXCT)
DOITX3: REPEAT SKPMAX,<AOS SKPCT> ;NOTE COUNT OF SKIPS
DOITX5: $XSAVE ;[510] SAVE USER'S CONTEXT
DOITX6: MOVEI T,SKPMAX+1 ;[655] MAX AMOUNT CAN BE SKIPPED
SUB T,SKPCT ;MINUS THOSE NOT SKIPPED
DOITX7: SETZM SKPCT ;RESET SKIP COUNTER
INS 20/140 ;16C151
;STILL IFE FTFILE
REP 23/140 ;16C152
DOXX: XMOVEI W1,DOITX0+1 ;[527] ADDRESS TO RETURN TO
WIT
DOXX: SKIPN BPBLK ;[634] DO WE HAVE A GLOBAL BPT/EXECUTE BLOCK?
JRST DOXX5 ;[634] NO, SECTIONS MUST BE MAPPED TOGETHER
XMOVEI W1,DOITX3 ;[634] ADDRESS TO RETURN TO
REP 33/140 ;16C153
SKIPL I.NXIT ;[536] DANGEROUS INSTRUCTION?
JRST [ MOVEM T,SWAP ;[536] NO. SET "RETURN" ADDRESS
JRST SWAP+1] ;[536] RESTORE CONTEXT AND EXECUTE
PUSHJ P,INSRTB ;[460] INSERT BREAKPOINTS
JRST RESTOR ;[460] AND RESTORE CONTEXT FOR EXECUTION
WIT
SKIPGE I.NXIT ;[536] DANGEROUS INSTRUCTION?
JRST RESTOR ;[634] YES, RESTORE USER CONTEXT FOR EXECUTION
MOVEM T,SWAP ;[634] NO, JUST SET "RETURN" ADDRESS
JRST SWAP+1 ;[634] RESTORE CONTEXT AND EXECUTE
;HERE WITH NO $4M BLOCK, MUST EXECUTE IN ACTUAL USER-INSTRUCTION SECTION
DOXX5: HLLZ R,I.NPC ;[634] GET INSTRUCTION'S PC SECTION
CAMN R,SECDDT ;[634] SAME SECTION AS DDT?
JRST DOITX1 ;[634] YES, ALL SET THEN
PUSHJ P,RWEMAP ;[634] NO, ARE WE MAPPED TO THAT SECTION?
JRST $XBLKE ;[634] NOT MAPPED, NO $4M BLOCK, ERROR
XMOVEI TT,DOXX9 ;[634][655] OUR-SECTION REFERENCE ADDRESS
MOVEM TT,I.XJRS ;[634] SET THE RETURN-TO-SECTION FLAG
HLLZM R,SECDDT ;[634] FORCE PROPER SKPS0/SKPNS0 ACTION
HRRI R,DOXX7 ;[634] OUR XCT WITHIN THAT SECTION
XJRST R ;[634] EXECUTE USER INSTRUCTION IN USER SECTION
DOXX7: JSP T,RESTOR ;[655] RESTORE FULL USER CONTEXT
XCT I.NST ;[634] EXECUTE THE INSTRUCTION
;[634] (IF IN EXEC MODE THIS MAY BE PXCT)
REPEAT SKPMAX,<AOS SKPCT> ;[634] NOTE COUNT OF SKIPS
XJRST I.XJRS ;[634] NOW SECTION-CHANGE BACK TO DOXX9
DOXX9: JSR SAVE ;[655] SAVE FULL USER CONTEXT
JRST DOITX6 ;[655] FINISH UP SIMULATION OF THIS INSTR
REP 6/141 ;16C154
NOSKP1: SKIPGE I.NXIT ;[431] DANGEROUS INSTRUCTION?
PUSHJ P,REMOVB ;[426] YES, REMOVE BREAKPOINTS
SETOM LASTPG ;IN CASE PAGE FAULT EVEN ON "SAFE" INST.
WIT
NOSKP1: SETOM LASTPG ;IN CASE PAGE FAULT EVEN ON "SAFE" INST.
INS 50/142 ;16C155
;CONTINUED ON NEXT PAGE
INS 3/143 ;16C156
;CONTINUED FROM PREVIOUS PAGE
REP 1/144 ;16C157
;CONTINUED FROM PREVIOUS PAGE
;STILL IFE FTFILE
WIT
;STILL IFE FTFILE
;CONTINUED FROM PREVIOUS PAGE
REP 8/144 ;16C158
XMOVEI W1,XEC1 ;INTERNAL LIMITS
XMOVEI W2,XEC2 ;OF INSTR$X RETURNS
WIT
XMOVEI W1,XEC5 ;INTERNAL LIMITS
XMOVEI W2,XEC6 ;OF INSTR$X RETURNS
REP 21/144 ;16C159
NXT0: PUSHJ P,LISTEN ;HAS USER TYPED ANYTHING?
JRST NXT1 ;NO, CONTINUE
CAIE T,"?" ;YES, QMARK TYPED
JRST $XQUIT ;NO, ABORT THE $$X
WIT
NXT0: PUSHJ P,LISCK ;HAS USER TYPED ANYTHING?
JRST NXT1 ;NO, CONTINUE
JRST $XQUIT ;NO, ABORT THE $$X
DEL 44/145 ;16C160
DEL 1/148 ;16C161
SUBTTL COMMAND ROUTINES -- PUNCH PAPER TAPE
IFN FTPTP,<
;HERE ON ^R COMMAND - PUNCH OUT CORE
PUNCH: SKPEXC
JRST ERR ;PAPER TAPE STUFF ILLEGAL IN USER MODE
TXC F,FAF!QF
TXCE F,FAF!QF
JRST ERR ;ONE ARGUMENT MISSING
PUN2: ADDI T,1
HRRZM T,TEM1
SUB T,DEFV
JUMPLE T,ERR
PUN1: MOVEI T,4 ;PUNCH 4 FEED HOLES
PUSHJ P,FEED
TXNE F,CF ;PUNCH NON-ZERO BLOCKS?
JRST PUNZ ;YES
HRRZ R,DEFV
IORI R,37
ADDI R,1
CAMLE R,TEM1
MOVE R,TEM1
EXCH R,DEFV
MOVE T,R
SUB T,DEFV
HRL R,T
JUMPGE R,RET ;EXIT OR PUNCH
PBLK: MOVE T,R
SOS W,T ;INIT CHECKSUM
PUSHJ P,PWRD
PBLK1: PUSHJ P,FETCH
JRST ERR
ADD W,T
PUSHJ P,PWRD
AOBJN R,PBLK1
MOVE T,W
PUSHJ P,PWRD
JRST PUN1
;STILL FTPTP
;PUNCH NON-ZERO BLOCKS
PUNZ0: AOS DEFV ;LOOK AT NEXT WORD
PUNZ: HRRZ W,DEFV ;ENTER HERE - GET STARTING ADDRESS
MOVE R,W
SUB W,TEM1 ;CALCULATE NEGATIVE LENGTH
HRL R,W ;SET UP AOBJN POINTER
JUMPGE R,RET ;FINISHED?
CAMG R,[XWD -40,0] ;BLOCK LONGER THAN 40?
HRLI R,-40 ;YES, FIX IT UP
MOVSI W1,400000 ;W1 NEGATIVE MEANS FLUSH 0 WORDS
PUNZ2: PUSHJ P,FETCH ;GET WORD FROM MEMORY
JRST ERR
JUMPE T,[AOJA W1,PUNZ4] ;IF WORD IS 0, INDEX 0 WORD COUNTER
SETZ W1, ;CLEAR 0 WORD COUNTER
PUNZ4: JUMPL W1,PUNZ0 ;FLUSH 0 WORD, GET ANOTHER
CAIL W1,3 ; NOSKIP FOR 3RD 0 WORD AFTER NON 0 WORD
AOSA R ;ADVANCE R TO LAST ADR+1
AOBJN R,PUNZ2
ADD W1,DEFV ;CALCULATE DEFV-R+W1=-WORD COUNT
SUB W1,R
HRLM W1,DEFV ;PUT -WC IN LEFT HALF OF FA
EXCH R,DEFV ;SAVE ADR FOR NEXT BLOCK, GET POINTER
JRST PBLK
;STILL FTPTP
;HERE ON $J COMMAND -- PUNCH END (START) BLOCK
BLKEND: SKPEXC
JRST ERR
TXNN F,QF ;BLOCK END
MOVE T,[JRST 4,DDT]
TXNN T,777B8 ;INSERT JRST IF NO OPCODE
TXO T,<JRST>
PUSH P,T
MOVEI T,20
PUSHJ P,FEED
POP P,T
PUSHJ P,PWRD
PUSHJ P,PWRD ;EXTRA WORD FOR READER TO STOP ON
MOVEI T,400
JRST LOAD2
;STILL FTPTP
;COMMON SUBROUTINES USED BY ALL PAPER TAPE CODE
;PUNCH A WORD ROUTINE
PWRD: MOVEI W1,6
PWRD2: ROT T,6
CONSZ PTP,20
JRST .-1
CONO PTP,50
DATAO PTP,T
SOJG W1,PWRD2
POPJ P,
;PUNCH NULLS (FEED) ROUTINE
FEED: CONSZ PTP,20
JRST .-1
CONO PTP,10
DATAO PTP,FEED1
SOJN T,FEED
FEED1: POPJ P, ;ADDRESS USED AS A CONSTANT
> ;END IFN FTPTP
IFE FTPTP,<BLKEND==<PUNCH==ERR>>
REP 5/152 ;16C162
TXNE F,QF ;[441] USER TYPE EXPLICIT ADDRESS TO WATCH?
JRST [ PUSHJ P,DEFSEC ;[441] YES, POSSIBLY DEFAULT SECTION
HLLZM T,LLOCS ;[530] SET DEFAULT SECTION IF T NOT AN ACC
JRST .+2] ;[441] SKIP DEFAULT ADDRESS
MOVE T,LLOCO ;NO, USE LAST LOCATION OPENED
WIT
TXNN F,QF ;[634] USER TYPE EXPLICIT ADDRESS TO WATCH?
SKIPA T,LLOCO ;[634] NO, USE LAST LOCATION OPENED
PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
REP 6/153 ;16C163
PUSHJ P,TSEP ;[461] SEPARATOR TEXT
WIT
PUSHJ P,TSEP ;SEPARATOR TEXT
REP 15/153 ;16C164
PUSHJ P,LISTEN ;ANYTHING TYPED?
JRST WATCH1 ;NO, KEEP WATCHING
CAIE T,"?" ;YES, QMARK TYPED
JRST DD1 ;NO, ABORT THE WATCH
WIT
PUSHJ P,LISCK ;ANYTHING TYPED?
JRST WATCH1 ;NO, KEEP WATCHING
JRST DD1 ;YES, ABORT THE WATCH
REP 15/154 ;16C165
PUSHJ P,DEFSEC ;[547] YES, GET DEFAULT SECTION
NOP ;[547] NO NEED TO DISTINGUISH RETURN MODES
WIT
PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
REP 6/155 ;16C166
JRST [ MOVEI R,777 ;FETCH FAILED, BUMP TO NEXT PAGE
WIT
JRST [MOVEI R,777 ;FETCH FAILED, BUMP TO NEXT PAGE
REP 30/155 ;16C167
SEAR2B: PUSHJ P,LISTEN ;ANYTHING TYPED?
JRST SEAR1 ;NO, KEEP SEARCHING
CAIE T,"?" ;YES, QMARK TYPED
JRST SEARFN ;NO, ABORT THE SEARCH
WIT
SEAR2B: PUSHJ P,LISCK ;ANYTHING TYPED?
JRST SEAR1 ;NO, KEEP SEARCHING
JRST SEARFN ;YES, ABORT THE SEARCH
REP 21/157 ;16C168
YPTLEN,,YPTBLK] ;LEN,,ADR OF PATH. BLOCK
WIT
YPTLEN,,YPTBLK ;LEN,,ADR OF PATH. BLOCK
YRFLEN,,YRFBLK] ;[656] LEN,,ADR OF RETURNED FILESPEC BLOCK
REP 28/157 ;16C169
MOVEI T,.IODMP ;YES, USE DUMP I/O
WIT
MOVEI T,.IOBIN ;[646] YES, USE BINARY I/O
REP 35/157 ;16C170
EXCH R,.JBFF ;PERSUADE MONITOR TO PUT BUFFER THERE
WIT
MOVEM R,YFLBLK+.FOBSA ;[630] SET UP AS STARTING ADDRESS
EXCH R,.JBFF ;PERSUADE MONITOR TO PUT BUFFER THERE
MOVEI T,YBFSIZ-2 ;[630] SIZE OF BUFFER (FUDGED FOR OVERHEAD)
MOVEM T,YFLBLK+.FOBSZ ;[630] STORE FOR RING SETUP
REP 41/157 ;16C171
TXNE F,CCF ;SYMBOL FILE?
JRST TAPSY ;YES, GO READ IN THEN
CAILE R,YBFBUF+YBFSIZ ;MAKE SURE BUFFER NOT TOO BIG
JRST ERR ;WAS, FORGET IT
WIT
CAILE R,YBFBUF+YBFSIZ ;[646] MAKE SURE BUFFER NOT TOO BIG
JRST ERR ;[646] WAS, FORGET IT
TXNE F,CCF ;[646] SYMBOL FILE?
JRST TAPSY ;[646] YES, GO READ IN THEN
TMSG <[Processing commands from >
MOVEI TT,YFLBLK ;[656] POINT TO FILOP BLOCK
PUSHJ P,TYPFIL ;[656] PRINT FILSPEC
TMSG <]> ;[656] END TEXT
PUSHJ P,TCRLF ;[656] APPEND A CRLF
REP 3/158 ;16C172
TAPSY: JRST ERR ;CODE NOT YET WRITTEN . . .
WIT
TAPSY:
REPEAT 0,<
TMSG <[Loading symbols from >
MOVEI TT,YFLBLK ;[656] POINT TO FILOP BLOCK
PUSHJ P,TYPFIL ;[656] PRINT FILESPEC
TMSG <]> ;[656] END TEXT
PUSHJ P,TCRLF ;[656] APPEND A CRLF
>
JRST ERR ;CODE NOT YET WRITTEN . . .
REP 30/159 ;16C173
> ;END IFN FTDEC10
WIT
; STILL IN IFN FTDEC10
IFN FTYANK!FTFILE,<
TYPFIL: PUSH P,TT ;[656] SAVE FILOP BLOCK ADDRESS
HRRZ TT1,.FOFSP(TT) ;[656] GET RETURNED FILESPEC BLOCK
SKIPN W1,.FOFDV(TT1) ;[656] DEVICE
MOVE W1,.FODEV(TT)
PUSHJ P,TSIXN
TMSG <:>
HLRZ W1,.FOFNC(TT) ;[656] GET CHANNEL HALFWORD
ANDI W1,(FO.CHN) ;[656] ISOLATE CHANNEL
DEVCHR W1, ;[656] GET DEVICE TYPE BITS
TXNN W1,DV.TTY ;[656] WATCH OUT FOR NUL:
TXNN W1,DV.DIR ;[656] IF NOT A DIRECTORY DEVICE,
JRST TYPFI3 ;[656] DON'T TYPE JUNK
HRRZ TT,.FOLEB(TT) ;[656] GET LOOKUP/ENTER BLOCK ADDRESS
SKIPN W1,.FOFFN(TT1) ;[656] FILE NAME
MOVE W1,.RBNAM(TT)
PUSHJ P,TSIXN
TMSG <.> ;[656] SEPARATOR
SKIPN W1,.FOFEX(TT1) ;[656] EXTENSION
HLLZ W1,.RBEXT(TT)
PUSHJ P,TSIXN
HRRZ TT,(P) ;[656] GET FILOP BLOCK ADDRESS BACK
HRRZ TT,.FOPAT(TT) ;[656] GET PATH BLOCK ADDRESS
SKIPN TT ;[656] IF NONE,
MOVEI TT,[0]-.PTPPN ;[656] FAKE UP TO POINT TO A ZERO EVENTUALLY
SKIPN .FOFPP(TT1) ;[656] HAVE A RETURNED FILESPEC BLOCK?
MOVEI TT1,.PTPPN-.FOFPP(TT) ;[656] NO--FAKE UP POINTER TO PATH BLOCK
SKIPN .FOFPP(TT1) ;[656] HAVE A PATH?
JRST TYPFI3 ;[656] NO, DON'T TYPE ONE
TMSG <[> ;[656] START OF PATH
HLRZ W1,.FOFPP(TT1) ;[656] PROJECT NUMBER
PUSHJ P,TOCTW
TMSG <,> ;[656] SEPARATOR
HRRZ W1,.FOFPP(TT1) ;[656] PROGRAMMER NUMBER
PUSHJ P,TOCTW
TYPFI1: SKIPN W1,.FOFSF(TT1) ;[656] END OF PATH?
JRST TYPFI2 ;[656] YES
TMSG <,> ;[656] SEPARATE
PUSHJ P,TSIXN ;[656] PRINT SFD NAME
AOJA TT1,TYPFI1 ;[656] LOOP FOR ALL SFDS
TYPFI2: TMSG <]> ;[656] END PATH
TYPFI3: POP P,TT ;[656] PHASE STACK
POPJ P, ;[656] AND RETURN
> ;END IFN FTYANK!FTFILE
> ;END IFN FTDEC10
REP 3/160 ;16C174
IFE FTFILE,<
WIT
IFN FTFILE,<GO==ERR>
IFE FTFILE,<
REP 8/160 ;16C175
TXNE F,QF ;EXPLICIT START ADDRESS GIVEN?
JRST [ PUSHJ P,DEFSEC ;SET PROPER SECTION
HLLZM T,LLOCS ;[530] SET DEFAULT SECTION IF T NOT AN ACC
JRST GO4] ;BEGIN
WIT
TXNN F,QF ;EXPLICIT START ADDRESS GIVEN?
JRST GO3 ;[634] NO, MAKE AN EDUCATED GUESS
PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
;HERE WITH ADDRESS TO START AT IN T.
;WE LET RESTORE JUMP TO THE USER TO GET OUT OF DDT AS FAST AS POSSIBLE,
;IN CASE AN INTERRUPT IS PENDING.
GO1: PUSH P,T ;SAVE OVER TCRLF
PUSHJ P,TCRLF ;NEATNESS
PUSHJ P,INSRTB ;INSERT BREAKPOINTS
POP P,T ;RESTORE START ADDRESS
SKPNS0 ;IN SECTION 0?
TLNN T,-1 ;AND ADDRESS ISN'T?
JRST RESTOR ;NO, DO NORMAL THING
JRST RESTRX ;YES, USE XJRSTF EVEN IN SECTION 0
;STILL IFE FTFILE
REP 15/160 ;16C176
IFN FTEXEC,<
SKPUSR ;OK IN EDDT IN USER MODE
> ;END IFN FTEXEC
IFN FTEXEC!FTMON,<
JRST ERR ;NO SUCH COMMAND IN EDDT OR MDDT
> ;END IFN FTEXEC!FTMON
WIT
GO3:
IFN FTEXEC,<SKPUSR> ;OK IN EDDT IN USER MODE
IFN FTEXEC!FTMON,<JRST ERR> ;NO SUCH COMMAND IN EDDT OR MDDT
IFN FTDEC10,< ;[630]
MOVEI T,TT ;[630] ARG BLOCK IN TT
SETZM TT ;[630] READ FUNC CODE
ENTVC. T, ;[630] GET ENTRY VECTOR
SETZB TT1,TT2 ;[635] CAN'T, JUST USE JOBDAT
JUMPE TT1,GO5 ;[630] NO ENTRY VECTOR, USE JOBDAT
PUSH P,TT1 ;[630] SAVE LENGTH A MOMENT
MOVE R,TT2 ;[630] GET ENTRY VECTOR ADDRESS
PUSHJ P,FETCH ;[630] GET WHAT IT POINTS TO
JRST ERR ;[630] TSK TSK
POP P,TT1 ;[635] RESTORE LENGTH
CAIE TT1,(JRST) ;[635] START-ADDR FORMAT MAKES THIS IRRELEVANT
JRST [TLNN T,(IFIW) ;[647] IF NOT IFIW,
TLNE T,770000 ;[647] MUST NOT LOOK LIKE INSTRUCTION
TLNN T,^-<(IFIW)> ;[647] IFIW MUST BE PURE
JRST .+2 ;[647] OK, KEEP THIS ADDRESS
JRST .+1] ;[647] NO, KEEP PREVIOUS ADDRESS
SKIPA T,R ;[635] YES, USE THE ORIGINAL ADDRESS
SETZ TT1, ;[635] NO, USE IT AND ALLOW ANY OFFSET
> ;END IFN FTDEC10
REP 29/160 ;16C177
JRST GO2 ;YES
WIT
JRST GO5 ;YES
SKIPLE T2 ;[635] MUST BE POSITIVE
REP 33/160 ;16C178
TXNN F,Q2F ;SECOND QUANT? (I.E. $1G)
SETZM WRD2O ;NO, ASSUME ZERO
CAMG T2,WRD2O ;WITHIN RANGE?
JRST ERR ;NO
ADD T,WRD2O ;ADD OFFSET WITHIN VECTOR
JRST GO4 ;NOW HAVE ADDR IN T, GO START THERE
GO2: HLLZ R,T3 ;[513] SET START ADDRESS SECTION
> ;END IFN FTDEC20
IFN FTDEC10,<
SETZ R, ;[513] TOPS-10 ALWAYS IN ZERO (FOR NOW)
> ;END IFN FTDEC10
WIT
MOVE TT1,T2 ;[630] MOVE LENGTH INTO COMMON PLACE
> ;END IFN FTDEC20
SKIPGE T ;[647] IF IFIW FORMAT,
HLL T,TT2 ;[647] RELOCATE TO EVEC SECTION
TXNN F,Q2F ;SECOND QUANT? (I.E. $1G)
SETZM WRD2O ;NO, ASSUME ZERO
CAMG TT1,WRD2O ;[630] WITHIN RANGE?
JUMPN TT1,ERR ;[635] NO
ADD T,WRD2O ;ADD OFFSET WITHIN VECTOR
JRST GO1 ;NOW HAVE ADDR IN T, GO START THERE
GO5: ;[630] HERE TO TRY JOBDAT
IFN FTDEC10,<HLLZ R,TT2> ;[635] SET START ADDRESS SECTION
IFN FTDEC20,<HLLZ R,T3> ;[513] SET START ADDRESS SECTION
REP 50/160 ;16C179
;CONTINUED ON NEXT PAGE
;STILL IFE FTFILE
;FALL IN FROM ABOVE
;HERE WITH ADDRESS TO START AT IN T.
;WE LET RESTORE JUMP TO THE USER TO GET OUT OF DDT AS FAST AS POSSIBLE,
;IN CASE AN INTERRUPT IS PENDING.
GO4: PUSH P,T ;SAVE OVER TCRLF
PUSHJ P,TCRLF ;NEATNESS
PUSHJ P,INSRTB ;INSERT BREAKPOINTS
POP P,T ;RESTORE START ADDRESS
SKPNS0 ;IN SECTION 0?
TLNN T,-1 ;AND ADDRESS ISN'T?
JRST RESTOR ;NO, DO NORMAL THING
JRST RESTRX ;YES, USE XJRSTF EVEN IN SECTION 0
> ;END IFE FTFILE
IFN FTFILE,<GO==ERR>
;HERE ON AN $M COMMAND -- SET DDT CONTROL REGISTERS
MASK: TXNE F,QF
JRST MASK1
IFN FTFILE,< ;TYPE OUT $M MASKS QUICKLY IN FILDDT
TXNN F,Q2F ;WAS A MASK NUMBER GIVEN?
TDZA TT1,TT1 ;NO, DEFAULT TO SEARCH MASK
SKIPL TT1,WRD2D ;YES, GET THE NUMBER, ERROR IF NEGATIVE
CAIL TT1,MSKMAX ;WITHIN LEGAL LIMITS?
JRST ERR ;NO, COMPLAIN AT USER
MOVEI T,@MSKADR(TT1) ;YES, GET RELEVANT MASK ADDRESS
JRST SETPA9 ;GO TYPE IT OUT QUICKLY
> ;END IFN FTFILE
IFE FTFILE,< ;NORMAL WAY OF DOING THINGS
TXZN F,Q2F ;SECOND ARG TYPED?
TDZA TT1,TT1 ;NO - DEFAULT TO SEARCH MASK
SKIPL TT1,WRD2D ;YES - PICK UP MASK NUMBER
CAIL TT1,MSKMAX ;WITHIN LEGAL LIMITS?
JRST ERR ;NO - COMPLAIN AT USER
MOVEI T,@MSKADR(TT1) ;YES - GET RELEVANT MASK ADDRESS
MASK2: MOVEI W,1
WIT
TXNE F,Q2F ;[635] IS THIS $NG FORM?
ADD T,WRD2O ;[635] YES, ADD THE INCREMENT
JRST GO1 ;[634] CONTINUE WITH "GO" ADDRESS IN T
> ;END IFE FTFILE
;HERE ON AN $I COMMAND -- USER CONTEXT REGISTERS
;HERE ON AN $M COMMAND -- DDT CONTROL REGISTERS
PILOC: SKIPA TT2,[IFIW @ISKADR(TT1)] ;$I TABLE
MASK: MOVE TT2,[IFIW @MSKADR(TT1)] ;$M TABLE
TXZN F,Q2F ;WAS A MASK NUMBER GIVEN?
TDZA TT1,TT1 ;NO, DEFAULT TO SEARCH MASK
SKIPL TT1,WRD2D ;[640] YES, GET THE NUMBER - ERROR IF NEGATIVE
CAML TT1,-1(TT2) ;WITHIN LEGAL LIMITS?
JRST ERR ;NO, COMPLAIN AT USER
TXNE F,QF ;SETTING NEW VALUE, OR LOOKING AT OLD VALUE?
JRST MASK05 ;SET NEW USER-TYPED VALUE
MOVEI T,@TT2 ;LOOKING AT OLD VALUE, GENERATE MASK ADDRESS
MASK02: MOVEI W,1
REP 26/162 ;16C180
PILOC: MOVEI T,SAVPI ;GET ADDRESS FOR $I
JRST MASK2
> ;END IFE FTFILE
;HERE FOR N$M COMMAND
MASK1: TRZN F,Q2F ;SECOND ARG TYPED?
TDZA TT1,TT1 ;NO - DEFAULT TO SEARCH MASK
SKIPL TT1,WRD2D ;YES - PICK UP MASK NUMBER
CAIL TT1,MSKMAX ;LEGAL RANGE?
JRST ERR ;NO - COMPLAIN AT USER
;[421] RANGE CHECK N$4M
CAIE TT1,4 ;[421] $4M?
JRST MASK3 ;[421] NO, SKIP THIS
TLZ T,-1 ;[421] YES, LET ".$4M" WORK
JUMPE T,MASK3 ;[421] ZERO IS ALWAYS OK
CAIL T,20 ;[421] WILL IT FIT INSIDE THE
CAILE T,1000000-BPBMAX;[560] LOCALLY-ADDRESSABLE SECTION?
JRST [ SMERS <BAD $4M VALUE> ;[421] NO, SAY WHY NOT
JRST ERR] ;[421] AND COMPLAIN
MASK3: MOVEM T,@MSKADR(TT1) ;YES - STORE NEW MASK
IFE FTFILE,<
CAIE TT1,5 ;[461] $5M?
JRST RET ;[461] NO, ALL DONE
SETZM SYMVAL ;[461] YES, DON'T TRUST SYMBOLS
IFN FTSCSH,<
PUSHJ P,CLRCSH> ;[461] OR THE CACHE
JRST RET ;[461] NOW WE'RE DONE
> ;END IFE FTFILE
IFN FTFILE,<
CAIE TT1,5 ;[461] $5M?
JRST RET ;[477] NO, ALL DONE NOW
MASK5: PUSHJ P,TCRLF ;[461] MAKE MESSAGE LOOK NICE
PUSHJ P,WRTSYM ;[461] TRY TO WRITE OUT CURRENT SYMBOLS
PUSHJ P,SYMFIX ;[461] GRAB SOME NEW SYMBOLS
JRST [ PUSHJ P,TCRLF ;[461] FAILED, FIRST DO CRLF
SETZM SYMP+S$ADR ;[461] WIPE OUT ALL POSSIBLE POINTERS
SETZM USYMP+S$ADR ;[461] SO NOBODY TRIES TO USE THE
SETZM HSYMP+S$ADR ;[461] BAD SYMBOL TABLE
JRST DD2] ;[461] ALL DONE
JRST DD2 ;[461] ALL DONE
> ;END IFN FTFILE
MSKADR: IFIW MSK ;SEARCH MASK
IFIW TTYMSK ;TTY FORMAT CONTROL MASK
IFIW SYMOFS ;SYMBOL + OFFSET RANGE "MASK"
IFIW BYTMSK ;BYTE TYPEOUT MASK
IFIW BPBLK ;[421] INTER-SECTION BPT BLOCK LOCATION
IFIW SYTLOC ;[461] SYMBOL TABLE LOCATION INFO
IFIW PDFSEC ;[451] "PERMANENT" DEFAULT SECTION
MSKMAX==.-MSKADR ;MAX MASK "FUNCTION"
WIT
;HERE TO SET NEW VALUE
MASK05: CAIN TT1,04 ;$4M?
JRST [SKIPG -2(TT2) ;MAYBE
JRST .+1 ;NOPE, WAS $4I, NOTHING SPECIAL
TLZ T,-1 ;YES, LET ".$4M" WORK
JUMPE T,MASK07 ;ZERO IS ALWAYS OK
CAIL T,20 ;WILL IT FIT INSIDE THE
CAILE T,1000000-BPBMAX;LOCALLY-ADDRESSABLE SECTION?
JRST [SMERS <BAD $4M VALUE> ;NO, SAY WHY NOT
JRST ERR] ;AND COMPLAIN
JRST MASK07] ;[643] OK, SET BPT BLOCK ADDRESS
MASK07: MOVEM T,@TT2 ;SET NEW USER-TYPED VALUE
CAIN TT1,05 ;$5M?
JRST MASK5 ;MAYBE
JRST RET ;ALL DONE WITH $I/$M COMMAND
;HERE ON $5M
MASK5: SKIPG -2(TT2) ;$5I OR $5M COMMAND?
JRST RET ;$5I, ALL DONE
IFE FTFILE,<
SETZM SYMVAL ;$5M, FLAG TO RE-INIT SYMBOL TABLE PTRS
IFN FTSCSH,<PUSHJ P,CLRCSH> ;AND THE CACHE
JRST RET ;NOW WE'RE DONE
> ;END IFE FTFILE
IFN FTFILE,<
MASK5C: PUSHJ P,TCRLF ;MAKE MESSAGE LOOK NICE
PUSHJ P,WRTSYM ;TRY TO WRITE OUT CURRENT SYMBOLS
PUSHJ P,SYMFIX ;GRAB SOME NEW SYMBOLS
JRST [PUSHJ P,TCRLF ;FAILED, FIRST DO CRLF
SETZM SYMP+S$ADR ;WIPE OUT ALL POSSIBLE POINTERS
SETZM USYMP+S$ADR ; SO NOBODY TRIES TO USE THE
SETZM HSYMP+S$ADR ; BAD SYMBOL TABLE
JRST DD2] ;ALL DONE
JRST DD2 ;ALL DONE
> ;END IFN FTFILE
;$I MASK ADDRESS TABLE
EXP 0 ; 0 = $I COMMAND
EXP ISKMAX ; LENGTH OF $I TABLE
ISKADR: IFIW SAVPI+00 ;$00I EXEC-MODE CONI PI
IFIW SAVPI+01 ;$01I EXEC-MODE PI CHANNELS TURNED OFF
IFIW SAVAPR ;$02I EXEC-MODE CONI APR
IFIW PCFLG ;$03I PC FLAGS
IFIW PCWRD ;$04I PC ADDRESS
IFIW EPTWRD ;$05I EXEC PROCESS TABLE PAGE ADDRESS
IFIW UPTWRD ;$06I USER PROCESS TABLE PAGE ADDRESS
IFIW CSTWRD ;$07I CST BASE ADDRESS (VIRTUAL)
IFIW SPTWRD ;$10I SPT BASE ADDRESS (VIRTUAL)
ISKMAX==.-ISKADR ;MAX $I "FUNCTION"
;$M MASK ADDRESS TABLE
EXP 1 ; 1 = $M COMMAND
EXP MSKMAX ; LENGTH OF $M TABLE
MSKADR: IFIW MSK ;$00M SEARCH MASK
IFIW TTYMSK ;$01M TTY FORMAT CONTROL MASK
IFIW SYMOFS ;$02M SYMBOL + OFFSET RANGE "MASK"
IFIW BYTMSK ;$03M BYTE TYPEOUT MASK
IFIW BPBLK ;$04M INTER-SECTION BPT BLOCK LOCATION
IFIW SYTLOC ;$05M SYMBOL TABLE LOCATION INFO
IFIW PDFSEC ;$06M "PERMANENT" DEFAULT SECTION
MSKMAX==.-MSKADR ;MAX $M "FUNCTION"
REP 10/164 ;16C181
PUSHJ P,LLMSEC ;[534] GET/SET DEFAULT SECTION (LLIMIT)
MOVE R,T ;[530] COPY START TO LOOP INDEX
PUSHJ P,ULMSEC ;[534] GET/SET DEFAULT SECTION (ULIMIT)
CAMLE R,T ;[530] START BEFORE FINISH?
JRST ERR ;ERROR
WIT
;[634] PUSHJ P,LLMSEC ;[534] GET/SET DEFAULT SECTION (LLIMIT)
;[634] MOVE R,T ;[530] COPY START TO LOOP INDEX
;[634] PUSHJ P,ULMSEC ;[534] GET/SET DEFAULT SECTION (ULIMIT)
;[634] CAMLE R,T ;[530] START BEFORE FINISH?
;[634] JRST ERR ;ERROR
PUSHJ P,SETUP ;[634] SETUP LOWER AND UPPER ADDRESS LIMITS
REP 27/164 ;16C182
ZERO3: PUSHJ P,LISTEN ;YES, DO A LISTEN THEN
JRST ZERO2 ;KEEP GOING
CAIE T,"?" ;YES, QMARK TYPED
JRST ZERO4 ;ABORT
WIT
ZERO3: PUSHJ P,LISCK ;YES, DO A LISTEN THEN
JRST ZERO2 ;KEEP GOING
JRST ZERO4 ;ABORT
REP 1/165 ;16C183
;SETUP (DEFAULT) LOWER AND UPPER LIMITS FOR $W, $N AND $E
SETUP: TXNE F,FAF ;LOWER LIMIT GIVEN?
JRST [ PUSHJ P,LLMSEC ;[534] GET/SET DEFAULT SECTION (LLIMIT)
MOVE R,T ;[530] COPY START TO LOOP INDEX
JRST SETUP1] ;[534]
IFE FTFILE,<
HLLZ R,LLOC> ;NO, USE 000000 IN LOCAL SECTION
IFN FTFILE,<
SETZ R,> ;NO, USE START OF FILE
MOVEM R,LLIMIT ;SET LOWER LIMIT WORD
SETUP1: TXNE F,SAF ;[534] UPPER LIMIT GIVEN?
JRST [ PUSHJ P,ULMSEC ;[534] GET/SET DEFAULT SECTION (ULIMIT)
JRST SETUP5] ;[530]
IFE FTFILE,<
HLLO T,LLOC> ;NO, USE 777777 IN LOCAL SECTION
WIT
;SETUP (DEFAULT) LOWER AND UPPER LIMITS FOR $W, $N, $E AND $Z
SETUP: TXNE F,FAF ;LOWER LIMIT GIVEN?
JRST [PUSHJ P,LLMSEC ;[534] GET/SET DEFAULT SECTION (LLIMIT)
MOVE R,T ;[530] COPY START TO LOOP INDEX
JRST SETUP1] ;[534]
IFE FTFILE,<HLLZ R,LLOC> ;NO, USE 000000 IN LOCAL SECTION
IFN FTFILE,<SETZ R,> ;NO, USE START OF FILE
MOVEM R,LLIMIT ;SET LOWER LIMIT WORD
SETUP1: TXNE F,SAF ;[534] UPPER LIMIT GIVEN?
JRST [PUSHJ P,ULMSEC ;[534] GET/SET DEFAULT SECTION (ULIMIT)
JRST SETUP5] ;[530]
IFE FTFILE,<HLLO T,LLOC> ;NO, USE 777777 IN LOCAL SECTION
REP 3/166 ;16C184
LLMSEC: MOVEI T,LCOMF ;[534] POINT TO ARGUMENTS FOR COMMON
MOVEI S,LLIMIT ;[534] SUBROUTINE.
JRST LIMSEC ;[534] JOIN COMMON CODE
ULMSEC: MOVEI T,UCOMF ;[534]
MOVEI S,ULIMIT ;[534]
LIMSEC: HRRZS ACCCF ;[542] PUT THE ,, FLAG IN A KNOWN STATE
SKIPE (T) ;[542] DOUBLE COMMA SEEN IN THIS LIMIT?
HRROS ACCCF ;[542] YES, TELL DEFSEC
MOVE T,(S) ;[534] FETCH ARGUMENT FOR DEFSEC
PUSHJ P,DEFSEC ;[534] GET DEFAULT SECTION
HLLZM T,LLOCS ;[534] SET DEFAULT SECTION
MOVEM T,(S) ;[534] COPY BACK IN CASE OF CHANGE
WIT
LLMSEC: MOVEI S,LLIMIT ;[534] SETUP LLIMIT
CAIA ;[634] SKIP INTO COMMON CODE
ULMSEC: MOVEI S,ULIMIT ;[534] SETUP ULIMIT
PUSH P,F ;[634] SAVE TRUE REGISTER "F"
PUSH P,ACCCF ;[634] AND TRUE FLAG "ACCCF"
DMOVE TT1,LLREGF-LLIMIT(S) ;[634] GET PRESERVED "F" AND "ACCCF"
MOVEM TT1,F ;[634] SET PRESERVED STATE OF "F"
MOVEM TT2,ACCCF ;[634] AND "ACCCF" FLAGS
MOVE T,LLIMIT-LLIMIT(S) ;[534] FETCH ARGUMENT FOR CEFFAS
PUSHJ P,CEFFAX ;[634] DEFAULT SECTION IF NEEDED
MOVEM T,LLIMIT-LLIMIT(S) ;[534] COPY BACK IN CASE OF CHANGE
POP P,ACCCF ;[634] RESTORE TRUE STATE OF "ACCCF"
POP P,F ;[634] AND "F" FLAGS
INS 15/175 ;16C185
; + 3/ LENGTH,,ADDRESS OF RETURNED FILSPEC BLOCK
REP 24/175 ;16C186
CAIGE TT1,.FOLEB ;IS FILOP. BLOCK LONG ENUF?
POPJ P, ;NO, ERROR
WIT
CAIG TT1,.FOFSP ;IS FILOP. BLOCK LONG ENUF?
POPJ P, ;NO, ERROR
MOVE TT1,2(T) ;[656] POINTER TO PATH BLOCK
MOVEM TT1,.FOPAT(TT) ;[656] SET IN FILOP. BLOCK
REP 42/175 ;16C187
JRST CPOPJ1 ;NO, ALL DONE
WIT
JRST FSFSE1 ;[656] NO
INS 52/175 ;16C188
FSFSE1: HRRZ TT1,0(T) ;[656] GET FILOP BLOCK AGAIN
MOVE TT,3(T) ;[656] RETURNED FILESPEC POINTER
MOVEM TT,.FOFSP(TT1) ;[656] SAVE
PUSHJ P,FSFCLR ;[656] CLEAR IT OUT
REP 12/176 ;16C189
FSFCLR: HRR TT1,TT ;START ADDRESS
WIT
FSFCLR: HRRZ TT1,TT ;[630] START ADDRESS
REP 18/176 ;16C190
BLT TT1,(TT2) ;ZERO BLOCK
WIT
BLT TT1,-1(TT2) ;[656] ZERO BLOCK
REP 18/177 ;16C191
MOVE T,SECDDT ;[427] SAVE PREVIOUS DDT SECTION
MOVEM T,SECOLD ;[427]
WIT
;[634] MOVE T,SECDDT ;[427] SAVE PREVIOUS DDT SECTION
;[634] MOVEM T,SECOLD ;[427]
REP 43/178 ;16C192
;NOW SET INITIAL DEFAULT SECTION.
IFN FTUD20,< ;[504] ONLY USER-20 HAS AN ENTRY VECTOR
SKIPL T,SECUDD ;[533] IS THERE A STUB?
JRST SAVE2A ;[560] YES, SKIP E.V. SECTION STUFF
PUSHJ P,GEVECS ;[504] NO, GET ENTRY VECTOR SECTION IN T
SETZ T, ;[620] TRY SECTION 0
> ;END IFN FTUD20
IFE FTUD20,<
MOVE T,SECDDT> ;[533] OTHERWISE DEFAULT TO DDT'S SECTION
SAVE2A: SKIPN BPTIP ;[560] ARE WE $X'ING?
MOVEM T,LLOCS ;[504] NO, ENTERING FOR REAL
WIT
;CONTINUED ON NEXT PAGE
INS 5/179 ;16C193
;NOW SET INITIAL DEFAULT SECTION.
IFN FTDEC10,< ;[630]
IFN FTEXEC,<SKPEXC> ;[634] NO ENTRY VECTOR IN EXEC MODE
PUSHJ P,GEVECS ;[635] GET ENTRY VECTOR SECTION
SETZ T, ;[635] CAN'T, USE ZERO
> ;END IFN FTDEC10
IFN FTDEC20,< ;[630]
IFN FTUD20,< ;[504] ONLY USER-20 HAS AN ENTRY VECTOR
SKIPL T,SECUDD ;[533] IS THERE A STUB?
JRST SAVE2A ;[560] YES, SKIP E.V. SECTION STUFF
PUSHJ P,GEVECS ;[504] NO, GET ENTRY VECTOR SECTION IN T
SETZ T, ;[620] TRY SECTION 0
> ;END IFN FTUD20
IFE FTUD20,<MOVE T,SECDDT> ;[533] OTHERWISE DEFAULT TO DDT'S SECTION
> ;END IFN FTDEC20
SAVE2A: SKIPN BPTIP ;[560] ARE WE $X'ING?
MOVEM T,LLOCS ;[504] NO, ENTERING FOR REAL
;STILL IFE FTFILE
;CONTINUED FROM PREVIOUS PAGE
REP 21/179 ;16C194
SETOM KIPAG ;KI-10'S ALWAYS DO KI-PAGING
WIT
IFN FTEXEC,< ;[634] ONLY SET PAGING IN EXEC MODE
SKPUSR ;[634] USER OR EXEC MODE?
SETOM KIPAG ;KI-10'S ALWAYS DO KI-PAGING
> ;END IFN FTEXEC
INS 33/179 ;16C195
IFN FTEXEC,< ;[634] SELECT KI/KL PAGING IF EXEC MODE
SKPEXC ;[634] USER OR EXEC MODE?
JRST SAVE6 ;[634] USER, NO PAGING THEN
CONI PAG,T ;[634] GET PAGING BITS
TXNN T,PGKLMD ;[634] KL-PAGING?
SETOM KIPAG ;[634] NO, KI-PAGING ENABLED
TXNE T,PGKLMD ;[634] KL-PAGING?
SETOM KLPAG ;[634] YES, KL-PAGING ENABLED
> ;[634] END IFN FTEXEC
REP 10/180 ;16C196
JRST SAVE8 ;YES, SKIP THIS
WIT
JRST SAVE7 ;[630] YES, SKIP THIS
INS 21/180 ;16C197
;[630] NOW SEE IF EXTENDED ADDRESSING EXISTS
SAVE7:
IFN FTDEC10,< ;[630] ONLY FOR TOPS-10
MOVSI TT,-1 ;[630] INVALID ADDRESS MASK FROM SECTION ZERO
IFN FTEXEC,< ;[630]
SKPUSR ;[630] IN USER MODE?
JRST SAVE7E ;[630] NO, USE DIFFERENT CHECK
> ;END IFN FTEXEC
MOVX T,%CNST2 ;[630] GETTAB FOR APRID-LIKE FUNCTION
GETTAB T, ;[630] ASK THE MONITOR FOR SOME BITS
SETZ T, ;[630] ASSUME FALSE IF OLD MONITOR
TXNE T,ST%EXA ;[630] EXTENDED ADDRESSING SUPPORTED?
MOVX TT,^-VMADR ;[630] YES, REALLY CAN SEE ANYWHERE FROM 0
IFN FTEXEC,< ;[630]
JRST SAVE7X ;[630] ALL DONE IF USER MODE
SAVE7E: SKPNKL ;[630] ONLY AVAILABLE ON A KL
SKPKLP ;[630] WITH KL-PAGING
JRST SAVE7X ;[630] GIVE UP
APRID T ;[630] GET PROCESSOR OPTIONS
TXNE T,1B1 ;[630] EXTENDED ADDRESSING ON?
MOVX TT,^-VMADR ;[630] YES, CAN SEE EVERYWHERE
> ;END IFN FTEXEC
SAVE7X: MOVEM TT,S0PLIM ;[630] SAVE S0 VISIBILITY LIMIT
> ;END IFN FTDEC10
;CONTINUED ON NEXT PAGE
;STILL IFE FTFILE
;CONTINUED FROM PREVIOUS PAGE
INS 26/180 ;16C198
REPEAT 0,< ;[634]
INS 48/180 ;16C199
> ;[634] END REPEAT 0
REP 1/185 ;16C200
SUBTTL ENTER AND LEAVE DDT -- SUPPRESS ADDRESS BREAKS
;STILL IFE FTFILE
;PCAFI -- ROUTINE TO SUPPRESS ADDRESS BREAK
;CALL IS:
;
; JSP TT2,PCAFI
; INSTR
;
;THIS ROUTINE WILL RETURN TO "INSTR" WITH ADDRESS BREAK INHIBIT SET
;SO THAT THE INSTRUCTION WILL NOT CAUSE AN ADDRESS BREAK.
;
;USED PRIMARILY BY FETCH AND STORE LOGIC.
;
;USES TT1, TT2
PCAFI: SKPS0 ;IN NON-ZERO SECTION?
JRST PCAFI1 ;YES, DIFFERENT CODE
TXO TT2,PC$AFI ;SET ADDRESS FAILURE INHIBIT
JRSTF (TT2) ;AND RETURN ALLOWING ONE INSTRUCTION TO
; EXECUTE FREE OF ADDRESS BREAK
PCAFI1: XSFM TT1 ;MUST EXPLICITLY READ PC FLAGS
TXO TT1,PC$AFI ;SET ADDRESS FAILURE INHIBIT
XJRSTF TT1 ;AND RETURN ALLOWING ONE INSTRUCTION TO
; EXECUTE FREE OF ADDRESS BREAK
WIT
;SECCHG - SWITCH DDT'S SECTION
;CALL IS:
;
; MOVX R,<ADR>
; JSP TT,SECCHG
; RETURN ALWAYS
;
;THE STACK IS (ULP!) UPDATED ACCORDINGLY . . .
SECCHG: HRRZ TT1,P ;CURRENT STACK LEVEL
SKPS0 ;ARE WE IN SECTION 0 GOING OUT?
JRST SECCH4 ;NO
;LOOP CHANGING ALL SECTION-0 PC'S ON THE STACK INTO SECTION-LH(R)
SECCH1: HLLZ TT2,(TT1) ;CURRENT STACK ENTRY
TDC TT2,TT ;CONTRAST WITH SECTION-0 PC FLAGS
TLNE TT2,-1 ;LOOK LIKE A PROBABLE PC?
JRST SECCH2 ;NO
HRRZ TT2,(TT1) ;YEAH, GET SECTION-LOCAL PC
CAIL TT2,DDT ;IS WITHIN DDT RANGE?
CAILE TT2,DDTEND ; . . .
CAIA ;NO
HLLM R,(TT1) ;YES, MAKE IT A SECTION-N PC THEN
SECCH2: CAILE TT1,PDL ;STILL ON THE STACK?
SOJA TT1,SECCH1 ;YES, KEEP ON GOING
SECCH4: HLLM R,TT ;POSITION SECTION
HLLZM R,SECDDT ;NOTE DDT'S NEW SECTION
HLLM R,PDL ;[654] TOP OF STACK IS ALWAYS A DDT PC
HLLM R,XPDL ;[654] AS IS EMERGENCY RETURN
TLNN R,-1 ;GOING INTO SECTION 0?
SETZM SYMVAL ;YES, MIGHT INVALIDATE SYMBOL TABLE POINTERS
XJRST TT ;RETURN TO CALLER IN NEW SECTION
REP 10/186 ;16C201
PUSHJ P,REMOVB ;REMOVE ALL BREAKPOINTS
WIT
TDZA W1,W1 ;[633] FLAG BREAKPOINTS NEED TO BE REMOVED
SETO W1, ;[633] FLAG BREAKPOINTS ALREADY REMOVED
REP 17/186 ;16C202
MOVE T,BPT$B+B$BPT(S);REAL ADDRESS (+1) FROM WHENCE WE CAME
JUMPN T,BCOMG2 ;[421] 0 IF JUMPED FROM SECTION 0 INTO NON-0
MOVE W1,S ;[421] REAL PC IS IN BPT BLOCK
IDIVI W1,B$SIZ ;[421] GET BPT NUMBER
SOS W1 ;[576] NO BPT 0 IN BPBLK
IMULI W1,NBPBW ;[576] GET OFFSET INTO BLOCK
HRRZ R,BPBLK ;[421] GET THE BLOCK BASE ADR
ADD R,W1 ;[421] WHERE BPT JSR'D TO
PUSHJ P,FETCH ;[421] FROM THE BLOCK IN SECTION 0
JRST ERR ;[421] CAN'T GET ADR
TXZ T,PCFLGS ;[421] DON'T WANT ANY FLAGS
BCOMG2: SKPNS0 ;[421] RUNNING IN NON-ZERO SECTION?
ANDI T,-1 ;NO, ONLY 18-BITS OF PC
SKIPE S ;BREAKPOINT 0?
HRRI T,-1(T) ;NO - BACKUP PC BY 1
MOVEM T,PCWRD ;SAVE FOR $X ET AL
HLLZM T,LLOCS ;[421] SET CURRENT SECTION TO BPT SECTION
SETOM BPTIP ;FLAG BREAKPOINT IN PROGRESS
WIT
MOVE R,BPT$B+B$BPT(S);[633] REAL ADDRESS (+1) FROM WHENCE WE CAME
JUMPN R,BCOMG2 ;[633][421] 0 IF JUMPED FROM SEC 0 INTO NON-0
MOVE TT,S ;[633][421] REAL PC IS IN BPT BLOCK
IDIVI TT,B$SIZ ;[633][421] GET BPT NUMBER
SOS TT ;[633][576] NO BPT 0 IN BPBLK
IMULI TT,NBPBW ;[633][576] GET OFFSET INTO BLOCK
HRRZ R,BPBLK ;[633][421] GET THE BLOCK BASE ADR
ADD R,TT ;[633][421] WHERE BPT JSR'D TO
HLL R,BPT$B+B$ADR(S);[661] IN THE RIGHT SECTION
PUSHJ P,FETCH ;[421] FROM THE BLOCK IN ITS SECTION
JRST ERR ;[421] CAN'T GET ADR
TXZ T,PCFLGS ;[421] DON'T WANT ANY FLAGS
MOVE R,T ;[633] MOVE INTO PROPER AC
BCOMG2: SKPNS0 ;[421] RUNNING IN NON-ZERO SECTION?
ANDI R,-1 ;[633] NO, ONLY 18-BITS OF PC
SKIPE S ;BREAKPOINT 0?
HRRI R,-1(R) ;[633] NO - BACKUP PC BY 1
MOVEM R,PCWRD ;[633] SAVE FOR $X ET AL
HLLZM R,LLOCS ;[633][421] SET CURRENT SECTION TO BPT SECTION
SETOM BPTIP ;FLAG BREAKPOINT IN PROGRESS
PUSHJ P,FETCH ;[633] GET A COPY OF THE BPT INSTRUCTION
JRST BCOMG4 ;[633] INACCESSIBLE? TOO BAD...
MOVE W2,T ;[633] SAVE IT AWAY
PUSHJ P,MAKBPT ;[633] GET EXPECTED BPT INSTRUCTION
CAMN W2,T ;[633] EXPECTED INSTRUCTION?
MOVEM R,BPT$B+B$ADR(S);[633] YES, NOTE REAL PC OF THIS BREAKPOINT
BCOMG4: SKIPN W1 ;[634] NEED TO REMOVE BREAKPOINTS?
PUSHJ P,REMOVB ;[633] YES, REMOVE ALL BREAKPOINTS
REP 10/187 ;16C203
IFN FTMON,<
CHKIN> ;[614] TAKE MDDT LOCK.
HLLZ T,LLOCS ;[535] GET THE SECTION OF THE BREAKPOINT
CAME T,SECDDT ;[535] AND COMPARE IT TO DDT'S SECTION.
JRST [ XMOVEI W1,BCOMG3 ;[535] EVENTUAL RETURN
WIT
IFN FTMON,<CHKIN> ;[614] TAKE MDDT LOCK.
HLLZ T,LLOCS ;[535] GET THE SECTION OF THE BREAKPOINT
CAME T,SECDDT ;[535] AND COMPARE IT TO DDT'S SECTION.
JRST [XMOVEI W1,BCOMG3 ;[535] EVENTUAL RETURN
REP 23/187 ;16C204
IFN FTMON,<
CHKOUT> ;[612] GIVE UP MDDT LOCK.
WIT
JFCL ;[633] SAVE COULD CONCEIVABLY SKIP
IFN FTMON,<CHKOUT> ;[612] GIVE UP MDDT LOCK.
INS 6/188 ;16C205
IFN FTEX10,< ;[651] CPNDDT ONLY FOR -10
SKPUSR ;[651] ONLY IN EXEC MODE
SKIPN R,JOBEDV ;[651] GET .EDCNT ADDRESS
JRST BREAK0 ;[651] NO CPNDDT IF NONE
SETZM CPNBIT ;[651] IN CASE OF FAILURE
SKPKLS ;[651] THIS ONLY WORKS ON A KL OR A KS
JRST BREAK0 ;[651] FORGET IT IF NOT
ADDI R,.EDCPN-.EDCNT ;[651] OFFSET TO CPNDDT ADDRESS WORD
PUSHJ P,FETCHV ;[651] FETCH IT
JRST BREAK0 ;[651] DON'T BOTHER IF CAN'T
JUMPE T,BREAK0 ;[651] NOTHING TO DO IF NO CPNDDT
MOVEM T,CPNDDT ;[651] SAVE CPNDDT ADDRESS
ADDI R,.EDCPU-.EDCPN ;[651] OFFSET TO ASNTAB WORD
PUSHJ P,FETCHV ;[651] RETRIEVE FROM MEMORY
JRST BREAK0 ;[651] FORGET IT IF CAN'T
JUMPE T,BREAK0 ;[651] NO CPNDDT PROCESSING IF NOT THERE
MOVE W1,T ;[651] COPY FOR AOBJN LOOPING
PUSH P,T ;[651] SAVE A COPY
APRID W2 ;[651] GET OUR APR ID
ANDI W2,77777 ;[651] MASK GOOD FOR KS AND NOT BAD FOR KL
SKPKS ;[651] IF NOT A KS,
ANDI W2,7777 ;[651] MASK FURTHER FOR KL
BREAK2: HRRZ R,W1 ;[651] GET NEXT WORD TO TEST
PUSHJ P,FETCHV ;[651] RETRIEVE FROM MEMORY
SETZ T, ;[651] NOT TOO BAD IF NOT THERE
CAME T,W2 ;[651] MATCHING APR SERIAL NUMBERS?
AOBJN W1,BREAK2 ;[651] NO, LOOP
POP P,W2 ;[651] YES OR EXPIRED, RESTORE INITIAL POINTER
JUMPGE W1,BREAK0 ;[651] LOSE IF NO MATCH
SUB W2,W1 ;[651] GET XWD JUNK,-CPU #
MOVSI T,(1B0) ;[651] VALUE TO SHIFT
LSH T,(W2) ;[651] GET BIT APPROPRIATE TO THIS CPU
MOVEM T,CPNBIT ;[651] SAVE FOR PROCEED
MOVE R,CPNDDT ;[651] WHERE TO STORE IT
PUSHJ P,STOREP ;[651] STORE IT AWAY
SETZM CPNBIT ;[651] GIVE UP ON RESTORE IF CAN'T
BREAK0:
> ;END FTEX10
REP 8/189 ;16C206
JUMPE R,INSRT3 ;IF 0 THEN NO BREAKPOINT HERE
IFN FTMON,<
CHKIN> ;[612] INTERLOCK IN MDDT
SETZM BPT$B+B$BPT(S) ;[421] CLEAR OBJECT OF JSR FOR SEC. 0 CHECK
SKPNS0 ;[421] IF IN SECTION 0
TXNN R,VSECNO ;[421] AND BPT ISN'T
SKIPA ;[421] ...
JRST INSRT4 ;[421] THEN CAN'T DO ANYTHING
WIT
JUMPE R,INSRT8 ;[633] IF 0 THEN NO BREAKPOINT HERE
IFN FTMON,<CHKIN> ;[612] INTERLOCK IN MDDT
MOVE T,BPT$B+B$FLG(S);[633] FETCH THIS BREAKPOINT'S FLAGS
TXNE T,BP$INS ;[633] IS BPT STILL INSERTED (REMOVE FAILED)?
JRST INSRT8 ;[633] YES, LEAVE WELL ENOUGH ALONE
REP 19/189 ;16C207
HLLZ W1,R ;[421] GET BPT SECTION
SKPS0 ;[421] DDT IN 0?
CAMN W1,SECDDT ;[421] OR BPT IN DDT'S SECTION?
JRST INSRT8 ;[421] YES, USE STRAIGHT JSR
SKIPE BPBLK ;[421] BPT BLOCK SET?
JRST INSRT6 ;[421] YES, USE INDIRECT JSR
INSRT4: SMERS <IS IN DIFFERENT SECTION> ;[421] CAN'T SET BPT
INSRT5: PUSHJ P,INSRER ;[421] NOTIFY USER
IFN FTMON,<
CHKOUT> ;[612] RELEASE ONE LOCK.
SETOM BPT$B+B$INS(S) ;[421] FLAG NOTHING HERE
JRST INSRT3 ;[421] TRY THE NEXT ONE
INSRT6:
MOVE W1,S ;[421] COMPUTE BPT NUMBER
IDIVI W1,B$SIZ ;[421]
SOS W1 ;[576] NO BPT 0 IN BPBLK
IMULI W1,NBPBW ;[437] GET OFFSET INTO BLOCK
HRRZ T,BPBLK ;[421] GET ADR OF BLOCK
TXNE R,VSECNO ;[421] BPT IN SECTION 0?
PUSHJ P,SNZEQV ;[421] OR BPT SECTION MAPPED TO 0?
JRST INSRT7 ;[421] YES, MAY BE HIT FROM 0
HRLI T,(JSR @) ;[421] BUILD BPT INSTRUCTION
ADD T,W1 ;[421] GET "JSR @FOO+N"
PUSHJ P,DEPMEM ;[421] STUFF IT IN
PUSHJ P,INSRER ;[421] CAN'T, COMPLAIN
HRR R,T ;[421] GET "FOO+N" IN BPT SECTION
XMOVEI T,BPT$B+B$BPT(S);[421] GET ADR OF DDT'S BPT LOCATION
JRST INSRT9 ;[421] AND GO STORE IT
WIT
PUSHJ P,MAKBPT ;[633] MAKE A BREAKPOINT INSTRUCTION
PUSHJ P,CHKBPT ;[634] VERIFY THAT WE CAN USE IT
JRST INSRT4 ;[634] OOPS, ERROR
JUMPE TT,INSRT6 ;[634] IF "LOCAL", JUST INSERT BPT DIRECTLY
;"GLOBAL" BREAKPOINT = JSR TO AN XJRST TO DDT'S "JSR BCOMG"
SETZM BPT$B+B$BPT(S) ;[421] CLEAR JSR (E) FOR LOCAL/GLOBAL CHECK
PUSHJ P,DEPMEM ;[633] PUT "GLOBAL" BREAKPOINT INTO PROGRAM
JRST INSRT5 ;[633] CAN'T, COMPLAIN
HRRI R,1(T) ;[421] ADDRESS FOR THE XJRST
MOVSI T,(XJRST) ;[421] BUILD "XJRST .+1"
HRRI T,1(R) ;[421]
PUSHJ P,DEPMEM ;[421] PUT XJRST INTO GLOBAL BREAKPOINT BLOCK
JRST INSRT5 ;[634] COMPLAIN
HRRI R,1(R) ;[421] "E" OF "XJRST .+1"
XMOVEI T,BPT$B+B$JSR(S);[421] ADDRESS OF DDT'S BPT ENTRY
INSRT6: PUSHJ P,DEPMEM ;[633][421] STUFF INTO USER PROGRAM
JRST INSRT5 ;[634] COMPLAIN
MOVE T,BPT$B+B$FLG(S);[633] FETCH BREAKPOINT'S FLAGS
TXO T,BP$INS ;[633] BREAKPOINT HAS BEEN INSTALLED
TXZ T,BP$ERM ;[633] AND HAS NO COMPLAINTS
MOVEM T,BPT$B+B$FLG(S);[633] REMEMBER THAT
INSRT8: ADDI S,B$SIZ ;[633] ADVANCE TO NEXT BREAKPOINT
CAIGE S,B$SIZ*<NBP+1> ;DONE THEM ALL YET?
JRST INSRT1 ;NO, GO DO NEXT ONE
POPJ P, ;YES, RETURN WITH BREAKPOINTS INSTALLED
INSRT4: SMERS <IS IN DIFFERENT SECTION> ;[421] CAN'T SET BPT
INSRT5: PUSHJ P,INSRER ;[421] NOTIFY USER
IFN FTMON,<CHKOUT> ;[612] RELEASE ONE LOCK.
MOVX TT,BP$INS ;[633] BREAKPOINT-INSTALLED FLAG
ANDCAM TT,BPT$B+B$FLG(S) ;[633] THIS BPT NOT INSTALLED
JRST INSRT8 ;[633][421] TRY THE NEXT ONE
REP 3/190 ;16C208
;HERE IF DDT IN NON-ZERO SECTION AND BPT IN SECTION 0.
;WE CAN'T JSR DIRECTLY OUT OF SECTION 0, WE HAVE TO JSR TO A PLACE IN
;SECTION 0 AND THEN XJRST INTO DDT. THE "JSR ADDRESS" IN THE DDT
;BREAKPOINT BLOCK WAS SET TO ZERO (NEAR INSRT1:) SO DDT KNOWS
;IT CAME FROM SECTION 0.
INSRT7: HRLI T,(JSR) ;[421] BPT INST IS "JSR FOO+N*NBPBW"
ADDI T,(W1) ;[421] ADD THE OFFSET IN
PUSHJ P,DEPMEM ;[421] STUFF IT IN
PUSHJ P,INSRER ;[421] CAN'T, COMPLAIN
HRRI R,1(T) ;[421] STORE INTO "FOO+N*NBPBW+1"
HRLI T,(XJRST) ;[421] BUILD "XJRST .+1"
HRRI T,1(R) ;[421]
PUSHJ P,DEPMEM ;[421] STUFF THAT
PUSHJ P,INSRER ;[421] COMPLAIN
HRRI R,1(R) ;[421] INC. TO "FOO+N*NBPBW+2"
XMOVEI T,BPT$B+B$JSR(S);[421] GET FULL ADR OF DDT'S BPT ENTRY
JRST INSRT9 ;[421] GO STORE IT
IFL NBPBW-3,<PRINTX ?NBPBW TOO SMALL, MUST BE AT LEAST THREE>
;HERE IF DDT IN SEC 0, OR BPT SECTION SAME AS DDT SECTION
INSRT8: MOVSI T,(JSR) ;[421] FIRST HALF OF BREAKPOINT
HRRI T,BPT$B+B$BPT(S);CALCULATE ADDRESS TO BREAKPOINT TO
INSRT9: PUSHJ P,DEPMEM ;[421] STUFF INTO USER PROGRAM
PUSHJ P,INSRER ;CAN'T WRITE, COMPLAIN
INSRT3: ADDI S,B$SIZ ;ADVANCE TO NEXT BREAKPOINT
CAIGE S,B$SIZ*<NBP+1> ;DONE THEM ALL YET?
JRST INSRT1 ;NO, GO DO NEXT ONE
POPJ P, ;YES, RETURN WITH BREAKPOINTS INSTALLED
WIT
;[633] BUILD "LOCAL" OR "GLOBAL" BREAKPOINT INSTRUCTION
;
;BREAKPOINT INSTRUCTIONS COME IN TWO FLAVORS:
; JSR $NB+B$BPT ;LOCAL BREAKPOINT
; JSR BPBLK+N ;GLOBAL BREAKPOINT
;IN THE CASE OF A GLOBAL BREAKPOINT, THE CALLER MUST PUT THE XJRST AND
;THE FINAL DESTINATION ADDRESS ($NB+B$JSR) IN THE BREAKPOINT BLOCK.
;
;CALL:
; R/ ADDRESS OF BREAKPOINT
; S/ BREAKPOINT "INDEX"
; PUSHJ P,MAKBPT
; T/ BREAKPOINT INSTRUCTION OR 0 IF ERROR.
; TT/ 0 IF "LOCAL" BREAKPOINT, ADDRESS FOR XJRST IF "GLOBAL" BREAKPOINT
;
;THE CALLER IS RESPONSIBLE FOR VALIDITY-CHECKING THINGS (CALLING CHKBPT).
MAKBPT: HRRZ T,BPBLK ;GET GLOBAL BREAKPOINT BLOCK (IF ANY)
JUMPN T,MAKBP3 ;IF SET, THEN ALL BREAKPOINTS ARE "GLOBAL"
MOVSI T,(JSR) ;LOCAL BREAKPOINT, JUST NEED JSR
HRRI T,BPT$B+B$BPT(S); INTO BREAKPOINT AREA
SETZ TT, ;FLAG ZERO FOR "LOCAL" BREAKPOINT
POPJ P, ;ALL DONE
MAKBP3: MOVE TT,S ;NEED REAL BPT INDEX
IDIVI TT,B$SIZ ;GET BPT NUMBER
SOS TT ;NO BPT 0 IN BPBLK
IMULI TT,NBPBW ;GET BPBLK OFFSET
ADD T,TT ;OFFSET INTO GLOBAL BREAKPOINT BLOCK
HRLI T,(JSR) ;FINISH CONCOCTING "GLOBAL" BPT INST
AOJA TT,CPOPJ ;RETURN WITH T/INST AND TT/NONZERO
REP 3/191 ;16C209
;CHECK FOR SECTION 0 AND BPT SECTION MAPPED TOGETHER. IF THEY ARE,
;THE BREAKPOINT MAY BE HIT FROM SECTION 0, AND JSR @ WON'T GET YOU OUT.
;IN THAT CASE THE SECTION 0 FLAVOR OF BPT MUST BE USED.
;
; T/ ADDRESS OF BREAKPOINT BLOCK (SECTION RELATIVE)
; R/ ADDRESS OF BREAKPOINT (GLOBAL)
; PUSHJ P,SNZEQV
; RETURN +1: SECTION 0 AND BPT SECTION EQUIVALENT
; +2: SECTIONS NOT EQUIVALENT
;R AND T PRESERVED.
SNZEQV:
IFN FTEXEC,< ;[421]
SKPUSR ;[421] IN EXEC MODE?
JRST SNZEQ1 ;[421] YES, SKIP USER ROUTINE
> ;END IFN FTEXEC
PUSHJ P,SNZEU ;[421] CHECK SECTIONS IN USER MODE
POPJ P, ;[421] EQUIVALENT, RETURN
SNZEQ1: HRRZ TT,T ;[421] CHECK BPT BLOCK
PUSHJ P,SPGEQV ;[421] SKIP IF PAGES EQUIVALENT
JRST CPOPJ1 ;[421] AREN'T, SECTIONS NOT EQUIVALENT
HRRZ TT,R ;[421] CHECK ACTUAL BPT LOCATION
PUSHJ P,SPGEQV ;[421] SKIP IF PAGES EQUIVALENT
JRST CPOPJ1 ;[421] AREN'T, SECTIONS NOT EQUIVALENT
POPJ P, ;[421] PAGES ARE EQUIVALENT
;CHECK SECTIONS IN USER MODE -- RSMAP%, RMAP%
IFN FTDEC20,< ;[421] TOPS-20 VERSION
SNZEU: PUSHJ P,SAVT4 ;[421] SAVE JSYS ACS
MOVSI T1,.FHSLF ;[421] FOR OUR PROCESS
HLR T1,R ;[421] BPT SECTION
RSMAP% ;[421] GET SECTION INFO
JUMPE T1,CPOPJ1 ;[421] IF PRIVATE, CAN'T BE EQUIVALENT
TRNN T1,-1 ;[421] MAPPED WITH ZERO?
POPJ P, ;[421] YES, EQUIVALENT
JRST CPOPJ1 ;[421] NO, NOT EQUIVALENT
> ;END IFN FTDEC20
IFN FTDEC10,<
SNZEU: JRST CPOPJ1> ;[472] NEVER EQUIVALENT IN USER MODE
WIT
;CHKBPT - VERIFY THAT BREAKPOINT FROM MAKBPT CAN BE INSERTED
;CALL IS:
;
; PUSHJ P,MAKBPT
; PUSHJ P,CHKBPT
; ERROR RETURN
; NORMAL RETURN
;
;ON ENTRY, ASSUMES ACS AS SETUP VIA MAKBPT.
;
;ON ERROR RETURN, THE BREAKPOINT CAN'T BE SET - EITHER DDT IS NOT MAPPED
;INTO THE SECTION FOR A LOCAL BREAKPOINT, OR THE GLOBAL BREAKPOINT BLOCK
;DOESN'T EXIST/ISN'T WRITABLE.
;
;ON NORMAL RETURN, THE BREAKPOINT CAN SAFELY BE INSERTED.
CHKBPT: PUSHJ P,SAVRST ;SAVE THE REGS
PUSH P,TT ;SAVE TT ALSO
JUMPN TT,CHKBP5 ;IF GLOBAL, VERIFY THE $4M BLOCK
;LOCAL BREAKPOINT, DDT MUST BE MAPPED IN THE BREAKPOINT SECTION
ANDCMI R,-1 ;JUST SECTION NUMBER
CAMN R,SECDDT ;BREAKPOINT TO DDT'S SECTION?
JRST CHKBP7 ;YES, OK THEN
PUSHJ P,RWEMAP ;ARE WE MAPPED IN THE RIGHT SECTION?
JRST CHKBP8 ;NO, THEN THIS BREAKPOINT CAN'T BE DONE
JRST CHKBP7 ;YES, THIS BREAKPOINT IS OK
;GLOBAL BREAKPOINT, VERIFY THE $4M BLOCK
CHKBP5: HRR R,BPBLK ;SECTION-RELATIVE $4M BLOCK
PUSHJ P,CHKADR ;GET PAGE ACCESSIBILITY
TXNN TT,PG$WRT ;IS IT WRITABLE?
JRST CHKBP8 ;NO, CAN'T SET A BREAKPOINT THERE
ADDI R,BPBLEN ;RANGE-CHECK END OF BLOCK
PUSHJ P,CHKADR ;GET PAGE ACCESSIBILITY
TXNE TT,PG$WRT ;IS IT WRITABLE?
CHKBP7: AOS -1(P) ;YES, SUCCESSFUL (SKIP) RETURN INDICATED
CHKBP8: POP P,TT ;RESTORE LOCAL/GLOBAL FLAG
POPJ P, ;RETURN AS APPROPRIATE
;RWEMAP - VERIFY THAT DDT IS MAPPED INTO SPECIFIED VIRTUAL SECTION
;CALL IS:
;
; MOVX R,<ADR>
; PUSHJ P,RWEMAP
; ERROR RETURN
; NORMAL RETURN
;
;WHERE <ADR> IS THE "USER VIRTUAL ADDRESS" INTO WHICH SECTION DDT MUST BE
;MAPPED (CALLED FROM $X).
;
;ON ERROR RETURN DDT IS DEFINITELY NOT MAPPED INTO THE DESIRED VIRTUAL
;SECTION.
;
;ON NORMAL RETURN, DDT IS MOST PROBABLY MAPPED INTO THE DESIRED VIRTUAL
;SECTION.
RWEMAP: PUSHJ P,SAVRST ;SAVE CALLER'S "R", "S", AND "T" REGISTERS
MOVE T,PCFLG ;GET A RELATIVELY-RANDOM BIT PATTERN
XOR T,PCWRD ;MAKE IT A TAD MORE RANDOM
PUSH P,T ;MAKE A SCRATCHABLE COPY OF IT
HRR R,P ;GLOBAL REFERENCE TO RANDOM BIT PATTERN
PUSHJ P,FETCH ;FETCH OTHER-SECTION'S CONTENTS
JRST RWEMA8 ;WE DEFINITELY ARE *NOT* MAPPED
CAME T,0(P) ;THAT SECTION MATCH OUR SECTION?
JRST RWEMA8 ;NO, THEN NOT MAPPED
SETCMM 0(P) ;NOW CHANGE OUR LOCAL COPY
PUSHJ P,FETCH ;AND FETCH OTHER-SECTION'S COPY
JRST RWEMA8 ;DUH????
CAME T,0(P) ;DOES IT STILL MATCH?
JRST RWEMA8 ;NO, THEN NOT MAPPED AFTER ALL (SNEAKY!)
POP P,T ;YES, ALMOST CERTAINLY MAPPED TOGETHER
JRST CPOPJ1 ;TAKE GOOD (MAPPED) RETURN
RWEMA8: POP P,T ;PITCH RANDOM BIT PATTERN
POPJ P, ;TAKE BAD (UNMAPPED) RETURN
REP 3/192 ;16C210
;SPGEQV -- SKIP IF PAGES ARE EQUIVALENT
; TT/ ADDRESS TO CHECK
; PUSHJ P,SPGEQV
; RETURNS +1: PAGES NOT EQUIVALENT
; +2: PAGES EQUIVALENT
IFN FTEXEC,< ;[421] EXEC MODE VERSION
SPGEQV: SKPEXC ;[421] IN EXEC MODE?
JRST SPGEU ;[421] NO, USER MODE
MAP TT1,@TT ;[421] CHECK GIVEN SECTION
PUSH P,TT1 ;[421] SAVE DATA
TLZ TT,-1 ;[421] GET SECTION 0 ADDRESS
MAP TT1,@TT ;[421] CHECK SECTION 0
POP P,TT ;[421] GET PREV. DATA
CAME TT1,TT ;[421] SAME?
POPJ P, ;[421] NO, PAGES NOT EQUIVALENT
JRST CPOPJ1 ;[421] YES, PAGES EQUIVALENT
> ;END IFN FTEXEC
;USER MODE VERSION
IFN FTDEC20,<
IFE FTEXEC,<
SPGEQV:> ;[421] NEED THIS TAG TOO IN USER MODE
SPGEU: PUSHJ P,SAVT4 ;[421] SAVE JSYS ACS
MOVE T1,TT ;[421] COPY ADDRESS
LSH T1,WRD2PG ;[421] MAKE IT A PAGE NO.
HRLI T1,.FHSLF!FH%EPN;[421] IN OUR PROCESS
RMAP% ;[421] GET PAGE HANDLE
JUMPL T1,CPOPJ ;[421] PAGE EXISTS?
MOVEM T1,TT1 ;[421] YES, HANG ONTO HANDLE
HRRZ T1,TT ;[421] GET SECTION 0 ADDRESS
LSH T1,WRD2PG ;[421] MAKE IT A PAGE NO.
HRLI T1,.FHSLF!FH%EPN;[421] IN OUR PROCESS
RMAP% ;[421] GET PAGE HANDLE
CAME T1,TT1 ;[421] SAME HANDLE?
POPJ P, ;[421] NO, PAGES NOT EQUIVALENT
JRST CPOPJ1 ;[421] YES, PAGES EQUIVALENT
WIT
REPEAT 0,<
;CHECK FOR SECTION 0 AND BPT SECTION MAPPED TOGETHER. IF THEY ARE,
;THE BREAKPOINT MAY BE HIT FROM SECTION 0, AND JSR @ WON'T GET YOU OUT.
;IN THAT CASE THE SECTION 0 FLAVOR OF BPT MUST BE USED.
;
; T/ ADDRESS OF BREAKPOINT BLOCK (SECTION RELATIVE)
; R/ ADDRESS OF BREAKPOINT (GLOBAL)
; PUSHJ P,SNZEQV
; RETURN +1: SECTION 0 AND BPT SECTION EQUIVALENT
; +2: SECTIONS NOT EQUIVALENT
;R AND T PRESERVED.
SNZEQV:
IFN FTEXEC,< ;[421]
SKPUSR ;[421] IN EXEC MODE?
JRST SNZEQ1 ;[421] YES, SKIP USER ROUTINE
> ;END IFN FTEXEC
PUSHJ P,SNZEU ;[421] CHECK SECTIONS IN USER MODE
POPJ P, ;[421] EQUIVALENT, RETURN
SNZEQ1: HRRZ TT,T ;[421] CHECK BPT BLOCK
PUSHJ P,SPGEQV ;[421] SKIP IF PAGES EQUIVALENT
JRST CPOPJ1 ;[421] AREN'T, SECTIONS NOT EQUIVALENT
HRRZ TT,R ;[421] CHECK ACTUAL BPT LOCATION
PUSHJ P,SPGEQV ;[421] SKIP IF PAGES EQUIVALENT
JRST CPOPJ1 ;[421] AREN'T, SECTIONS NOT EQUIVALENT
POPJ P, ;[421] PAGES ARE EQUIVALENT
;CHECK SECTIONS IN USER MODE -- RSMAP%, RMAP%
IFN FTDEC20,< ;[421] TOPS-20 VERSION
SNZEU: PUSHJ P,SAVT4 ;[421] SAVE JSYS ACS
MOVSI T1,.FHSLF ;[421] FOR OUR PROCESS
HLR T1,R ;[421] BPT SECTION
RSMAP% ;[421] GET SECTION INFO
JUMPE T1,CPOPJ1 ;[421] IF PRIVATE, CAN'T BE EQUIVALENT
TRNN T1,-1 ;[421] MAPPED WITH ZERO?
POPJ P, ;[421] YES, EQUIVALENT
JRST CPOPJ1 ;[421] NO, NOT EQUIVALENT
REP 44/192 ;16C211
IFE FTEXEC,<SPGEQV==ERR> ;[421] CAN'T HAPPEN ON TOPS-10
IFN FTEXEC,<SPGEU==ERR>
> ;END IFN FTDEC10
WIT
SNZEU: PUSHJ P,SAVR ;[633] AS ADVERTISED
LSH R,WRD2PG ;[633] WANT PAGE NUMBER
HRLI R,.PAGCA ;[633] CHECK ACCESS
PAGE. R, ;[633] GET THE INFO
SETZ R, ;[633] ASSUME NOT MAPPED IF FAILS
TXNE R,PA.GIN ;[633] INDIRECT SECTION?
TXNE R,PA.GSC ;[633] INDIRECT TO ZERO?
JRST CPOPJ1 ;[633] NO
POPJ P, ;[633] YES
> ;END IFN FTDEC10
;STILL REPEAT 0
;STILL IFE FTFILE
;SPGEQV -- SKIP IF PAGES ARE EQUIVALENT
; TT/ ADDRESS TO CHECK
; PUSHJ P,SPGEQV
; RETURNS +1: PAGES NOT EQUIVALENT
; +2: PAGES EQUIVALENT
IFN FTEXEC,< ;[421] EXEC MODE VERSION
SPGEQV: SKPEXC ;[421] IN EXEC MODE?
JRST SPGEU ;[421] NO, USER MODE
MAP TT1,@TT ;[421] CHECK GIVEN SECTION
PUSH P,TT1 ;[421] SAVE DATA
TLZ TT,-1 ;[421] GET SECTION 0 ADDRESS
MAP TT1,@TT ;[421] CHECK SECTION 0
POP P,TT ;[421] GET PREV. DATA
CAME TT1,TT ;[421] SAME?
POPJ P, ;[421] NO, PAGES NOT EQUIVALENT
JRST CPOPJ1 ;[421] YES, PAGES EQUIVALENT
> ;END IFN FTEXEC
;USER MODE VERSION
IFN FTDEC20,<
IFE FTEXEC,<
SPGEQV:> ;[421] NEED THIS TAG TOO IN USER MODE
SPGEU: PUSHJ P,SAVT4 ;[421] SAVE JSYS ACS
MOVE T1,TT ;[421] COPY ADDRESS
LSH T1,WRD2PG ;[421] MAKE IT A PAGE NO.
HRLI T1,.FHSLF!FH%EPN;[421] IN OUR PROCESS
RMAP% ;[421] GET PAGE HANDLE
JUMPL T1,CPOPJ ;[421] PAGE EXISTS?
MOVEM T1,TT1 ;[421] YES, HANG ONTO HANDLE
HRRZ T1,TT ;[421] GET SECTION 0 ADDRESS
LSH T1,WRD2PG ;[421] MAKE IT A PAGE NO.
HRLI T1,.FHSLF!FH%EPN;[421] IN OUR PROCESS
RMAP% ;[421] GET PAGE HANDLE
CAME T1,TT1 ;[421] SAME HANDLE?
POPJ P, ;[421] NO, PAGES NOT EQUIVALENT
JRST CPOPJ1 ;[421] YES, PAGES EQUIVALENT
> ;END IFN FTDEC20
IFN FTDEC10,<
IFE FTEXEC,< ;[633] TOPS-10 USER MODE
SPGEQV:> ;[633] CAN NEVER MAP LESS THAN A SECTION
SPGEU: POPJ P, ;[633] DONE
> ;END IFN FTDEC10
> ;END REPEAT 0
REP 7/193 ;16C212
REMOV1: MOVE T,BPT$B+B$INS(S);INSTRUCTION THAT BELONGS AT THIS BREAKPOINT
CAME T,[-1] ;[421] SPECIAL CASE FOR NONE SET?
SKIPG R,BPT$B+B$ADR(S);ADDRESS OF THIS BREAKPOINT (IF ANY)
JRST REMOV2 ;NONE
PUSHJ P,DEPMEM ;PUT USER INSTRUCTION BACK
PUSHJ P,REMOER ;CAN'T, COMPLAIN
IFN FTMON,<
CHKOUT> ;[612] RELEASE ONE LOCK.
REMOV2: SUBI S,B$SIZ ;[421] ADVANCE TO NEXT BREAKPOINT
WIT
REMOV1: SKIPG R,BPT$B+B$ADR(S);[633] ADDRESS OF THIS BREAKPOINT (IF ANY)
JRST REMOV8 ;[633] NONE
MOVE T,BPT$B+B$FLG(S);[633] FETCH BREAKPOINT'S FLAGS
TXNN T,BP$INS ;[633] IS IT INSTALLED?
JRST REMOV8 ;[633] NO, AND USER ALREADY KNOWS
PUSHJ P,FETCH ;[633] GET CURRENT BREAKPOINT INSTR
JRST REMOV6 ;[633] CAN'T READ IT? LET THE WRITE FAIL...
MOVE W2,T ;[633] SAVE THE INSTRUCTION
PUSHJ P,MAKBPT ;[633] GET THE EXPECTED INSTRUCTION
CAME W2,T ;[633] IS OUR BREAKPOINT SAFE?
JRST REMOV4 ;[633] NO - TRASHED OR MOVED
REMOV6: MOVE T,BPT$B+B$INS(S);[633] INSTRUCTION THAT BELONGS AT THIS BPT
PUSHJ P,DEPMEM ;[633] PUT USER INSTRUCTION BACK
JRST REMOV5 ;[633] CAN'T, COMPLAIN
MOVX T,BP$INS!BP$ERM ;[633] BREAKPOINT-INSTALLED, ERROR FLAGS
ANDCAM T,BPT$B+B$FLG(S);[633] NOTE BREAKPOINT SUCCESSFULLY REMOVED
REMOV7:
IFN FTMON,<CHKOUT> ;[612] RELEASE ONE LOCK.
REMOV8: SUBI S,B$SIZ ;[633][421] ADVANCE TO NEXT BREAKPOINT
INS 20/193 ;16C213
REMOV4: SMERS <BREAKPOINT INSTRUCTION TRASHED OR MOVED> ;[633]
REMOV5: PUSHJ P,REMOER ;[633] TELL USER CAN'T REMOVE BPT
JRST REMOV7 ;[633] TRY FOR THE REST
;STILL IFE FTFILE
INS 25/193 ;16C214
MOVX TT,BP$ERM ;[633] MESSAGE-TYPED FLAG
TDNE TT,BPT$B+B$FLG(S) ;[633] ALREADY TOLD USER OF THIS PROBLEM?
POPJ P, ;[633] YES, ONCE IS ENOUGH
IORM TT,BPT$B+B$FLG(S) ;[633] NO, REMEMBER WE'RE ABOUT TO
INS 18/199 ;16C215
TLNN T,377777 ;[667] DDAF VALID ONLY ON PURE IFIW
DEL 1/200 ;16C216
REP 11/200 ;16C217
WIT
REP 6/202 ;16C218
JRST INOUT1 ;NOPE
JRST INOUT1 ;NOPE
WIT
JRST INOUTB ;[632] NOPE
JRST INOUTB ;[632] NOPE
REP 12/202 ;16C219
INOUTB: TRO F,OKAF ;[525] NO "#" AFTER OPERATOR SYMBOL
INOUT1: MOVSI T,777000 ;JUST THE OPCODE FIELD
AND T,LWT ;(IN CASE KS-10 STYLE I/O INSTRUCTION)
TLNN T,077000 ;OPCODE 700?
JRST INOUT3 ;FLICK IT IN (DON'T TYPE APRID 14, ETC.)
WIT
INOUTB: MOVSI T,777000 ;[632] JUST THE OPCODE FIELD
AND T,LWT ;[632] (IN CASE KS-10 STYLE I/O INSTRUCTION)
LDB R,[POINT 6,T,8] ;[632] EXTRACT MOST OF "DEVICE" FIELD
CAIL R,04 ;[632] IF 'LESS' THAN "UMOVE"
SKPKS ;[632] OR NOT KS-STYLE IO DECODE
JRST INOUT3 ;[632] THEN NO "NORMAL" OPCODE TYPEOUT
TRO F,OKAF ;[632] NO "#" AFTER OPERATOR SYMBOL
REP 13/203 ;16C220
SKPNS0 ;IN SECTION 0?
WIT
TLNN R,-1 ;[645] GET HERE FOR SECTION 0?
REP 6/209 ;16C221
MOVEI W2,<W1>B23!44B29;[627] GET Y(W1) AND P(44) OF BYTE POINTER
IOR W2,BYSS ;[627] PUT S TO THE RIGHT OF P
ROT W2,30 ;[627] ROTATE TO GET TRUE BYTE POINTER
TEXTNV: ILDB T,W2 ;[626] GET NEXT CHARACTER
TRNE W2,^-W1 ;[626] PAST END OF WORD?
POPJ P, ;[626] YES, ALL DONE
ANDI T,177 ;[621] TOUT ONLY WANTS 7 BITS
PUSHJ P,TOUT ;[621] OUTPUT ONE ASCII CHARACTER
JRST TEXTNV ;[626] LOOP FOR NEXT CHARACTER
WIT
MOVN W2,BYSS ;[650] GET RIGHT-SHIFT AMOUNT
LSH T,(W2) ;[650] DROP LOW BYTE
JUMPN T,TEXTN1 ;[650] SKIP THIS IF NOT RIGHT-JUSTIFIED
ROT W1,(W2) ;[650] LEFT-JUSTIFY ARGUMENT
TEXTN1: LSHC T,@BYSS ;[650] FETCH NEXT BYTE TO TYPE
ANDI T,177 ;[621] TOUT ONLY WANTS 7 BITS
PUSHJ P,TOUT ;[621] OUTPUT ONE ASCII CHARACTER
JUMPN W1,TEXTN1 ;[650] LOOP IF MORE IN WORD TO TYPE
POPJ P, ;[650] RETURN WHEN DONE
REP 19/209 ;16C222
TEXT: TDNE W1,[-1,,777600] ;LEFT JUSTIFIED UNLESS ONLY 1 CHR.
SKIPA ;SKIP IF MORE THAN ONE ASCII CHR.
WIT
TEXT: TDNN W1,[-1,,777600] ;[650] LEFT JUSTIFIED UNLESS ONLY 1 CHR.
DEL 1/210 ;16C223
REP 37/210 ;16C224
IFE FTFILE,<
DS $I,SAVPI,ENDPI
WIT
DS $I,SAVPI,ENDPI
IFN FTPAGM,<
DS $0U,MAPPG,MAPPG+1
DS $3U,FAKEAC,FAKEAC+1
DS $4U,ACWRD,ACWRD+1
DS $5U,FAKEAD,FAKEAD+1
DS $6U,SPTWRD,SPTWRD+1
DS $7U,CSTWRD,CSTWRD+1
DS $8U,UBASE,UBASE+1
DS $9U,UPROT,UPROT+1
DS $10U,KIPAG,KIPAG+1
DS $11U,KLPAG,KLPAG+1
DS $20U,KAFLG,KAFLG+1
DS $21U,KIFLG,KIFLG+1
DS $22U,KLFLG,KLFLG+1
DS $23U,KSFLG,KSFLG+1
> ;END IFN FTPAGM
IFE FTFILE,<
REP 21/211 ;16C225
;FIRST THE CASE FOR MONITORS.
IFN FTEXEC!FTMON,< ;[501] ALL MONITORS
IFN FTEXEC&<^-FTEX20>,< ;[567] EDDT, NOT KDDT
SKPEXC ;[533] IF USER MODE,
JRST SYMCH0 ;[533] THEN DO LIKE USER DDT
WIT
;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE
;FIRST THE CASE FOR MONITORS.
IFN FTEXEC!FTMON,< ;[501] ALL MONITORS
SYMCX0:
IFN FTDEC10,< ;[634] TOPS-10
SKPUSR ;[634] IF USER MODE,
SKIPN HSBLK ;[634] AND NOT HIDDING SYMBOLS
JRST SYMCU0 ;[634] LOOK FOR SYMBOLS NORMALLY
;[634] EXEC HIDDEN SYMBOLS, USE AS SPECIFIED
;[634] IN S$SUB ENTRIES (SEE TTYRE7)
> ;[634] END IFN FTDEC10
IFN FTDEC20,< ;[634]
IFN FTEXEC&<^-FTEX20>,< ;[567] EDDT, NOT KDDT
SKPEXC ;[533] IF USER MODE,
JRST SYMCU0 ;[533] THEN DO LIKE USER DDT
REP 30/211 ;16C226
IFN FTEX20,<
WIT
IFN FTEX20,<
REP 34/211 ;16C227
> ;END IFN FTEX20
SKIPE R,@R ;[550] MONITOR MIGHT HAVE A PDV
JRST SYMVEC ;[533] IT DOES, USE IT
WIT
> ;END IFN FTEX20
SKIPE R,@R ;[550] MONITOR MIGHT HAVE A PDV
JRST SYMCP0 ;[533] IT DOES, USE IT
REP 40/211 ;16C228
JRST SYMCH0 ;[575] DO LIKE USER DDT
> ;END IFN FTEX20
WIT
JRST SYMCU0 ;[575] DO LIKE USER DDT
> ;END IFN FTEX20
> ;[634] END IFN FTDEC20
REP 45/211 ;16C229
XMOVEI W2,SYMP ;[472] BLOCK TO SET UP
WIT
MOVEI W2,SYMP ;[472] BLOCK TO SET UP
REP 50/211 ;16C230
XMOVEI W2,USYMP ;[472] UNDEF BLOCK
PUSHJ P,IOWBLK ;[472] GO INIT IT
SETZB T,R ;[472] NO HISEG POINTER POSSIBLE
XMOVEI W2,HSYMP ;[472] ADR OF HISEG BLOCK
PUSHJ P,IOWBLK ;[472] SET IT UP
JRST SYMCX4 ;[472] CHECK OUT THE POINTERS
> ;END IFN FTEXEC!FTMON
;HERE FOR THE NON-MONITOR CASES OF SYMCHK
WIT
MOVEI W2,USYMP ;[472] UNDEF BLOCK
PUSHJ P,IOWBLK ;[472] GO INIT IT
JRST SYMCP7 ;[634] BLAST HISEG POINTERS
> ;END IFN FTEXEC!FTMON
;HERE FOR THE USER MODES OF SYMCHK
REP 5/212 ;16C231
IFE FTMON,< ;[533] NEVER DO THIS IN MDDT
SYMCH0:
IFN FTUD20,< ;[533] USER-20 CAN
WIT
IFE FTMON,< ;[533] NEVER DO THIS IN MDDT
SYMCU0:
IFN FTUD20,< ;[533] USER-20 CAN
REP 16/212 ;16C232
JRST SYMCH2 ;[602] NO, CHECK $5M
WIT
JRST SYMCU2 ;[602] NO, CHECK $5M
REP 20/212 ;16C233
JRST SYMCH2 ;[602] NO, TRY SOMETHING ELSE
HRRI R,770001 ;[504] YES, LOOK AT MAGIC LOCATION
PUSHJ P,FETCH ;[504] GO GET IT
JRST SYMCH2 ;[602] CAN'T, CHECK $5M
HRR R,T ;[504] LOOK WHERE MAGIC LOC POINTS TO
PUSHJ P,FETCH ;[504] GET STUFFED POINTER IF ANY
JRST SYMCH2 ;[602] CAN'T, CHECK $5M
JUMPGE T,SYMCH2 ;[602] IOWD STUFFED?
XMOVEI W2,SYMP ;[504] IOWD STUFFED, SET UP EVERYTHING
WIT
JRST SYMCU2 ;[602] NO, TRY SOMETHING ELSE
HRRI R,770001 ;[504] YES, LOOK AT MAGIC LOCATION
PUSHJ P,FETCH ;[504] GO GET IT
JRST SYMCU2 ;[602] CAN'T, CHECK $5M
HRR R,T ;[504] LOOK WHERE MAGIC LOC POINTS TO
PUSHJ P,FETCH ;[504] GET STUFFED POINTER IF ANY
JRST SYMCU2 ;[602] CAN'T, CHECK $5M
JUMPGE T,SYMCU2 ;[602] IOWD STUFFED?
MOVEI W2,SYMP ;[504] IOWD STUFFED, SET UP EVERYTHING
REP 32/212 ;16C234
JRST SYMCH2 ;[602] NO, TRY $5M
HRR R,T ;[504] CHAIN TO REAL PLACE
PUSHJ P,FETCH ;[504] GET REAL WORD
JRST SYMCH2 ;[602] NO SUCH LUCK
XMOVEI W2,USYMP ;[504] MADE IT! SET UP UNDEF BLOCK
PUSHJ P,IOWBLK ;[504] AS IF IT WERE JOBDAT
SETZM SYTLOC ;[602] SHOW THAT WE HAVE "STUFFED" POINTERS
JRST SYMCX3 ;[504] NOW FOR HISEG POINTER
> ;END IFN FTUD20
SYMCH2: SKIPE SYTLOC ;[602] $5M SET?
JRST SYMC5M ;[602] YES, USE IT
JRST PDVSRH ;[602] NO, TRY PDVS
WIT
JRST SYMCU2 ;[602] NO, TRY $5M
HRR R,T ;[504] CHAIN TO REAL PLACE
PUSHJ P,FETCH ;[504] GET REAL WORD
JRST SYMCU2 ;[602] NO SUCH LUCK
MOVEI W2,USYMP ;[504] MADE IT! SET UP UNDEF BLOCK
PUSHJ P,IOWBLK ;[504] AS IF IT WERE JOBDAT
SETZM SYTLOC ;[602] SHOW THAT WE HAVE "STUFFED" POINTERS
JRST SYMCU7 ;[504] NOW FOR HISEG POINTER
> ;END IFN FTUD20
SYMCU2: SKIPE R,SYTLOC ;[602] $5M SET?
JRST [JUMPG R,SYMCP0 ;[634] IF POSITIVE, PDV ADDRESS
HRLZS R ;[634] ELSE -1,,JOBDAT-SECTION
JRST SYMCU4] ;[634] SETUP FROM .JBSYM/ETC.
IFN FTDEC20,<JRST PDVSRH> ;[602] NO, TRY PDVS
; -10 FALLS THRU TO SYMCU3, TO CHECK JOBDAT
REP 6/213 ;16C235
IFE FTFILE,< ;[461] FIRST THE NON-FILDDT CASE
SYMCX1:
IFN FTUD20,< ;[533] -20 HAS ENTRY VECTORS
SKIPL R,SECUDD ;[504] GET STUB'S SECTION IF ANY
JRST SYMCX2 ;[504] STUB EXISTS, USE IT
PUSHJ P,GEVECS ;[504] GET ENTRY SECTION IN T
SETZ T, ;[615] IF THERE'S ANYTHING IT'S IN SECT. 0
> ;END IFN FTUD20
IFE FTUD20,<
MOVE T,SECDDT> ;[533] OTHERWISE DEFAULT TO DDT'S SECTION
HLLZ R,T ;[533] WANT SECTION IN R
SYMCX2: SKPNS0 ;[434] IN SECTION ZERO?
SETZ R, ;[504] SET UP FOR SECTION ZERO
> ;END IFE FTFILE
IFN FTFILE,< ;[461] NOW THE FILDDT CASE
SYMCX1: HLLZ R,EVADR ;[504] DEFAULT IS ENTRY VECTOR (OR ZERO)
SYMCX2:
> ;END IFN FTFILE
HLROM R,SYTLOC ;[461] SET PROPER $5M
HRRI R,.JBSYM ;[461] SET UP POINTERS FROM THAT SECTION
PUSHJ P,FETCH ;[461] GET THE DEFINED POINTER
SETZ T, ;[461] THERE AIN'T ONE
XMOVEI W2,SYMP ;[461] ADR OF DEFINED BLOCK
PUSHJ P,IOWBLK ;[461] SET UP SYMBOL BLOCK
HRRI R,.JBUSY ;[461] SAME FOR UNDEFINED POINTER
PUSHJ P,FETCH ;[461] GET IT
SETZ T, ;[461] MAYBE NOT
XMOVEI W2,USYMP ;[461] BLOCK TO SET UP
PUSHJ P,IOWBLK ;[461] DO IT
SYMCX3: MOVEI R,.JBHSM ;[475] TRY FOR HISEG TABLE
PUSHJ P,HFETCH ;[461] IS IT THERE?
SETZ T, ;[461] NO
XMOVEI W2,HSYMP ;[461] HISEG TABLE BLOCK
PUSHJ P,IOWBLK ;[461] SET IT UP
> ;END IFE FTMON ;[501]
;FALL THROUGH TO VALIDATE POINTERS
WIT
SYMCU3:
IFE FTFILE,< ;FIRST THE NON-FILDDT CASE
IFN FTDEC10,<
PUSHJ P,GEVECS ;[635] GET ENTRY VECTOR SECTION
SETZ T, ;[635] SECTION ZERO IF NO VECTOR
> ;END IFN FTDEC10
IFN FTDEC20,< ;[630]
IFN FTUD20,< ;[533] -20 HAS ENTRY VECTORS
SKIPL R,SECUDD ;[504] GET STUB'S SECTION IF ANY
JRST SYMCU4 ;[504] STUB EXISTS, USE IT
PUSHJ P,GEVECS ;[504] GET ENTRY SECTION IN T
SETZ T, ;[615] IF THERE'S ANYTHING IT'S IN SECT. 0
> ;END IFN FTUD20
IFE FTUD20,<MOVE T,SECDDT>;[533] OTHERWISE DEFAULT TO DDT'S SECTION
> ;END IFN FTDEC20
HLLZ R,T ;[533] WANT SECTION IN R
SYMCU4: SKPNS0 ;[434] IN SECTION ZERO?
SETZ R, ;[504] SET UP FOR SECTION ZERO
> ;END IFE FTFILE
IFN FTFILE,< ;NOW THE FILDDT CASE
IFN FTDEC10,< ;[630] -10 ALWAYS IN SECTION 0
SETZ R, ;[630]
> ;END IFN FTDEC10
IFN FTDEC20,< ;[630] -20
HLLZ R,EVADR ;[504] DEFAULT IS ENTRY VECTOR (OR ZERO)
> ;END IFN FTDEC20
SYMCU4:
> ;END IFN FTFILE
;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE
;STILL IFE FTMON
SYMCU5: HLROM R,SYTLOC ;SET PROPER $5M
HRRI R,.JBSYM ;SET UP POINTERS FROM THAT SECTION
PUSHJ P,FETCH ;GET THE DEFINED POINTER
SETZ T, ;THERE AIN'T ONE
MOVEI W2,SYMP ;PRIMARY SYMBOL POINTERS BLOCK ADDRESS
JUMPG T,[PUSHJ P,PDVBL4 ;[634] SET POINTERS FROM SYMBOL VECTOR
JRST SYMCU7] ;[634] CHECK FOR HISEG SYMBOL TABLE
PUSHJ P,IOWBLK ;SET UP SYMBOL BLOCK
HRRI R,.JBUSY ;SAME FOR UNDEFINED POINTER
PUSHJ P,FETCH ;GET IT
SETZ T, ;MAYBE NOT
MOVEI W2,USYMP ;BLOCK TO SET UP
PUSHJ P,IOWBLK ;DO IT
SYMCU7: MOVEI R,.JBHSM ;[475] TRY FOR HISEG TABLE
PUSHJ P,HFETCH ;IS IT THERE?
SETZ T, ;NO
MOVEI W2,HSYMP ;HISEG TABLE BLOCK
JUMPG T,[PUSHJ P,PDVBL4 ;[634] SET POINTERS FROM SYMBOL VECTOR
JRST .+2] ;[634] CONTINUE ONWARDS
PUSHJ P,IOWBLK ;SET IT UP
> ;END IFE FTMON ;[501]
JRST SYMCV0 ;[634] GO VERIFY THE SYMBOL TABLE POINTERS
;HERE WITH PDV ADDRESS IN R
SYMCP0: MOVEI W2,SYMP ;[634] SYMBOL TABLE POINTERS BLOCK
PUSHJ P,PDVBLK ;[634] EXTRACT THE SYMBOL TABLE VECTOR
SYMCP7: MOVEI W2,HSYMP ;[634] HISEG TABLE BLOCK
SETZ R, ;[634] ASSUME NONE
PUSHJ P,VECBLK ;[634] CLEAR HISEG POINTERS
JRST SYMCV0 ;[634] GO VERIFY THE SYMBOL TABLE POINTERS
REP 3/214 ;16C236
;FALL IN FROM ABOVE
SYMCX4:
IFN FTSCSH,< ;[432] IF SYMBOL CACHE ENABLED,
PUSHJ P,.CLCSH ;[432] WE JUST INVALIDATED IT.
> ;END IFN FTSCSH
XMOVEI T,SYMP ;[461] GET MAIN SYMBOL PTR
PUSHJ P,CHKSYP ;[461] CHECK IT OUT
SETZM SYMP+S$ADR ;[461] NO GOOD, POINT TO ZERO
XMOVEI T,HSYMP ;[461] HIGH SEG SYMBOL POINTER
PUSHJ P,CHKSYP ;[461] CHECK OUT THE HIGH SEG PTR
SETZM HSYMP+S$ADR ;[461] NO GOOD
WIT
SYMCV0:
IFE FTFILE,<IFN FTDEC10,<PUSHJ P,SYMNZS>> ;[634] CHECK FOR NZS SYMBOL TABLE
IFN FTSCSH,<PUSHJ P,.CLCSH> ;[432] WE JUST INVALIDATED IT.
MOVEI T,SYMP ;GET MAIN SYMBOL PTR
PUSHJ P,CHKSYP ;CHECK IT OUT
SETZM SYMP+S$ADR ;NO GOOD, POINT TO ZERO
MOVEI T,HSYMP ;HIGH SEG SYMBOL POINTER
PUSHJ P,CHKSYP ;CHECK OUT THE HIGH SEG PTR
SETZM HSYMP+S$ADR ;NO GOOD
REP 18/214 ;16C237
SKIPE T,SYMP+S$ADR ;[461] GOT A GOOD LOSEG POINTER?
SKIPN S,HSYMP+S$ADR ;[461] AND A GOOD HISEG POINTER?
JRST SYMCH1 ;[461] ONLY ONE, JUST USE IT
ADD T,SYMP+S$LEN ;[461] FORM END OF LOSEG TABLE
ADD S,HSYMP+S$LEN ;[461] FORM END OF HISEG TABLE
CAMN S,T ;[461] POINTING TO SAME TABLES?
SETZM HSYMP+S$ADR ;[461] YES, IGNORE HISEG POINTER
WIT
SKIPE T,SYMP+S$ADR ;GOT A GOOD LOSEG POINTER?
SKIPN S,HSYMP+S$ADR ;AND A GOOD HISEG POINTER?
JRST SYMCV2 ;ONLY ONE, JUST USE IT
ADD T,SYMP+S$LEN ;FORM END OF LOSEG TABLE
ADD S,HSYMP+S$LEN ;FORM END OF HISEG TABLE
CAMN S,T ;POINTING TO SAME TABLES?
SETZM HSYMP+S$ADR ;YES, IGNORE HISEG POINTER
REP 28/214 ;16C238
SYMCH1: XMOVEI T,USYMP ;[461] GET UNDEFINED BLOCK
PUSHJ P,CHKSYP ;[461] CHECK IT OUT
CAIA ;[461] NO GOOD, FIX IT UP
JRST SYMCH4 ;[461] POINTER IS OK
SKIPN R,SYMP+S$ADR ;[461] GOT A VALID SYMBOL TABLE?
MOVE R,HSYMP+S$ADR ;[461] NO, USE HISEG PTR IF ANY TO FIX UNDEF PTR
MOVEM R,USYMP+S$ADR ;[461] STORE FOR OTHERS
SETZM USYMP+S$LEN ;[461] WITH LENGTH ZERO
WIT
SYMCV2: MOVEI T,USYMP ;GET UNDEFINED BLOCK
PUSHJ P,CHKSYP ;CHECK IT OUT
CAIA ;NO GOOD, FIX IT UP
JRST SYMCV4 ;POINTER IS OK
SKIPN R,SYMP+S$ADR ;GOT A VALID SYMBOL TABLE?
MOVE R,HSYMP+S$ADR ;NO, USE HISEG PTR IF ANY TO FIX UNDEF PTR
MOVEM R,USYMP+S$ADR ;STORE FOR OTHERS
SETZM USYMP+S$LEN ;WITH LENGTH ZERO
REP 3/215 ;16C239
SYMCH4: SKIPN S,PRGM ;GET PTR, ONE THERE?
JRST SYMCH8 ;NO, PROCEED
JUMPGE S,SYMCH6 ;PROCEED IF S POINTS TO LOWSEG
MOVEI R,.JBHNM ;PRGM POINTS TO HISEG, GET HISEG NAME
PUSHJ P,HFETCH ; . . .
JRST SYMCH8 ;NO GOOD, CLEAR PRGM
CAME T,SEGNAM ;SAME HISEG?
JRST SYMCH8 ;NO, CLEAR PRGM
XMOVEI T,HSYMP ;[461] YES, GET THE PTR THAT PRGM POINTS INTO
CAIA ;[461]
SYMCH6: XMOVEI T,SYMP ;[461] GET THE PTR THAT PRGM POINTS INTO
SKIPN S$ADR(T) ;[461] IS THERE A TABLE?
JRST SYMCH8 ;[461] NO, PRGM CAN'T BE VALID
TXZ S,1B0 ;CONVERT S TO OFFSET INTO TABLE
CAML S,S$LEN(T) ;[461] PRGM INVALID UNLESS S IS WITHIN THE TABLE
JRST SYMCH8 ;[461] INVALID
WIT
SYMCV4: SKIPN S,PRGM ;GET PTR, ONE THERE?
JRST SYMCV8 ;NO, PROCEED
JUMPGE S,SYMCV6 ;PROCEED IF S POINTS TO LOWSEG
MOVEI R,.JBHNM ;PRGM POINTS TO HISEG, GET HISEG NAME
PUSHJ P,HFETCH ; . . .
JRST SYMCV8 ;NO GOOD, CLEAR PRGM
CAME T,SEGNAM ;SAME HISEG?
JRST SYMCV8 ;NO, CLEAR PRGM
MOVEI T,HSYMP ;YES, GET THE PTR THAT PRGM POINTS INTO
CAIA ;[461]
SYMCV6: MOVEI T,SYMP ;GET THE PTR THAT PRGM POINTS INTO
SKIPN S$ADR(T) ;IS THERE A TABLE?
JRST SYMCV8 ;NO, PRGM CAN'T BE VALID
TXZ S,1B0 ;CONVERT S TO OFFSET INTO TABLE
CAML S,S$LEN(T) ;PRGM INVALID UNLESS S IS WITHIN THE TABLE
JRST SYMCV8 ;INVALID
REP 22/215 ;16C240
SOS R,S ;[461] POINT TO FIRST WORD OF PAIR
ADD R,S$ADR(T) ;[461] GET ADDRESS OF SYMBOL
PUSHJ P,FETCH ;[461] GRAB SYMBOL
JRST SYMCH8 ;[461] OOPS
TXNE T,PNAME ;[461] INVALID UNLESS A MODULE NAME
SYMCH8: SETZM PRGM ;PRGM INVALID IN SOME WAY
SKIPN SYMP+S$ADR ;[461] DO WE HAVE A SYMBOL TABLE?
SETZM SYMP+S$LEN ;[461] NO, DON'T CONFUSE ANYONE
SKIPN HSYMP+S$ADR ;[461] HOW ABOUT HISEG TABLE?
SETZM HSYMP+S$LEN ;[461] SAME DEAL THERE
WIT
MOVE R,PRGM ;[662] FETCH PROG SYMBOL AGAIN
SUBI R,1 ;[662] POINT TO FIRST WORD OF PAIR
PUSHJ P,FETSYM ;[662] GRAB SYMBOL
JRST SYMCV8 ;OOPS
TXNE T,PNAME ;INVALID UNLESS A MODULE NAME
SYMCV8: SETZM PRGM ;PRGM INVALID IN SOME WAY
SKIPN SYMP+S$ADR ;DO WE HAVE A SYMBOL TABLE?
SETZM SYMP+S$LEN ;NO, DON'T CONFUSE ANYONE
SKIPN HSYMP+S$ADR ;HOW ABOUT HISEG TABLE?
SETZM HSYMP+S$LEN ;SAME DEAL THERE
REP 36/215 ;16C241
POPJ P, ;RETURN FROM SYMCHK
WIT
IFE FTFILE,<
IFN FTDEC10,<
IFN FTEXEC,<PUSHJ P,NORSPC> ;[662] RETURN IN CORRECT ADDRESS SPACE
XMOVEI TT,-1 ;[654] GET CORRECT RETURN SECTION
HLLM TT,(P) ;[654] JUST IN CASE WE LEFT S0
> ;END FTDEC10
> ;END NOT FTFILE
POPJ P, ;RETURN FROM SYMCHK
;HERE TO WORRY ABOUT THE SYMBOL TABLE IN A NZS SECTION WHILE DDT IS
;STUCK IN SECTION ZERO.
;
;CURRENTLY, THIS CHECK SEEMS NECESSARY ONLY FOR THE -10 . . .
IFE FTFILE,< ;FILDDT HAS ITS OWN WAY OF DOING THINGS
IFN FTDEC10,<
SYMNZS: SKPS0 ;RUNNING NZS ALREADY?
POPJ P, ;YES, THEN NOT A PROBLEM BY DEFINITION
;DDT IN SECTION 0, SEE WHERE THE ASSORTED SYMBOL TABLES ARE . . .
MOVE R,SYMP+S$ADR ;STANDARD DEFINED SYMBOL TABLE (IF ANY)
IOR R,USYMP+S$ADR ;PLUS STANDARD UNDEFINED SYMBOL TABLE (IF ANY)
IOR R,HSYMP+S$ADR ;AND THE HISEG SYMBOL TABLE (IF ANY)
TLNN R,-1 ;ANY SYMBOL TABLES IN NZS SPACE?
POPJ P, ;NO, ALL SET
;MUST FINAGLE DDT INTO NZS SPACE IN ORDER TO ACCESS THE SYMBOL TABLE!
;FIRST PASS, GO FOR SECTION 1.
MOVSI R,1 ;SECTION 1
PUSHJ P,RWEMAP ;ARE WE MAPPED INTO SECTION 1?
CAIA ;NO, BE A MITE SNEAKY
JRST SYMNZ5 ;YES, GO FOR SECTION 1
;TRY FOR SYMBOL TABLE SECTION(S)
MOVE R,SYMP+S$ADR ;STANDARD SYMBOL TABLE
TLNE R,-1 ;IS THIS ONE NZS?
PUSHJ P,RWEMAP ;YES, ARE WE MAPPED INTO ITS SECTION?
CAIA ;NO TO EITHER, KEEP TRYING
JRST SYMNZ5 ;YES! JUMP TO THAT SECTION
MOVE R,HSYMP+S$ADR ;TRY THE HISEG TABLE SECTION
TLNE R,-1 ;IS THIS ONE NZS?
PUSHJ P,RWEMAP ;YES, ARE WE MAPPED INTO ITS SECTION?
CAIA ;NO TO EITHER, KEEP TRYING
JRST SYMNZ5 ;YES! JUMP TO HISEG SYMBOL SECTION
MOVE R,USYMP+S$ADR ;TRY UNDEFINED SYMBOL TABLE SECTION
TLNE R,-1 ;IS THIS ONE NZS?
PUSHJ P,RWEMAP ;YES, ARE WE MAPPED INTO ITS SECTION?
CAIA ;NO TO EITHER, BE SNEAKIER
JRST SYMNZ5 ;YES! JUMP TO UNDEFINED SYMBOL SECTION
;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE
;LAST DITCH EFFORT, MAP SECTION 0 INTO SECTION 1
IFN FTEXEC,< ;EXEC MODE DOESN'T SUPPORT PAGE.'S
SKPUSR ;USER OR EXEC MODE?
JRST SYMNZ9 ;EXEC MODE, LOSES
> ;END IFN FTEXEC
MOVEI TT,1 ;SECTION 1
PUSHJ P,CHKSEC ;SEE WHAT SECTION 1'S STATE IS
TXNE TT,PG$SXI ;IF SECTION 1 ALREADY EXISTS
JRST SYMNZ9 ;THEN JUST GIVE IT UP (WE TRIED!)
MOVEI TT1,1 ;WANT TO MAP ONE SECTION
MOVE TT2,[PA.GMS!<0,,1>] ;NAMELY SECTION 0 INTO SECTION 1
MOVE T,[.PAGSC,,TT1] ;PAGE. ARG POINTER TO
PAGE. T, ;MAP SECTION 0 INTO SECTION 1
JRST SYMNZ8 ;OH WELL, TIME TO GIVE UP
MOVEI W1,[ASCIZ\
[DDT - Section 0 mapped into section 1 for NZS symbol table access]
\] ;INFORMATIVE TEXT
PUSHJ P,TSTRG ;TO TELL THE USER WHAT HAPPENED
MOVSI R,1 ;SECTION TO WHICH TO JUMP
;HERE TO SWITCH SECTIONS FOR NZS SYMBOL TABLE ACCESS
SYMNZ5: JSP TT,SECCHG ;GO CHANGE SECTIONS (UPDATING PDL)
HLLM TT,(P) ;[654] FLAGS BEFORE FIRST PUSHJ ARE SUSPECT
POPJ P, ;DONE ALL WE CAN HERE . . .
;HERE WHEN CAN'T SWAP SECTIONS, CAN'T MAP SECTION 0 INTO SECTION 1
SYMNZ8: MOVEI W1,[ASCIZ\
[DDT - Can't map section 0 into section 1 for NZS symbol tables]
\] ;ERROR MESSAGE
CAIA ;TELL USER OF WOES
;HERE WHEN GIVING UP ON NZS SYMBOLS
SYMNZ9: MOVEI W1,[ASCIZ\
[DDT - Can't access NZS symbol table(s) from section 0]
\] ;ERROR MESSAGE
PUSHJ P,TSTRG ;INFORM USER OF PROBLEMS
MOVSI R,-1 ;SECTION BITS MASK
TDNE R,SYMP+S$ADR ;STANDARD SYMBOL TABLE IN NZS?
SETZM SYMP+S$ADR ;YES, PUNT IT
TDNE R,USYMP+S$ADR ;UNDEFINED SYMBOL TABLE IN NZS?
SETZM USYMP+S$ADR ;YES, PUNT IT
TDNE R,HSYMP+S$ADR ;HISEG SYMBOL TABLE IN NZS?
SETZM HSYMP+S$ADR ;YES, PUNT IT
POPJ P, ;LIMP ALONG AS BEST WE CAN
> ;END IFN FTDEC10
> ;END IFE FTFILE
INS 44/215 ;16C242
IFN FTDEC10,<
GEVECS: XMOVEI T,1(P) ;[635] BLOCK POINTER
SETZM (T) ;[635] FUNCTION IS READ
ENTVC. T, ;[635] GET ENTRY VECTOR DATA
POPJ P, ;[635] NONE TO BE HAD
SKIPN 2(P) ;[635] IF THERE IS NO DATA,
POPJ P, ;[635] INDICATE THAT
HLLZ T,3(P) ;[635] RETURN THE SECTION NUMBER
JRST CPOPJ1 ;[635] INDICATE SUCCESS
> ;END IFN FTDEC10
REP 52/215 ;16C243
;ROUTINES TO SET UP SYMBOL TABLE BLOCK
WIT
REP 13/216 ;16C244
IOWBLK: PUSHJ P,SAVRST ;[461] AS ADVERTISED
IFN FTFILE,< ;[461] FILDDT WANTS SOME ORIGINAL INFO
MOVEM T,S$OPT(W2)> ;[461] SAVE ORIGINAL IOWD
HLRE S,T ;[461] GET NEG LENGTH
MOVNM S,S$LEN(W2) ;[461] STORE POS LENGTH
WIT
IOWBLK: PUSHJ P,SAVRST ;AS ADVERTISED
IFN FTFILE,<MOVEM T,S$OPT(W2)>;SAVE ORIGINAL IOWD
HLRE S,T ;GET NEG LENGTH
MOVNM S,S$LEN(W2) ;STORE POS LENGTH
REP 24/216 ;16C245
IOWBL1: MOVEM T,S$ADR(W2) ;[461] STORE TABLE ADDRESS
MOVEM R,S$SUB(W2) ;[470] STORE ADDRESS OF POINTER
POPJ P, ;[461] RETURN
;PDVBLK -- SET UP BLOCK BASED ON PDV SYMBOL VECTOR SUBTABLE
; W2/ ADDR OF SYMBOL BLOCK
; R/ SUBTABLE ADDRESS
; PUSHJ P,PDVBLK
;RETURNS: +1/ SOMETHING DIED
; +2/ GOOD
;
;PRESERVES R,S,T,W2
PDVBLK: PUSHJ P,SAVRST ;[461] AS ADVERTISED
MOVEM R,S$SUB(W2) ;[461] SAVE SUBTABLE ADDRESS
JUMPE R,[SETZM S$ADR(W2) ;[502] IF NO SUBTABLE, ZAP SOME
SETZM S$LEN(W2) ;[502] LOCATIONS
IFN FTFILE,<
SETZM S$OLN(W2) ;[502]
SETZM S$OPT(W2) ;[502]
> ;END IFN FTFILE
JRST CPOPJ1] ;[502] ALWAYS "SUCCEEDS"
; ADDI R,.STDAT ;[461] WANT LENGTH WORD
PUSHJ P,FETCH ;[461] GRAB IT
POPJ P, ;[461] CAN'T
IFN FTFILE,< ;[461] FILDDT WANTS ORIGINAL INFO
MOVEM T,S$OLN(W2)> ;[461] SAVE ORIGINAL TYPE/LENGTH WORD
ANDX T,ST%LEN ;[461] GET LENGTH
MOVEM T,S$LEN(W2) ;[461] SAVE IT AWAY
ADDI R,.STPTR-.STDAT ;[461] POINT TO POINTER
PUSHJ P,FETCH ;[461] GET ADDRESS WORD
POPJ P, ;[461] SORRY
IFN FTFILE,< ;[461] FILDDT WANTS ORIGINAL INFO
MOVEM T,S$OPT(W2)> ;[461] SAVE ORIGINAL POINTER
TXNE T,IFIW ;[544] IS POINTER LOCAL?
HLL T,R ;[544] YES, MAKE A REAL ADDR
MOVEM T,S$ADR(W2) ;[461] SAVE POINTER
JRST CPOPJ1 ;[461] RETURN GOOD
;HERE FOR DEALING WITH PDV'S
;HERE TO SEE WHAT KIND OF $5M WE'RE DEALING WITH
IFE FTMON,< ;[533] MDDT NEVER GETS HERE
SYMC5M: SKIPG R,SYTLOC ;[461] PDVA?
JRST [ HRLZS R ;[461] NO, JOBDAT SECTION
JRST SYMCX2] ;[461] GO SET IT UP
> ;END IFE FTMON
;HERE WITH *THE* PDVA IN R, TO CHECK OUT THE SYMBOL TABLE VECTOR
;FLAGS IN W1 FOR SYMBOL TABLES SEEN
R5DF==1B0 ;[461] RADIX-50 DEFINED TABLE FLAG
R5UF==1B1 ;[461] RADIX-50 UNDEFINED TABLE FLAG
SYMVEC: MOVEM R,SYTLOC ;[461] SAVE PDVA
SETZ W1, ;[461] CLEAR FLAGS
; ADDI R,.PVCNT ;[461] GET PDV LENGTH
PUSHJ P,FETCH ;[461] INTO T
JRST SYMVDN ;[461] CAN'T -- DONE EARLY
CAIGE T,.PVLVR ;[461] DOES IT HAVE A LINK VERSION?
JRST SYMVE2 ;[461] NO, ASSUME GOOD ENOUGH
ADDI R,.PVLVR-.PVCNT ;[461] POINT AT VERSION WORD
PUSHJ P,FETCH ;[461] GET IT
JRST SYMVE1 ;[461] IGNORE ERROR, ASSUME OK
LDB S,[POINT 9,T,11] ;[461] GET MAJOR VERSION
CAIGE S,6 ;[461] BUILT BY LINK 6.0 OR LATER?
JRST SYMVDN ;[461] NO, .PVSYM NO GOOD
SYMVE1: SUBI R,.PVLVR-.PVSYM ;[461] DROP BACK TO SYMBOL VECTOR WORD
JRST SYMVE3 ;[461] AND CONTINUE
SYMVE2: CAIGE T,.PVSYM ;[461] DOES IT HAVE A .PVSYM?
JRST SYMVDN ;[461] NO, ZAP POINTER
ADDI R,.PVSYM-.PVCNT ;[461] GET SYMBOL VECTOR WORD
SYMVE3: PUSHJ P,FETCH ;[461] INTO T
JRST SYMVDN ;[461] CAN'T
TXNE T,IFIW ;[544] IS IT LOCAL?
HLL T,R ;[544] YES, SET THE SECTION NUMBER
JUMPE T,SYMVDN ;[461] NOT THERE, GIVE UP
MOVE R,T ;[461] GET ADR IN RIGHT PLACE
; ADDI R,.STLEN ;[461] WANT LENGTH WORD
PUSHJ P,FETCH ;[461] IN T
JRST SYMVDN ;[461] SORRY
ADD T,R ;[461] GET LAST ADDR OF VECTOR
MOVEM T,ENDSUB ;[461] SAVE END OF SUBTABLES
WIT
IOWBL1: MOVEM T,S$ADR(W2) ;STORE TABLE ADDRESS
MOVEM R,S$SUB(W2) ;[470] STORE ADDRESS OF POINTER
HRROS S$SUF(W2) ;[634] FLAG S$SUB POINTS TO IOWD-FORMAT
POPJ P, ;RETURN
;HERE WITH *THE* PDVA IN R, TO CHECK OUT THE SYMBOL TABLE VECTOR
;CALL WITH ADDRESS OF SYMBOL TABLE BLOCK IN W2. IF "SYMP" THEN USYMP
;WILL BE SET, OTHERWISE UNAFFECTED.
;FLAGS IN W1 FOR SYMBOL TABLES SEEN
R5DF==1B0 ;RADIX-50 DEFINED TABLE FLAG
R5UF==1B1 ;RADIX-50 UNDEFINED TABLE FLAG
PDVBLK: MOVEM R,SYTLOC ;SAVE PDVA
SETZ W1, ;CLEAR FLAGS
; ADDI R,.PVCNT ;GET PDV LENGTH
PUSHJ P,FETCH ;INTO T
JRST PDVS90 ;CAN'T -- DONE EARLY
CAIGE T,.PVLVR ;DOES IT HAVE A LINK VERSION?
JRST PDVBL2 ;NO, ASSUME GOOD ENOUGH
ADDI R,.PVLVR-.PVCNT ;POINT AT VERSION WORD
PUSHJ P,FETCH ;GET IT
JRST PDVBL1 ;IGNORE ERROR, ASSUME OK
LDB S,[POINT 9,T,11] ;GET MAJOR VERSION
CAIGE S,6 ;BUILT BY LINK 6.0 OR LATER?
JRST PDVS90 ;NO, .PVSYM NO GOOD
PDVBL1: SUBI R,.PVLVR-.PVSYM ;DROP BACK TO SYMBOL VECTOR WORD
JRST PDVBL3 ;AND CONTINUE
PDVBL2: CAIGE T,.PVSYM ;DOES IT HAVE A .PVSYM?
JRST PDVS90 ;NO, ZAP POINTER
ADDI R,.PVSYM-.PVCNT ;GET SYMBOL VECTOR WORD
PDVBL3: PUSHJ P,FETCH ;INTO T
JRST PDVS90 ;CAN'T
TXNE T,IFIW ;[544] IS IT LOCAL?
HLL T,R ;[544] YES, SET THE SECTION NUMBER
JUMPE T,PDVS90 ;NOT THERE, GIVE UP
;ENTER HERE WITH SYMBOL VECTOR ADDRESS IN T (E.G., FROM .JBSYM)
PDVBL4: SETZ W1, ;[634] CLEAR FLAGS
MOVE R,T ;GET ADR IN RIGHT PLACE
; ADDI R,.STLEN ;WANT LENGTH WORD
PUSHJ P,FETCH ;IN T
JRST PDVS90 ;SORRY
ADD T,R ;GET LAST ADDR OF VECTOR
MOVEM T,ENDSUB ;SAVE END OF SUBTABLES
REP 3/218 ;16C246
AOSA R ;[461] POINT TO FIRST SUBTABLE
SYMV00: ADDI R,3 ;[461] SUBTABLES HAVE FIXED LENGTH 3
CAML R,ENDSUB ;[461] PAST THE END OF THE VECTOR?
JRST SYMVDN ;[461] YES, DONE
PUSHJ P,FETCH ;[461] GRAB TYPE WORD
JRST SYMV00 ;[461] SIGH
LDB TT,[POINTR T,ST%TYP] ;[472] GET JUST TYPE
CAIE TT,.R50D ;[461] DEFINED TABLE?
JRST SYMV01 ;[461] NO, TRY NEXT TYPE
TXOE W1,R5DF ;[461] FLAG DEFINED TABLE SEEN
JRST SYMV00 ;[461] ALREADY GOT ONE, THANKS
XMOVEI W2,SYMP ;[461] GET POINTER BLOCK ADR
PUSHJ P,PDVBLK ;[461] SET UP BLOCK
TXZ W1,R5DF ;[461] BLEW IT, OH WELL
JRST SYMV00 ;[461] GO CHECK NEXT POINTER
SYMV01: CAIE TT,.R50U ;[461] UNDEFINED TABLE?
JRST SYMV02 ;[461] NO, SOMETHING ELSE
TXOE W1,R5UF ;[461] FLAG UNDEFINED TABLE SEEN
JRST SYMV00 ;[461] ALREADY GOT ONE, KEEP GOING
XMOVEI W2,USYMP ;[461] GET BLOCK ADDR
PUSHJ P,PDVBLK ;[461] SET UP BLOCK
TXZ W1,R5UF ;[461] NO GOOD
JRST SYMV00 ;[461] GO CHECK NEXT POINTER
SYMV02==SYMV00 ;[461] NO MORE DEFINED TYPES
WIT
AOSA R ;POINT TO FIRST SUBTABLE
PDVS10: ADDI R,3 ;SUBTABLES HAVE FIXED LENGTH 3
CAML R,ENDSUB ;PAST THE END OF THE VECTOR?
JRST PDVS90 ;YES, DONE
PUSHJ P,FETCH ;GRAB TYPE WORD
JRST PDVS10 ;SIGH
LDB TT,[POINTR T,ST%TYP] ;[472] GET JUST TYPE
CAIE TT,.R50D ;DEFINED TABLE?
JRST PDVS11 ;NO, TRY NEXT TYPE
TXOE W1,R5DF ;FLAG DEFINED TABLE SEEN
JRST PDVS10 ;ALREADY GOT ONE, THANKS
PUSHJ P,VECBLK ;SET UP BLOCK
TXZ W1,R5DF ;BLEW IT, OH WELL
JRST PDVS10 ;GO CHECK NEXT POINTER
PDVS11: CAIE TT,.R50U ;UNDEFINED TABLE?
JRST PDVS20 ;NO, SOMETHING ELSE
CAIN W2,SYMP ;[634] UNDEFINEDS ALLOWED ONLY FROM "MASTER"
TXOE W1,R5UF ;FLAG UNDEFINED TABLE SEEN
JRST PDVS10 ;ALREADY GOT ONE, KEEP GOING
MOVEI W2,USYMP ;GET UNDEFINED BLOCK ADDR
PUSHJ P,VECBLK ;SET UP BLOCK
TXZ W1,R5UF ;NO GOOD
MOVEI W2,SYMP ;[634] RESTORE MASTER BLOCK ADDRESS
JRST PDVS10 ;GO CHECK NEXT POINTER
PDVS20==PDVS10 ;NO MORE DEFINED TYPES
REP 32/218 ;16C247
SYMVDN: SETZ R, ;[502] SET UP ZERO POINTER
MOVEI W2,SYMP ;[502] FIRST CHECK DEFINED TABLE
TXNN W1,R5DF ;[461] DEFINED TABLE SEEN?
PUSHJ P,PDVBLK ;[502] NO, CLEAR THE BLOCK
NOP ;[502]
MOVEI W2,USYMP ;[502] NEXT, UNDEFINED
TXNN W1,R5UF ;[461] UNDEFINED TABLE SEEN?
PUSHJ P,PDVBLK ;[502] NO, POINT TO ZERO
NOP ;[502]
MOVEI W2,HSYMP ;[502] SUBTABLES CAN'T HAVE HISEGS
PUSHJ P,PDVBLK ;[502] SO ZAP IT
NOP ;[502]
JRST SYMCX4 ;[461] GO VALIDATE POINTERS
WIT
PDVS90: SETZ R, ;[502] SET UP ZERO POINTER
TXNN W1,R5DF ;DEFINED TABLE SEEN?
PUSHJ P,VECBLK ;[502] NO, CLEAR THE BLOCK
NOP ;[502]
CAIE W2,SYMP ;[634] MASTER BLOCK ADDRESS?
JRST PDVS99 ;[634] NO, SKIP UNDEFINED CHECK
MOVEI W2,USYMP ;[502] NEXT, UNDEFINED
TXNN W1,R5UF ;UNDEFINED TABLE SEEN?
PUSHJ P,VECBLK ;[502] NO, POINT TO ZERO
NOP ;[502]
MOVEI W2,SYMP ;[634] RESTORE POINTER BLOCK ADDRESS
PDVS99: POPJ P, ;[634] POINTERS SET FROM PDV/VECTOR
;VECBLK -- SET UP BLOCK BASED ON PDV SYMBOL VECTOR SUBTABLE
; W2/ ADDR OF SYMBOL BLOCK
; R/ SUBTABLE ADDRESS
; PUSHJ P,VECBLK
;RETURNS: +1/ SOMETHING DIED
; +2/ GOOD
;
;PRESERVES R,S,T,W2
VECBLK: MOVEM R,S$SUB(W2) ;SAVE SUBTABLE ADDRESS
HRRZS S$SUF(W2) ;[634] FLAG VECTOR-SUBTABLE ADDRESS
JUMPE R,[SETZM S$ADR(W2) ;[502] IF NO SUBTABLE, ZAP SOME
SETZM S$LEN(W2) ;[502] LOCATIONS
IFN FTFILE,<
SETZM S$OLN(W2) ;[502]
SETZM S$OPT(W2) ;[502]
> ;END IFN FTFILE
JRST CPOPJ1] ;[502] ALWAYS "SUCCEEDS"
PUSHJ P,SAVRST ;AS ADVERTISED
; ADDI R,.STDAT ;WANT LENGTH WORD
PUSHJ P,FETCH ;GRAB IT
POPJ P, ;CAN'T
IFN FTFILE,<MOVEM T,S$OLN(W2)>;SAVE ORIGINAL TYPE/LENGTH WORD
ANDX T,ST%LEN ;GET LENGTH
MOVEM T,S$LEN(W2) ;SAVE IT AWAY
ADDI R,.STPTR-.STDAT ;POINT TO POINTER
PUSHJ P,FETCH ;GET ADDRESS WORD
POPJ P, ;SORRY
IFN FTFILE,<MOVEM T,S$OPT(W2)>;SAVE ORIGINAL POINTER
TXNE T,IFIW ;[544] IS POINTER LOCAL?
HLL T,R ;[544] YES, MAKE A REAL ADDR
MOVEM T,S$ADR(W2) ;SAVE POINTER
JRST CPOPJ1 ;RETURN GOOD
REP 17/219 ;16C248
;JUMPS TO SYMCX1 TO USE DEFAULT SECTION'S JOBDAT
;JUMPS TO SYMVEC WHEN DECIDED ON A PDV.
IFE FTMON,< ;[533] NO PDV SEARCHING IN MDDT
PDVSRH: ;[461]
IFE FTFILE,< ;[461] FIRST THE NON-FILDDT SETUP
IFN FTDEC10,<
JRST SYMCX1> ;[461] NO PDVS ON TOPS-10 YET
IFN FTDEC20,< ;[461] FOR USER, EDDT-20
IFN FTUD20,< ;[533] CHECK FOR SDDT
WIT
;JUMPS TO SYMCU3 TO USE DEFAULT SECTION'S JOBDAT
;JUMPS TO SYMCP0 WHEN DECIDED ON A PDV.
IFN FTDEC20&<^-FTMON>,< ;[630][533] NO PDV SEARCHING IN MDDT
PDVSRH: ;[461]
IFE FTFILE,< ;FIRST THE NON-FILDDT SETUP
;**;[630] At PDVSRH:+2L, delete 3, PTR, 28-Aug-85
IFN FTUD20,< ;[533] CHECK FOR SDDT
REP 33/219 ;16C249
JRST SYMVEC ;[504] GO SET UP OUR SYMBOLS
JRST .+1] ;[504] HAVEN'T GOT ONE??
> ;END IFN FTUD20
PUSHJ P,PDVINI ;[466] SET UP PDVARG
SETZM PDVA ;[461] "LAST" PDVA (SET START OF RANGE)
PUSHJ P,NXTPDV ;[461] GET PDVA IN R
IFN FTUD20,<
CAMN R,DDTPDV ;[504] IS IT DDT'S PDV?
PUSHJ P,NXTPDV ;[504] YES, GET ANOTHER ONE (AND NEW COUNT)
> ;END IFN FTUD20
HLRZ W1,PDVARG+.POCT2 ;[461] GET # PDVS EXISTING
> ;END IFN FTDEC20
> ;END IFE FTFILE
IFN FTFILE,< ;[461] NOW THE FILDDT SETUP
SETO W2, ;[461] "PREVIOUS" INDEX INTO PDVTBL
PUSHJ P,NXTPDV ;[461] GET THE FIRST PDVA
MOVE W1,PDVNUM ;[461] GET NUMBER OF PDVS
WIT
JRST SYMCP0 ;[504] GO SET UP OUR SYMBOLS
JRST .+1] ;[504] HAVEN'T GOT ONE??
> ;END IFN FTUD20
PUSHJ P,PDVINI ;[466] SET UP PDVARG
SETZM PDVA ;"LAST" PDVA (SET START OF RANGE)
PUSHJ P,NXTPDV ;GET PDVA IN R
IFN FTUD20,<
CAMN R,DDTPDV ;[504] IS IT DDT'S PDV?
PUSHJ P,NXTPDV ;[504] YES, GET ANOTHER ONE (AND NEW COUNT)
> ;END IFN FTUD20
HLRZ W1,PDVARG+.POCT2 ;GET # PDVS EXISTING
;**;[630] At PDVSRH:+nL, delete 1, PTR, 28-Aug-85
> ;END IFE FTFILE
IFN FTFILE,< ;NOW THE FILDDT SETUP
SETO W2, ;"PREVIOUS" INDEX INTO PDVTBL
PUSHJ P,NXTPDV ;GET THE FIRST PDVA
MOVE W1,PDVNUM ;GET NUMBER OF PDVS
REP 1/220 ;16C250
;STILL IFE FTMON
WIT
;STILL IFN FTDEC20&<^-FTMON>
REP 7/220 ;16C251
JUMPLE W1,SYMCX1 ;[461] NONE EXIST, USE SECDDT'S JOBDAT
SOJE W1,SYMVEC ;[461] ALL DONE IF JUST ONE PDV
PDVSR1:
; ADDI R,.PVCNT ;[461] WANT LENGTH WORD
PUSHJ P,FETCH ;[461] GO GET IT
JRST PDVSR2 ;[461] NOT THERE, SKIP IT
CAIGE T,.PVSYM ;[461] LONG ENOUGH?
JRST PDVSR2 ;[461] NO, SKIP IT
ADDI R,.PVSYM-.PVCNT ;[461] POINT TO SYM WORD
PUSHJ P,FETCH ;[461] GO GRAB IT
JRST PDVSR2 ;[461] CAN'T
SUBI R,.PVSYM-.PVCNT ;[472] BACK TO TOP OF PDV
JUMPG T,SYMVEC ;[472] USE IT IF .PVSYM IS EFIW
PDVSR2: SOJL W1,PDVSR3 ;[461] NOT EFIW, COUNT THIS PDV
PUSHJ P,NXTPDV ;[461] GET THE NEXT PDV
IFE FTUD20,<
JRST PDVSR1 ;[461] AND GO LOOK AT IT
WIT
JUMPLE W1,SYMCU3 ;NONE EXIST, USE SECDDT'S JOBDAT
SOJE W1,SYMCP0 ;ALL DONE IF JUST ONE PDV
PDVSR1:
; ADDI R,.PVCNT ;WANT LENGTH WORD
PUSHJ P,FETCH ;GO GET IT
JRST PDVSR2 ;NOT THERE, SKIP IT
CAIGE T,.PVSYM ;LONG ENOUGH?
JRST PDVSR2 ;NO, SKIP IT
ADDI R,.PVSYM-.PVCNT ;POINT TO SYM WORD
PUSHJ P,FETCH ;GO GRAB IT
JRST PDVSR2 ;CAN'T
SUBI R,.PVSYM-.PVCNT ;[472] BACK TO TOP OF PDV
JUMPG T,SYMCP0 ;[472] USE IT IF .PVSYM IS EFIW
PDVSR2: SOJL W1,PDVSR3 ;NOT EFIW, COUNT THIS PDV
PUSHJ P,NXTPDV ;GET THE NEXT PDV
IFE FTUD20,<
JRST PDVSR1 ;AND GO LOOK AT IT
REP 31/220 ;16C252
;STILL IFE FTMON
WIT
;STILL IFN FTDEC20&<^-FTMON>
REP 5/221 ;16C253
IFE FTFILE,< ;[461] NON-FILDDT CASE
WIT
IFE FTFILE,< ;NON-FILDDT CASE
REP 13/221 ;16C254
PUSHJ P,NXTPDV ;[461] GRAB THE PDVA
CAMN R,DDTPDV ;[504] IS DDT'S FIRST?
PUSHJ P,NXTPDV ;[504] YES, TRY AGAIN
SKIPE PDVARG+.POCT2 ;[461] DID ANY SHOW UP?
JRST SYMVEC ;[461] YES, GO CHECK IT OUT
> ;END IFN FTDEC20
PDVSR5: SETZM PDVA ;[461] NO, START FROM 0,,0 THIS TIME
PUSHJ P,NXTPDV ;[461] SATISFACTION GUARANTEED
WIT
PUSHJ P,NXTPDV ;GRAB THE PDVA
CAMN R,DDTPDV ;[504] IS DDT'S FIRST?
PUSHJ P,NXTPDV ;[504] YES, TRY AGAIN
SKIPE PDVARG+.POCT2 ;DID ANY SHOW UP?
JRST SYMCP0 ;YES, GO CHECK IT OUT
> ;END IFN FTUD20
PDVSR5: SETZM PDVA ;NO, START FROM 0,,0 THIS TIME
PUSHJ P,NXTPDV ;SATISFACTION GUARANTEED
REP 26/221 ;16C255
JRST SYMVEC ;[461] AND CHECK IT OUT
WIT
JRST SYMCP0 ;AND CHECK IT OUT
REP 31/221 ;16C256
IFN FTFILE,< ;[461] FILDDT CASE
PDVSR3: SKIPE T,EVLEN ;[461] IF THERE'S AN EVEC
HLLZ T,EVADR ;[461] GET START OF EVEC SECTION
JUMPE T,PDVSR5 ;[461] IF ZERO, JUST USE FIRST PDVA
MOVE W1,PDVNUM ;[461] GET NUM PDVS
SETO W2, ;[461] POINT TO "TOP" OF TABLE
PDVSR4: PUSHJ P,NXTPDV ;[461] GET PDVA
CAML R,T ;[461] CAN WE USE IT?
JRST SYMVEC ;[461] YEP
SOJG W1,PDVSR4 ;[461] NO, TRY NEXT ONE
PDVSR5: SETO W2, ;[461] NONE WORKED, JUST USE FIRST ONE
PUSHJ P,NXTPDV ;[461] GET FIRST PDVA
JRST SYMVEC ;[461] GO CHECK IT OUT
WIT
IFN FTFILE,< ;FILDDT CASE
PDVSR3: SKIPE T,EVLEN ;IF THERE'S AN EVEC
HLLZ T,EVADR ;GET START OF EVEC SECTION
JUMPE T,PDVSR5 ;IF ZERO, JUST USE FIRST PDVA
MOVE W1,PDVNUM ;GET NUM PDVS
SETO W2, ;POINT TO "TOP" OF TABLE
PDVSR4: PUSHJ P,NXTPDV ;GET PDVA
CAML R,T ;CAN WE USE IT?
JRST SYMCP0 ;YEP
SOJG W1,PDVSR4 ;NO, TRY NEXT ONE
PDVSR5: SETO W2, ;NONE WORKED, JUST USE FIRST ONE
PUSHJ P,NXTPDV ;GET FIRST PDVA
JRST SYMCP0 ;GO CHECK IT OUT
REP 1/222 ;16C257
;STILL IFE FTMON
WIT
;STILL IFN FTDEC20&<^-FTMON>
REP 12/222 ;16C258
IFE FTFILE,< ;[461] FIRST THE NON-FILDDT CASE
IFN FTDEC20,< ;[461] ON TOPS-20
NXTPDV: AOS R,PDVA ;[461] INCREMENT PAST LAST PDVA
MOVEM R,PDVARG+.POADR ;[461] STORE AS LOW END OF RANGE
MOVEI R,1 ;[461] ONLY 1-WORD BLOCK
MOVEM R,PDVARG+.POCT2 ;[461] SET THE COUNT WORD
PUSHJ P,GETPDV ;[461] DO THE PDVOP%
MOVE R,PDVA ;[461] GET THE PDVA RETURNED
POPJ P, ;[461] AND RETURN
;GETPDV PERFORMS A .POGET PDVOP% JSYS ACCORDING TO ARGS IN PDVARG.
GETPDV: PUSHJ P,SAVT4 ;[461] SAVE JSYS ACS
XMOVEI T2,PDVARG ;[461] GET ARG BLOCK ADDRESS
MOVX T1,.POGET ;[461] GET A PDVA
PDVOP% ;[461] . . .
POPJ P, ;[461] RETURN
WIT
IFE FTFILE,< ;FIRST THE NON-FILDDT CASE
;**;[630] At NXTPDV:-1L, delete 1, PTR, 28-Aug-85
NXTPDV: AOS R,PDVA ;INCREMENT PAST LAST PDVA
MOVEM R,PDVARG+.POADR ;STORE AS LOW END OF RANGE
MOVEI R,1 ;ONLY 1-WORD BLOCK
MOVEM R,PDVARG+.POCT2 ;SET THE COUNT WORD
PUSHJ P,GETPDV ;DO THE PDVOP%
MOVE R,PDVA ;GET THE PDVA RETURNED
POPJ P, ;AND RETURN
;GETPDV PERFORMS A .POGET PDVOP% JSYS ACCORDING TO ARGS IN PDVARG.
GETPDV: PUSHJ P,SAVT4 ;SAVE JSYS ACS
XMOVEI T2,PDVARG ;GET ARG BLOCK ADDRESS
MOVX T1,.POGET ;GET A PDVA
PDVOP% ; . . .
POPJ P, ;RETURN
REP 32/222 ;16C259
XMOVEI T,PDVA ;[461] POINT TO DATA "BLOCK"
MOVEM T,PDVARG+.PODAT ;[461] SO PDVOP% CAN FIND IT
SETZM PDVARG+.POADR ;[466] START RANGE AT ZERO
MOVX T,VMADR ;[461] MAX POSSIBLE ADDRESS
SKPNS0 ;[461] IN SECTION ZERO?
TLZ T,-1 ;[461] YES, STAY INSIDE IT
MOVEM T,PDVARG+.POADE ;[461] SET END OF RANGE
POPJ P, ;[466] ALL DONE
> ;END IFN FTDEC20
IFN FTDEC10,<
NXTPDV: POPJ P,> ;[472] NO PDVS ON TOPS-10 (YET...)
WIT
XMOVEI T,PDVA ;POINT TO DATA "BLOCK"
MOVEM T,PDVARG+.PODAT ;SO PDVOP% CAN FIND IT
SETZM PDVARG+.POADR ;[466] START RANGE AT ZERO
MOVX T,VMADR ;MAX POSSIBLE ADDRESS
SKPNS0 ;IN SECTION ZERO?
TLZ T,-1 ;YES, STAY INSIDE IT
MOVEM T,PDVARG+.POADE ;SET END OF RANGE
POPJ P, ;[466] ALL DONE
;**;[630] At PDVINI:+10L, delete 4, PTR, 28-Aug-85
REP 48/222 ;16C260
NXTPDV: AOS W2 ;[461] INCREMENT POINTER
MOVE R,@PDVTBL ;[461] GET NEXT PDVA
POPJ P, ;[461] AND RETURN
> ;END IFN FTFILE
> ;END IFE FTMON
WIT
NXTPDV: AOS W2 ;INCREMENT POINTER
MOVE R,@PDVTBL ;GET NEXT PDVA
POPJ P, ;AND RETURN
> ;END IFN FTFILE
> ;END IFN FTDEC20&<^-FTMON>
DEL 1/230 ;16C261
REP 40/234 ;16C262
WIT
REP 9/242 ;16C263
.ADR U50,.DIS 03,.TXT OPE,.TRA N,.TXT TT,.ADR CAL,.TXT CAL,.TRA L,.END,.END,.END
WIT
.ADR U50,.DIS 03,.TXT OPE,.TRA N,.TXT TT,.ADR CAL,.TXT CAL,.TRA L,
.TRAX PMV,.TRAX PMV,.END
INS 24/242 ;16C264
;[644] OPCODES 52 AND 53 COME HERE (PMOVE AND PMOVEM)
.ADR PMV,.TXT PMOVE,.DIS 01,.END,.TRA M
REP 27/246 ;16C265
DMOVE TT,USYMP+S$ADR ;[461] GET UNDEFINED'S ADR AND LEN
DMOVEM TT,ESTUT ;[461] UPDATE TEMP COPY
WIT
DMOVE TT,USYMP+S$ADR ;GET UNDEFINED'S ADR AND LEN
DMOVEM TT,ESTUT ;UPDATE TEMP COPY
REP 28/247 ;16C266
IFN FTFILE,< ;[470] FILDDT UPDATES WHEN FILE CLOSED
JRST CPOPJ1> ;[470] ALWAYS WINS
WIT
IFN FTFILE,<JRST CPOPJ1> ;[470] FILDDT UPDATES WHEN FILE CLOSED
REP 33/247 ;16C267
SKIPN R,S$SUB(W1) ;[502] GET PDV SUBTABLE OR JOBDAT ADDRESS
POPJ P, ;[502] NEITHER, SO DON'T UPDATE IT
SKIPLE SYTLOC ;[504] WHICH IS IT?
JRST INCSYV ;[504] PDV, GO DO SUBTABLE
MOVN T,S$LEN(W1) ;[470] JOBDAT, SIMPLE CASE
WIT
SKIPN R,S$SUB(W1) ;[502] GET PDV SUBTABLE OR IOWD ADDRESS
POPJ P, ;[502] NEITHER, SO DON'T UPDATE IT
SKIPL S$SUF(W1) ;[634] WHICH FORMAT POINTER?
JRST INCSYV ;[634] VECTOR SUBTABLE ADDRESS
MOVN T,S$LEN(W1) ;[634] IOWD-FORMAT, SIMPLE CASE
INS 21/248 ;16C268
IFN FTEX10,< ;[664] HIDDEN SYMBOLS ONLY ON A -10
SKPUSR ;[664] ONLY USE HIDDEN SYMBOLS IN EXEC MODE
SKIPN HSBLK ;[664] AND ONLY IF WE HAVE THEM
JRST CPOPJ1 ;[664] NO, DON'T HAVE TO CHASE THEM DOWN
SKIPE R,JOBEDV ;[664] NEED A LONG EDV FOR THIS
SKIPL S$SUF(W1) ;[664] AND THIS ONLY MATTERS FOR IOWD-STYLE PTRS
JRST CPOPJ1 ;[664] NO NEED TO CHASE THE RING OTHERWISE
PUSH P,T ;[664] SAVE THE WORD TO DEPOSIT
MOVEI S,.EDSYM-.EDCNT ;[664] FORM INITIAL OFFSET TO WORD TO CHANGE
CAIN W1,USYMP ;[664] UNLESS DOING UNDEFINEDS,
MOVEI S,.EDUSY-.EDCNT ;[664] THEN USE THIS OFFSET
IFN .EDCNT,ADDI R,.EDCNT ;[664] POINT TO THE COUNT WORD
PUSHJ P,FETCHV ;[664] GET THE LENGTH WORD FOR THIS EDV
JRST INCSY8 ;[664] OOPS
TLZ T,-1 ;[664] KEEP ONLY THE LENGTH
CAIG T,.EDLNK ;[664] IS IT LONG ENOUGH FOR US?
JRST INCSY9 ;[664] NO, GIVE UP
INCSY6: ADDI R,.EDLNK-.EDCNT ;[664] POINT TO LINK WORD
PUSHJ P,FETCHV ;[664] GET ADDRESS OF NEXT EDV IN RING
JRST INCSY8 ;[664] OOPS
MOVE R,T ;[664] NEXT BLOCK WE WANT TO HACK
CAMN R,JOBEDV ;[664] UNLESS WE'VE GONE ALL THE WAY AROUND
JRST INCSY9 ;[664] THEN WE'RE DONE
IFN .EDCNT,ADDI R,.EDCNT ;[664] KEEP POINTING AT COUNT WORD
ADD R,S ;[664] NOT DONE, SO POINT TO WORD TO CHANGE
MOVE T,(P) ;[664] RETRIEVE WORD TO STORE
PUSHJ P,DEPMEM ;[664] DEPOSIT INTO THIS EDV
JRST INCSY8 ;[664] OOPS
SUB R,S ;[664] BACK OFF TO START OF EDV
JRST INCSY6 ;[664] LOOP OVER ALL EDVS IN RING
INCSY8: SETZM SYMVAL ;[664] SOMETHING GOT MESSED UP
INCSY9: POP P,T ;[664] RESTORE STACK
> ;[664] END IFN FTEX10
REP 13/249 ;16C269
IFN FTEXEC&FTDEC10,< ;[430]
PUSHJ P,SYMSPC ;MAKE SURE SEARCHING DONE IN SYMBOL VAS
> ;END IFN FTEXEC&FTDEC10
IFE FTFILE,<
PUSHJ P,SYMCHK ;MAKE SURE WE TRUST THE SYMBOL TABLE POINTERS
> ;END IFE FTFILE
MOVE R,SYMP+S$LEN ;[461] GET NUMBER OF SYMBOLS IN LOWSEG TABLE
ADD R,HSYMP+S$LEN ;[461] TOTAL NUMBER OF SYMBOL WORDS TO LOOK AT
MOVEM R,SY2GO ;[461] SEARCH STOPS WHEN THIS WORD GOES TO ZERO
WIT
IFE FTFILE,<PUSHJ P,SYMCHK> ;[634] MAKE SURE WE TRUST THE SYMBOL POINTERS
IFN FTEX10,<PUSHJ P,SYMSPC> ;[634] SELECT SYMBOL SPACE
MOVE R,SYMP+S$LEN ;GET NUMBER OF SYMBOLS IN LOWSEG TABLE
ADD R,HSYMP+S$LEN ;TOTAL NUMBER OF SYMBOL WORDS TO LOOK AT
MOVEM R,SY2GO ;SEARCH STOPS WHEN THIS WORD GOES TO ZERO
REP 32/249 ;16C270
SKIPA S,SYMP+S$ADR ;[461] NO, FETCH LOWSEG TABLE POINTER
SKIPA S,HSYMP+S$ADR ;[461] YES, FETCH HISEG TABLE POINTER
WIT
SKIPA S,SYMP+S$ADR ;NO, FETCH LOWSEG TABLE POINTER
SKIPA S,HSYMP+S$ADR ;YES, FETCH HISEG TABLE POINTER
REP 9/250 ;16C271
IFN FTEXEC&FTDEC10,< ;[430]
PUSHJ P,SYMSPC ;MAKE SURE SEARCHING DONE IN SYMBOL VAS
> ;END IFN FTEXEC&FTDEC10
IFE FTFILE,<
PUSHJ P,SYMCHK ;MAKE SURE WE TRUST THE SYMBOL TABLE POINTERS
> ;END IFE FTFILE
MOVE S,ESTUT ;GET OUR UNDEFINED TABLE
MOVE R,ESTUTL ;[461] GET COUNT OF WORDS IN IT
MOVEM R,SY2GO ;[461] PUT COUNT INTO SY2GO
WIT
IFE FTFILE,<PUSHJ P,SYMCHK> ;[634] MAKE SURE WE TRUST THE SYMBOL POINTERS
IFN FTEX10,<PUSHJ P,SYMSPC> ;[634] SELECT SYMBOL SPACE
MOVE S,ESTUT ;GET OUR UNDEFINED TABLE
MOVE R,ESTUTL ;GET COUNT OF WORDS IN IT
MOVEM R,SY2GO ;PUT COUNT INTO SY2GO
REP 19/251 ;16C272
;FALL INTO NEWSYP
;FALL IN FROM ABOVE
WIT
;FALL INTO NEWSYP
REP 14/252 ;16C273
SKIPN HSYMP+S$ADR ;[461] LOSEG - IS THERE A HISEG TABLE TO SEARCH?
SKIPN S,SYMP+S$ADR ;[461] HISEG LAST OR NO TABLE, HOW ABOUT LOSEG?
SKIPA S,HSYMP+S$ADR ;[461] HISEG'S TURN OR NO LOSEG TABLE, GET HISEG
SKIPA TT1,SYMP+S$LEN ;[461] LOSEG, ALSO GET LENGTH
SKIPA TT1,HSYMP+S$LEN ;[461] HISEG, ALSO GET LENGTH
TXZA F,HSYMF ;GOING TO SEARCH LOWSEG TABLE: REMEMBER IT
TXO F,HSYMF ;GOING TO SEARCH HISEG TABLE: REMEMBER IT
ADD R,TT1 ;[461] GET COUNT TO WORD TO LOOK AT
WIT
SKIPN HSYMP+S$ADR ;LOSEG - IS THERE A HISEG TABLE TO SEARCH?
SKIPN S,SYMP+S$ADR ;HISEG LAST OR NO TABLE, HOW ABOUT LOSEG?
SKIPA S,HSYMP+S$ADR ;HISEG'S TURN OR NO LOSEG TABLE, GET HISEG
SKIPA TT1,SYMP+S$LEN ;LOSEG, ALSO GET LENGTH
SKIPA TT1,HSYMP+S$LEN ;HISEG, ALSO GET LENGTH
TXZA F,HSYMF ;GOING TO SEARCH LOWSEG TABLE: REMEMBER IT
TXO F,HSYMF ;GOING TO SEARCH HISEG TABLE: REMEMBER IT
ADD R,TT1 ;GET COUNT TO WORD TO LOOK AT
REP 11/253 ;16C274
PTRSET: MOVE TT1,S ;[461] COPY ADDRESS OF TABLE
WIT
PTRSET: MOVE TT1,S ;COPY ADDRESS OF TABLE
DEL 19/253 ;16C275
;FALL THROUGH TO NEXT PAGE
;FALL IN FROM ABOVE
DEL 22/255 ;16C276
REP 30/256 ;16C277
IFN FTEXEC&FTDEC10,< ;[430]
PUSHJ P,SYMSPC ;PUT OURSELF IN THE SYMBOL SPACE
> ;END IFN FTEXEC&FTDEC10
WIT
IFN FTEX10,< ;[430]
PUSHJ P,SYMSPC ;PUT OURSELF IN THE SYMBOL SPACE
> ;END IFN FTEX10
REP 9/257 ;16C278
JRST [ MOVE TT,R
PUSHJ P,DDSYMC ;YES, LOOK IT UP
JRST [ SMERS <INVALID DDT INTERNAL ADDRESS>
WIT
JRST [TLNE R,377777 ;[667] MUST BE PURE IFIW
JRST .+1 ;[667] NO, SO NOT INTERNAL
MOVE TT,R
PUSHJ P,DDSYMC ;YES, LOOK IT UP
JRST [SMERS <INVALID DDT INTERNAL ADDRESS>
REP 17/257 ;16C279
JRST [ SMERS <ABOVE PROTECTION REGISTER LIMIT>
WIT
JRST [SMERS <ABOVE PROTECTION REGISTER LIMIT>
REP 1/258 ;16C280
;FIRST, USER AND EXEC DDT STYLE HANDLING
IFE FTFILE,<
WIT
;USER AND EXEC DDT STYLE HANDLING
IFE FTFILE,<
REP 15/258 ;16C281
WIT
REP 25/258 ;16C282
SKIPN SYTLOC ;[461] IF 0$5M,
WIT
SKIPN SYTLOC ;IF 0$5M,
REP 35/258 ;16C283
IFN FTEXEC&FTDEC10,< ;[430]
PUSHJ P,NORSPC ;MAKE SURE IN NORMAL ADDRESS SPACE
> ;END IFN FTEXEC&FTDEC10
FETCHS: PUSHJ P,CHKADR ;SEE IF ACCESSIBLE ADDRESS
TXNN TT,PG$EXI ;DOES PAGE EXIST?
JRST [ SMERS <PAGE DOES NOT EXIST>
POPJ P,] ;SET ERROR MSG AND RETURN
TXNN TT,PG$REA ;AND CAN WE READ IT?
JRST [ SMERS <NO READ ACCESS>
POPJ P,] ;SET ERROR MSG AND REUTRN
JSP TT2,PCAFI ;SUPPRESS ADDRESS BREAK AND
WIT
IFN FTEX10,<PUSHJ P,NORSPC> ;[430] MAKE SURE IN NORMAL ADDRESS SPACE
FETCHS: PUSHJ P,CHKADR ;SEE IF ACCESSIBLE ADDRESS
TXNN TT,PG$EXI ;DOES PAGE EXIST?
JRST [SMERS <PAGE DOES NOT EXIST>
POPJ P,] ;SET ERROR MSG AND RETURN
TXNN TT,PG$REA ;AND CAN WE READ IT?
JRST [SMERS <NO READ ACCESS>
POPJ P,] ;SET ERROR MSG AND RETURN
JSP TT2,PZAFI ;[630] MAY WANT TO BE IN SECTION 1
REP 53/258 ;16C284
> ;END OF IFE FTFILE
WIT
> ;END OF IFE FTFILE
REP 28/261 ;16C285
IFN FTEXEC&FTDEC10,< ;[430]
PUSHJ P,SYMSPC ;PUT OURSELF IN THE SYMBOL SPACE
> ;END IFN FTEXEC&FTDEC10
WIT
IFN FTEX10,< ;[430]
PUSHJ P,SYMSPC ;PUT OURSELF IN THE SYMBOL SPACE
> ;END IFN FTEX10
REP 5/262 ;16C286
JRST [ MOVE TT,R
PUSHJ P,DDSYMC ;YES, LOOK IT UP
JRST [ SMERS <INVALID DDT INTERNAL ADDRESS>
POPJ P,]
MOVEM T,0(R) ;FETCH IT
IFE FTFILE,< ;[430]
SETZM SYMVAL ;[430] FORCE RECHECK OF SYMTAB POINTERS
> ;END IFE FTFILE
WIT
JRST [TLNE R,377777 ;[667] MUST BE PURE IFIW
JRST .+1 ;[667] ELSE IS NOT INTERNAL
MOVE TT,R
PUSHJ P,DDSYMC ;YES, LOOK IT UP
JRST [SMERS <INVALID DDT INTERNAL ADDRESS>
POPJ P,]
MOVEM T,0(R) ;FETCH IT
IFE FTFILE,<SETZM SYMVAL> ;[430] FORCE RECHECK OF SYMTAB POINTERS
REP 16/262 ;16C287
JRST [ SMERS <ABOVE PROTECTION REGISTER LIMIT>
WIT
JRST [SMERS <ABOVE PROTECTION REGISTER LIMIT>
REP 28/262 ;16C288
SKIPE MAPFN ;DO PHYSICAL OR VIRTUAL STORE?
JRST STORE3 ;PHYSICAL STORE
WIT
IFE FTFILE,< ;[634] NO DIFFERENCE IN FILDDT
SKIPE MAPFN ;DO PHYSICAL OR VIRTUAL STORE?
JRST STORE3 ;PHYSICAL STORE
> ;END IFE FTFILE
REP 1/263 ;16C289
;FIRST, USER AND EXEC DDT STYLE
IFE FTFILE,<
WIT
;USER AND EXEC DDT STYLE HANDLING
IFE FTFILE,<
REP 20/263 ;16C290
WIT
REP 29/263 ;16C291
SKIPN SYTLOC ;[461] IF 0$5M,
WIT
SKIPN SYTLOC ;IF 0$5M,
REP 44/263 ;16C292
IFN FTDEC10,< ;[430]
PUSHJ P,NORSPC ;MAKE SURE IN NORMAL ADDRESS SPACE
> ;END IFN FTDEC10
WIT
IFN FTDEC10,<PUSHJ P,NORSPC>;[430] MAKE SURE IN NORMAL ADDRESS SPACE
REP 53/263 ;16C293
SKIPN PATCHS ;YES - SHOULD WE TRY TO WRITE-ENABLE?
JRST [ SMERS <NOT WRITABLE>
WIT
SKIPN PATCHS ;NO - SHOULD WE TRY TO WRITE-ENABLE?
JRST [SMERS <NOT WRITABLE>
REP 17/264 ;16C294
JSP TT2,PCAFI ;SUPPRESS ADDRESS BREAK AND
WIT
JSP TT2,PZAFI ;[630] MAY WANT TO SNEAK INTO SECTION 1
INS 16/266 ;16C295
JSP TT2,PZAFI ;[630] MAY WANT TO DO THIS IN SECTION 1
REP 20/266 ;16C296
WIT
;STILL IFE FTFILE
REP 24/266 ;16C297
IFN FTDEC20,<
STORE8:
IFN FTEXEC,<
SKPEXC> ;NEVER NEVER TRY THIS IN EXEC MODE
SKIPN PATCHC ;AUTO-PAGE-CREATE ON?
JRST [ SMERS <CAN'T CREATE PAGE>
POPJ P,] ;[476] NO, DON'T CREATE PAGE
WIT
STORE8:
IFN FTEXEC,<SKPEXC> ;NEVER NEVER TRY THIS IN EXEC MODE
SKIPN PATCHC ;AUTO-PAGE-CREATE ON?
JRST [SMERS <CAN'T CREATE PAGE>
POPJ P,] ;[476] NO, DON'T CREATE PAGE
IFN FTDEC10,<
MOVE TT,[.PAGCD,,TT1];PAGE CREATE FUNCTION FOR PAGE.
MOVEI TT1,1 ;ONLY 1 ARGUMENT
MOVE TT2,R ;WORD ADDRESS
LSH TT2,WRD2PG ;DESIRED PAGE NUMBER
SETOM LASTPG ;FORGET ANY REMEMBERED ACCESS BITS
PAGE. TT, ;ASK MONITOR TO CREATE NEW PAGE FOR US
JRST [SMERS <CAN'T CREATE PAGE>
POPJ P,]
STORE9: JSP TT2,PZAFI ;[630] MAY WANT TO DO THIS IN SECTION 1
MOVEM T,@R ;DO THE STORE
JRST CPOPJ1 ;SUCCESSFUL RETURN
> ;END IFN FTDEC10
;FALL THROUGH FROM STORE 8
IFN FTDEC20,<
REP 70/266 ;16C298
TXNE TT,PG$EXI ;[603] SECTION EXIST?
WIT
TXNE TT,PG$SXI ;[630][603] SECTION EXIST?
REP 81/266 ;16C299
IFN FTDEC10,<
STORE8:
IFN FTEXEC,<
SKPEXC> ;NEVER NEVER TRY THIS IN EXEC MODE
SKIPN PATCHC ;AUTO-PAGE-CREATE ON?
JRST [ SMERS <CAN'T CREATE PAGE>
POPJ P,] ;[476] NO, DON'T CREATE PAGE
MOVE TT,[.PAGCD,,TT1];PAGE CREATE FUNCTION FOR PAGE.
MOVEI TT1,1 ;ONLY 1 ARGUMENT
MOVE TT2,R ;WORD ADDRESS
LSH TT2,WRD2PG ;DESIRED PAGE NUMBER
SETOM LASTPG ;FORGET ANY REMEMBERED ACCESS BITS
PAGE. TT, ;ASK MONITOR TO CREATE NEW PAGE FOR US
JRST [ SMERS <CAN'T CREATE PAGE>
POPJ P,]
STORE9: JSP TT2,PCAFI ;SUPPRESS ADDRESS BREAK AND
MOVEM T,@R ;DO THE STORE
JRST CPOPJ1 ;SUCCESSFUL RETURN
> ;END IFN FTDEC10
WIT
REP 105/266 ;16C300
> ;END OF IFE FTFILE
WIT
> ;END OF IFE FTFILE
REP 26/274 ;16C301
PHYIN: SKPKIP ;KI-PAGING IN EFFECT?
WIT
PHYIN: HRRI TT2,R ;[634] ASSUME <INSTR> INDIRECTS THROUGH "R"
MOVEM TT2,SWTEM ;[634] STASH <INSTR> IN TEMP HOLDING AREA
SKPKIP ;KI-PAGING IN EFFECT?
REP 47/274 ;16C302
HRRI TT2,R ;SUPPLY INDIRECT ADDRESS
PUSH P,TT2 ;SAVE THE INSTRUCTION
JSP TT2,PCAFI ;SUPPRESS ADDRESS BREAK AND
XCT (P) ;EXECUTE THE OPERATION
AOS -3(P) ;TAKE SUCCESSFUL RETURN
POP P,TT2 ;RESTORE STACK
WIT
JSP TT2,PCAFI ;SUPPRESS ADDRESS BREAK AND
XCT SWTEM ;EXECUTE THE OPERATION
AOS -2(P) ;TAKE SUCCESSFUL RETURN FROM PHYIN
REP 12/276 ;16C303
HRRI TT2,R ;SETUP FOR INDIRECTION
PUSH P,TT2 ;SAVE THE INSTRUCTION
JSP TT2,PCAFI ;SUPPRESS ADDRESS BREAK AND
XCT (P) ;REFERENCE DESIRED PHYSICAL ADDRESS
AOS -7(P) ;SUCCESSFUL RETURN
POP P,TT2 ;RESTORE STACK
WIT
JSP TT2,PCAFI ;SUPPRESS ADDRESS BREAK AND
XCT SWTEM ;REFERENCE DESIRED PHYSICAL ADDRESS
AOS -6(P) ;SUCCESSFUL RETURN FROM PHYIN
REP 1/277 ;16C304
IFN FTEXEC&FTDEC10,< ;[430]
WIT
IFN FTEX10,< ;[430]
REP 1/278 ;16C305
;STILL IFN FTEXEC&FTDEC10
WIT
;STILL IFN FTEX10
REP 1/279 ;16C306
;STILL IFN FTEXEC&FTDEC10
WIT
;STILL IFN FTEX10
REP 1/280 ;16C307
;STILL IFN FTEXEC&FTDEC10
WIT
;STILL IFN FTEX10
REP 35/280 ;16C308
> ;END IFN FTEXEC&FTDEC10 ;[430]
WIT
> ;END IFN FTEX10 ;[430]
REP 11/281 ;16C309
SKIPA T,SYMP+S$ADR ;[461] NO, GET LOWSEG PTR
MOVE T,HSYMP+S$ADR ;[461] YES, GET HISEG PTR
WIT
SKIPA T,SYMP+S$ADR ;NO, GET LOWSEG PTR
MOVE T,HSYMP+S$ADR ;YES, GET HISEG PTR
REP 22/282 ;16C310
CHKSYP: JUMPLE T,CPOPJ ;[461] POINTER MUST BE .GT. 0
PUSHJ P,SAVRST ;NEED SOME ACS
MOVE R,S$ADR(T) ;[461] GET BASE ADDRESS OF TABLE
JUMPE R,CPOPJ ;[461] FAIL IF NO TABLE
MOVE S,S$LEN(T) ;[461] GET LENGTH
WIT
CHKSYP: JUMPLE T,CPOPJ ;POINTER MUST BE .GT. 0
IFN FTEX10,<PUSHJ P,SYMSPC> ;[634] MUST BE IN SYM VIRTUAL SPACE
PUSHJ P,SAVRST ;NEED SOME ACS
MOVE R,S$ADR(T) ;GET BASE ADDRESS OF TABLE
JUMPE R,CPOPJ ;FAIL IF NO TABLE
MOVE S,S$LEN(T) ;GET LENGTH
REP 30/282 ;16C311
;SYBITS -- CHECK A SINGLE SYMBOL TABLE PAGE
WIT
;SYBITS -- CHKSYP ROUTINE TO CHECK A SINGLE SYMBOL TABLE PAGE
REP 11/285 ;16C312
; PG$EXI - SECTION EXISTS
WIT
; PG$SXI - SECTION EXISTS
; PG$SMA - SECTION IS MAPPED ELSEWHERE
; PG$SIN - SECTION IS MAPPED INDIRECTLY
; PG$SEC - SECTION # MAPPED TO
; ON TOPS-20:
; PG$SFJ - SECTION IS MAPPED TO ANOTHER FORK OR JFN
; PG$FRK - FORK/JFN MAPPED TO
REP 28/285 ;16C313
MOVX TT,PG$EXI ;[603] NO EXPLICIT TEST YET ON -10
POPJ P, ;[603] SO JUST SAY IT EXISTS
WIT
LSH TT,PG2WRD ;[630] MAKE SECTION # INTO PAGE #
HRLI TT,.PAGCA ;[630] CHECK ACCESS
PAGE. TT, ;[630] DO IT
MOVX TT,PG$SXI ;[630] CAN'T? RETURN NOTHING
TXC TT,PG$SXI ;[630] -10 RETURNS "DOES NOT EXIST" BIT
ANDX TT,PG$SXI!PG$SMA!PG$SIN!PG$SEC ;[630] ONLY SECTION-RELATED BITS
POPJ P, ;[630] DONE
REP 43/285 ;16C314
TXZ T2,SM%IND ;[603] FORGET INDIRECTION
AOJE T1,CHKSE8 ;[603] NO MAPPING? NO ACCESS
SOSN T1 ;[603] PRIVATE MAPPING?
TXO T2,PG$PRV ;[603] YES, SO INDICATE
SKIPA TT,T2 ;[603] RETURN ACCESS IN TT
WIT
AOJE T1,CHKSE8 ;[603] NO MAPPING? NO ACCESS
SOSN T1 ;[603] PRIVATE MAPPING?
JRST [ TXO T2,PG$PRV ;[630] YES, FLAG IT
JRST CHKSE7] ;[630] NOTHING ELSE TO CHECK
TXO T2,PG$SMA ;[630] SECTION IS MAPPED SOMEWHERE
DPB T1,[POINTR T2,PG$SEC] ;[630] REMEMBER WHERE TO
HLRZS T1 ;[630] GET FORK/JFN
CAIN T1,.FHSLF ;[630] IS IT US?
JRST CHKSE7 ;[630] YES, ALL DONE
TXO T2,PG$SFJ ;[630] NO, FLAG MORE INFO
HRRM T1,T2 ;[630] AND SAVE THE INFO
CHKSE7: SKIPA TT,T2 ;[630] RETURN ACCESS IN TT
INS 18/286 ;16C315
SETZ TT, ;[630] CLEAR RETURN ACCESS BITS
INS 52/286 ;16C316
MOVX TT,PG$SMA!PG$SIN ;[630] REMEMBER IT WAS INDIRECT
REP 56/286 ;16C317
CHKSC6: TXO S,PTPUB ;[603] SHARED POINTERS MEAN SHARED ACCESS
CHKSC7: MOVX TT,PG$EXI!PG$REA!PG$EXE ;[603] ALL SECTIONS HAVE THIS ACCESS
TXNE S,PTPUB ;[603] IS SECTION PUBLIC?
WIT
CHKSC6: TXO TT,PG$SMA ;[630][603] SHARED POINTERS MEAN MAPPED
IFN FTDEC10,< ;[630]
CHKSC7: TXOA TT,PG$SXI ;[630] -10 ONLY CARES ABOUT EXISTENCE
> ;END IFN FTDEC10
IFN FTDEC20,< ;[630]
CHKSC7: TXNE S,PTPUB ;[603] IS SECTION PUBLIC?
REP 63/286 ;16C318
CAIA ;[603] PRESERVE ACCESS
WIT
TXOA TT,PG$SXI!PG$REA!PG$EXE ;[630] ALL SECTIONS HAVE THIS ACCESS
> ;END IFN FTDEC20
REP 18/288 ;16C319
;USES TT1, ALL OTHER ACS PRESERVED.
WIT
;USES TT1, TT2, ALL OTHER ACS PRESERVED.
INS 28/288 ;16C320
SKPNS0 ;[630] IN NON-ZERO SECTION?
TDNN R,S0PLIM ;[630] NO, ADDRESS MUST BE .LT. THIS
TLNE R,770000 ;[630] MUST ALWAYS BE .LT. 2**30
JRST CHKAD4 ;[630] NO WAY
REP 32/288 ;16C321
SKPNS0 ;IN NON-ZERO SECTION?
TLNN R,-1 ;NO, ADDRESS MUST BE .LT. 2**18
TLNE R,770000 ;MUST ALWAYS BE .LT. 2**30
JRST CHKAD4 ;NO WAY
MOVE TT,R ;ADDRESS
IORI TT,PAGMSK ;ROUND TO BOTTOM OF PAGE
WIT
;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE
MOVE TT,R ;ADDRESS
REP 65/288 ;16C322
CHKAD4: MOVX TT,PG$EXI ;[623] NO ACCESS (PAGE DOES NOT EXIST)
CHKAD6: TXCA TT,PG$EXI ;PAGE. RETURNS COMPLIMENT OF EXISTENCE
WIT
CHKAD4: MOVX TT,PG$EXI!PG$SXI ;[630][623] NO ACCESS (PAGE/SEC DOES NOT EXIST)
CHKAD6: MOVEM TT,LASTAF ;[664] SAVE FULL AC FOR THOSE WHO CARE
HLLZS TT ;[630] IGNORE RH FIELDS
TXCA TT,PG$EXI!PG$SXI ;[630] PAGE. RETURNS COMPLEMENT OF EXISTENCE
INS 9/289 ;16C323
SETZ TT, ;[630] INITIALLY NO ACCESS
SKPNS0 ;[630] IN NON-ZERO SECTION?
TLNN R,-1 ;[630] NO, ADDRESS MUST BE .LT. 2**18
TLNE R,770000 ;[630] ADDRESS MUST AWAYS BE .LT. 2**30
JRST CHKAD8 ;[630] NO WAY
DEL 13/289 ;16C324
SETZ TT, ;INITIALLY NO ACCESS
SKPNS0 ;IN NON-ZERO SECTION?
TLNN R,-1 ;NO, ADDRESS MUST BE .LT. 2**18
TLNE R,770000 ;ADDRESS MUST AWAYS BE .LT. 2**30
JRST CHKAD8 ;NO WAY
INS 9/292 ;16C325
JSP TT2,PZAFI ;[630] EXECUTE NEXT INSTR IN NON-0 SEC
REP 28/292 ;16C326
PUSH P,TT2 ;[563] AS ADVERTISED
WIT
;[634] PUSH P,TT2 ;[563] AS ADVERTISED
REP 41/292 ;16C327
SKIP @R ;[435] REFERENCE MEMORY
SKPNS0 ;RESTRICTED TO SECTION 0 ADDRESSING?
TLNN R,-1 ;YES, MUST BE .LE. 777777
WIT
JSP TT2,PZAFI ;[630] SNEAK INTO NZS AS NEEDED FOR REF
SKIP @R ;[435] REFERENCE MEMORY
REP 52/292 ;16C328
POP P,TT2 ;[563] AND RESTORE AC
WIT
;[634] POP P,TT2 ;[563] AND RESTORE AC
INS 1/312 ;16C329
;PCAFI -- ROUTINE TO SUPPRESS ADDRESS BREAK
;PZAFI -- ROUTINE TO SUPPRESS ADDRESS BREAK, HANDLING NZS REFERENCES
;CALL IS:
;
; JSP TT2,PCAFI/PZAFI
; INSTR
;
;THIS ROUTINE WILL RETURN TO "INSTR" WITH ADDRESS BREAK INHIBIT SET
;SO THAT THE INSTRUCTION WILL NOT CAUSE AN ADDRESS BREAK.
;
;IF PZAFI IS CALLED IN SECTION ZERO, AND AC "R" REFERENCES A NON-ZERO
;ADDRESS, IT WILL PUT <INSTR> INTO THE SECTION 1 ACS TO BE EXECUTED.
;
;USED PRIMARILY BY FETCH AND STORE LOGIC.
;
;REGISTER R IS PRESUMED TO CONTAIN THE ADDRESS TO BE REFERENCED.
;
;<INSTR> MAY ***NOT*** REFERENCE TT1, TT2, OR TT3, NOR MAY IT EVER SKIP!!
;
;DESTROYS TT1, TT2, TT3
PZAFI: TLNE R,-1 ;NON-ZERO-SECTION ADDRESS?
SKPS0 ;AND LOOKING FROM SECTION ZERO?
PJRST PCAFI ;NO, PRETEND WE'RE <JSP TT2,PCAFI>
XSFM TT1 ;GET CURRENT PC FLAGS/PCS/ETC.
TXO TT1,PC$AFI ;SET ADDRESS-FAIL-INHIBIT PC FLAG
MOVEM TT1,NZSXJF ;SET XJRSTF PC FLAGS
MOVE TT1,[1,,TT1] ;SECTION-1 PC (IN THE ACS)
MOVEM TT1,NZSXJF+1 ;SET XJRSTF PC ADDRESS
MOVE TT1,0(TT2) ;FETCH <INSTR> TO BE EXECUTED IN NZS SPACE
HRRZI TT3,1(TT2) ;SET INCREMENTED (SECTION-0) RETURN ADDRESS
MOVE TT2,[XJRST TT3] ;SET UP RETURN INSTRUCTION
XJRSTF NZSXJF ;NOW JUMP INTO SECTION 1 ACS
PCAFI: SKPS0 ;IN NON-ZERO SECTION?
JRST PCAFI1 ;YES, DIFFERENT CODE
TXO TT2,PC$AFI ;SET ADDRESS FAILURE INHIBIT
JRSTF (TT2) ;AND RETURN ALLOWING ONE INSTRUCTION TO
; EXECUTE FREE OF ADDRESS BREAK
PCAFI1: XSFM TT1 ;MUST EXPLICITLY READ PC FLAGS
TXO TT1,PC$AFI ;SET ADDRESS FAILURE INHIBIT
XJRSTF TT1 ;AND RETURN ALLOWING ONE INSTRUCTION TO
; EXECUTE FREE OF ADDRESS BREAK
INS 1/335 ;16C330
;LISCK -- SUBROUTINE USED BY $$X, $W, AND $Z TO CHECK FOR INPUT
;CALL IS:
;
; PUSHJ P,LISCK
; NOTHING TYPED
; SOMETHING TYPED, ABORT
; "?" TYPED, GIVE STATUS
;
;USES AC T, TT2.
LISCK: PUSHJ P,LISTEN ;ANYTHING TYPED?
POPJ P, ;NO, "NOTHING TYPED" RETURN
AOS (P) ;SOMETHING TYPED
CAIN T,"?" ;USER TYPE A "?" CHARACTER?
AOS (P) ;YES, "GIVE STATUS" RETURN
POPJ P, ;NO, "ABORT" RETURN
DEL 24/338 ;16C331
INS 19/344 ;16C332
;TSIXN AND TOCTW PART OF EDIT 656
;TSIXN -- SUBROUTINE TO TYPE A SIXBIT WORD
;CALL: MOVE W1, SIXBIT WORD
; PUSHJ P,TSIXN
; RETURN
;
;USES T AND W1
TSIXN: JUMPE W1,CPOPJ ;RETURN IF NOTHING TO PRINT
TSIXN1: LSHC T,6 ;GET A CHARACTER
ANDI T,77 ;STRIP OFF JUNK
ADDI T,40 ;CONVERT TO ASCII
PUSHJ P,TOUT ;PRINT IT
JUMPN W1,TSIXN1 ;LOOP IF MORE
POPJ P, ;ELSE RETURN
;TOCTW -- SUBROUTINE TO TYPE A OCTAL WORD
;CALL: MOVE W1, OCTAL WORD
; PUSHJ P,TOCTW
; RETURN
;
;USES T, W1, AND W2
TOCTW: IDIVI W1,10 ;DIVIDE
PUSH P,W2 ;SAVE REMAINDER
SKIPE W1 ;DONE?
PUSHJ P,TOCTW ;RECURSE
POP P,T ;GET A DIGIT
ADDI T,"0" ;MAKE ASCII
PJRST TOUT ;PRINT CHARACTER AND RETURN
REP 32/344 ;16C333
TSEP: MOVEI T,"/" ;[461] TYPE SLASH-TAB SEPARATOR
PUSHJ P,TOUT ;[461] FALL INTO TTAB
WIT
TSEP: MOVEI T,"/" ;TYPE SLASH-TAB SEPARATOR
PUSHJ P,TOUT ;FALL INTO TTAB
REP 20/352 ;16C334
CONI PAG,T ;GET PAGING BITS
SETZM KIPAG ;CLEAR FLAGS TO RESET THEM
SETZM KLPAG ; . . .
TXNN T,PGKLMD ;[450] KL-PAGING?
SETOM KIPAG ;NO
TXNE T,PGKLMD ;[450] KL-PAGING?
SETOM KLPAG ;YES
WIT
;[634] CONI PAG,T ;GET PAGING BITS
;[634] SETZM KIPAG ;CLEAR FLAGS TO RESET THEM
;[634] SETZM KLPAG ; . . .
;[634] TXNN T,PGKLMD ;[450] KL-PAGING?
;[634] SETOM KIPAG ;NO
;[634] TXNE T,PGKLMD ;[450] KL-PAGING?
;[634] SETOM KLPAG ;YES
INS 29/355 ;16C335
SETZM JOBEDV ;[651] DON'T KNOW ABOUT CPNDDT YET
REP 35/355 ;16C336
ADDI R,.EDCNT ;GET COUNT WORD
WIT
IFN .EDCNT,ADDI R,.EDCNT ;GET COUNT WORD
REP 42/355 ;16C337
IFN FTDEC10,< ;[430] HIDDEN SYMS ONLY ON -10
ADDI R,.EDHSB-.EDCNT ;POINT TO HIDDEN SYMBOL SWAP BLOCK
WIT
IFN FTDEC10,< ;[651] CPNDDT ONLY ON -10
CAILE T,.EDCPU ;[651] IF LONG ENOUGH FOR BREAKPOINT STUFF,
MOVEM R,JOBEDV ;[651] SAVE FOR LATER REFERENCING
>
IFN FTDEC10,< ;[430] HIDDEN SYMS ONLY ON -10
CAILE T,.EDLNK ;[662] IS IT LONG ENOUGH TO FIND THE RIGHT EDV?
SKPKLS ;[662] AND DO WE UNDERSTAND ITS PAGING WELL?
JRST TTYRR0 ;[662] NO, DON'T BOTHER TO TRY
TTYRR1: ADDI R,.EDEPT-.EDCNT ;[662] POINT TO EPT WORD
PUSHJ P,FETCHV ;[662] TRY TO GET IT
JRST TTYRE8 ;[662] SYMBOLS NOT HIDDEN IF BUM EDV
CONI PAG,S ;[662] GET EBR
ANDI S,17777 ;[662] MASK TO PHYSICAL PAGE NUMBER
LSH S,PG2WRD ;[662] CONVERT TO PHYSICAL ADDRESS
CAME S,T ;[662] DO THEY MATCH?
JRST TTYRR2 ;[662] NO, TRY TO FIND ANOTHER
SUBI R,.EDEPT-.EDCNT ;[662] YES, POINT TO START AGAIN
MOVEM R,JOBEDV ;[662] MAKE SURE IT'S SET UP FOR LATER
JRST TTYRR0 ;[662] WE GOT A GOOD ONE
TTYRR2: ADDI R,.EDLNK-.EDEPT ;[662] POINT TO LINK WORD
PUSHJ P,FETCHV ;[662] TRY TO GET POINTER TO NEXT
JRST TTYRE8 ;[662] NO HIDDEN SYMBOLS IF NO GOOD EDV
JUMPE T,TTYRE8 ;[662] NO HIDDEN SYMBOLS IF NO NEXT
CAMN T,JOBEDV ;[662] HAVE WE LOOPED ALL THE WAY AROUND?
JRST TTYRE8 ;[662] YES, CAN'T USE HIDDEN SYMBOLS
MOVE R,T ;[662] NO, START OVER WITH THIS EDV
JRST TTYRR1 ;[662] TRY AGAIN
TTYRR0: ADDI R,.EDHSB-.EDCNT ;[662] POINT TO HIDDEN SYMBOL SWAP BLOCK
REP 33/357 ;16C338
JRST TTYRE8 ;[461] NO, SKIP SECTION
PUSHJ P,FETCHV ;[430] YES, GET SECTION NO.
JRST TTYRE8 ;[461]
HLROM T,SYTLOC ;[461] SAVE SECTION
WIT
JRST TTYRE8 ;NO, SKIP SECTION
PUSHJ P,FETCHV ;[430] YES, GET SECTION NO.
JRST TTYRE8 ;[461]
HLROM T,SYTLOC ;SAVE SECTION
REP 16/358 ;16C339
MOVE T,TTEM1 ;[461] ADDRESS OF MONITOR'S BLOCK OR ZERO
SKIPE @ADRSPC ;HIT BREAKPOINT INSIDE OTHER COPY OF DDT
;WHILE THAT DDT WAS IN ALTERNATE SPACE?
SETZ T, ;[461] YES, WE WILL ALWAYS STAY IN SYMBOL SPACE
WIT
MOVE T,TTEM1 ;ADDRESS OF MONITOR'S BLOCK OR ZERO
SKIPE @ADRSPC ;HIT BREAKPOINT INSIDE OTHER COPY OF DDT
;WHILE THAT DDT WAS IN ALTERNATE SPACE?
SETZ T, ;YES, WE WILL ALWAYS STAY IN SYMBOL SPACE
REP 32/358 ;16C340
MOVE R,SECDDT ;[461] GET OUR SECTION
HLROM R,SYTLOC ;[461] TELL SYMCHK WHERE TO FIND SYMS
WIT
MOVE R,SECDDT ;GET OUR SECTION
HLROM R,SYTLOC ;TELL SYMCHK WHERE TO FIND SYMS
REP 8/360 ;16C341
IFN FTDEC10,< ;[430]
PUSHJ P,NORSPC ;GET BACK TO PROGRAM'S ADDRESS SPACE
> ;END IFN FTDEC10
WIT
IFN FTDEC10,<PUSHJ P,NORSPC> ;[430] GET BACK TO PROGRAM'S ADDRESS SPACE
REP 17/368 ;16C342
SKIPN JOBING ;/J AGAIN?
JRST DD1 ;NO, GO START THINGS OFF
SETZ TT, ;INITIALIZE JOB NUMBER
WIT
SKIPE JOBING ;[656] /J AGAIN?
JRST FDIJ0 ;[656] YES
PUSHJ P,FDINFO ;[656] PRINT INTERESTING MESSAGE
JRST FDIGO ;[656] GO FINISH UP
FDIJ0: SETZ TT, ;[656] INITIALIZE JOB NUMBER
REP 34/368 ;16C343
JRST DD1 ;GO START UP NOW
WIT
PUSHJ P,FDINFO ;[656] TYPE INTERESTING STUFF
JRST FDIGO ;[656] DONE
REP 7/370 ;16C344
PTHLEN,,PTHBLK] ;LEN,,ADR OF PATH BLOCK
WIT
PTHLEN,,PTHBLK ;LEN,,ADR OF PATH BLOCK
RFSLEN,,RFSBLK] ;[656] LEN,,ADR OF RETURNED FILESPEC BLOCK
DEL 10/373 ;16C345
INS 44/375 ;16C346
PUSHJ P,FDINFO ;[656] TYPE USEFUL INFO
REP 37/389 ;16C347
PUSHJ P,FETCH ;[461] GET HEADER OF NEXT SECTION
JRST BADEXE ;[461] BAD FORMAT
HLRZ TT,T ;[461] GET SECTION ID CODE
CAIE TT,.SVVEC ;[461] ENTRY VECTOR SECTION?
JRST FDIXL3 ;[461] NO, SEE IF PDV SECTION
WIT
PUSHJ P,FETCH ;GET HEADER OF NEXT SECTION
JRST BADEXE ;BAD FORMAT
HLRZ TT,T ;GET SECTION ID CODE
CAIE TT,.SVVEC ;ENTRY VECTOR SECTION?
JRST FDIXL3 ;NO, SEE IF PDV SECTION
REP 5/390 ;16C348
HRRZ TT,T ;[461] GET LENGTH OF THIS SECTION
CAIGE TT,3 ;[476] LONG ENOUGH TO HAVE AN ADDRESS?
JRST BADEXE ;[461] NO, BAD FORMAT
MOVEM TT,EVADR ;[476] TEMPORARILY SAVE LENGTH
ADDI R,1 ;[461] INCREMENT TO LENGTH WORD
PUSHJ P,FETCH ;[461] GET EV LENGTH
JRST BADEXE ;[461] BAD FORMAT
MOVEM T,EVLEN ;[461] HANG ON TO IT
ADDI R,1 ;[461] INCREMENT TO ADR WORD
PUSHJ P,FETCH ;[461] GRAB IT
JRST BADEXE ;[461] BAD FORMAT
EXCH T,EVADR ;[476] SAVE ADDRESS, GET BLOCK LENGTH
ADDI R,-2(T) ;[476] INCREMENT PAST END OF BLOCK
PUSHJ P,FETCH ;[461] GET NEXT HEADER WORD
JRST BADEXE ;[461] BAD FORMAT
HLRZ TT,T ;[461] GET ID CODE
WIT
HRRZ TT,T ;GET LENGTH OF THIS SECTION
CAIGE TT,3 ;[476] LONG ENOUGH TO HAVE AN ADDRESS?
JRST BADEXE ;NO, BAD FORMAT
MOVEM TT,EVADR ;[476] TEMPORARILY SAVE LENGTH
ADDI R,1 ;INCREMENT TO LENGTH WORD
PUSHJ P,FETCH ;GET EV LENGTH
JRST BADEXE ;BAD FORMAT
MOVEM T,EVLEN ;HANG ON TO IT
ADDI R,1 ;INCREMENT TO ADR WORD
PUSHJ P,FETCH ;GRAB IT
JRST BADEXE ;BAD FORMAT
EXCH T,EVADR ;[476] SAVE ADDRESS, GET BLOCK LENGTH
ADDI R,-2(T) ;[476] INCREMENT PAST END OF BLOCK
PUSHJ P,FETCH ;GET NEXT HEADER WORD
JRST BADEXE ;BAD FORMAT
HLRZ TT,T ;GET ID CODE
REP 24/390 ;16C349
FDIXL3: CAIE TT,.SVPDV ;[461] PDV SECTION?
JRST FDIXL9 ;[461] NO, QUIT
HRRZI W,-1(T) ;[461] GET # PDVS
MOVEM W,PDVNUM ;[461] STORE WHERE SYMCHK CAN FIND IT
MOVE T,.JBFF ;[461] GET ADDRESS OF PDV LIST
ADDB W,.JBFF ;[461] MAKE SPACE FOR IT
CAMG W,.JBREL ;[461] ENOUGH ROOM?
JRST FDIXL4 ;[461] YES, GO ON
IFN FTDEC10,<
CORE W,> ;[461] MAKE MORE ROOM?
JRST [ TMSG <? Insufficient memory to read PDV list>
JRST FDEERR] ;[461] NO MORE ROOM
FDIXL4: HRLI T,(IFIW (W2)) ;[461] MAKE A POINTER TO PDV LIST
MOVEM T,PDVTBL ;[461] PUT IT WHERE IT'S NEEDED
MOVN W2,PDVNUM ;[461] GET NEG NUM PDVS
HRLZ W2,W2 ;[461] MAKE AOBJN POINTER
FDIXL5: ADDI R,1 ;[461] POINT R AT NEXT PDVA
PUSHJ P,FETCH ;[461] GRAB ONE
JRST BADEXE ;[461] BAD FORMAT
MOVEM T,@PDVTBL ;[461] STORE IN THE LIST
AOBJN W2,FDIXL5 ;[461] GO FOR ANOTHER
FDIXL9: SETOM EXEFMT ;[461] FLAG TO USE EXE FORMAT MAPPING
WIT
FDIXL3: CAIE TT,.SVPDV ;PDV SECTION?
JRST FDIXL9 ;NO, QUIT
HRRZI W,-1(T) ;GET # PDVS
MOVEM W,PDVNUM ;STORE WHERE SYMCHK CAN FIND IT
MOVE T,.JBFF ;GET ADDRESS OF PDV LIST
ADDB W,.JBFF ;MAKE SPACE FOR IT
CAMG W,.JBREL ;ENOUGH ROOM?
JRST FDIXL4 ;YES, GO ON
IFN FTDEC10,<
CORE W,> ;MAKE MORE ROOM?
JRST [ TMSG <? Insufficient memory to read PDV list>
JRST FDEERR] ;NO MORE ROOM
FDIXL4: HRLI T,(IFIW (W2)) ;MAKE A POINTER TO PDV LIST
MOVEM T,PDVTBL ;PUT IT WHERE IT'S NEEDED
MOVN W2,PDVNUM ;GET NEG NUM PDVS
HRLZ W2,W2 ;MAKE AOBJN POINTER
FDIXL5: ADDI R,1 ;POINT R AT NEXT PDVA
PUSHJ P,FETCH ;GRAB ONE
JRST BADEXE ;BAD FORMAT
MOVEM T,@PDVTBL ;STORE IN THE LIST
AOBJN W2,FDIXL5 ;GO FOR ANOTHER
FDIXL9: SETOM EXEFMT ;FLAG TO USE EXE FORMAT MAPPING
INS 11/391 ;16C350
MOVEM TT,DSKCHA ;[656] SAVE CONTENTS OF AC
REP 44/391 ;16C351
> ;END OF IFN FTDEC10
WIT
;STILL IN IFN FTFILE AND FTDEC10
TYPSTR: LDB T,[POINTR (DSKCHA,DC.TYP)] ;[656] GET TYPE FIELD
MOVEI W1,[ASCIZ /structure /]
CAIE T,.DCTFS ;[656] CHECK FOR IT
MOVEI W1,[ASCIZ /unit /]
PUSHJ P,TSTRG ;[656] PRINT TEXT
MOVE W1,FLPBLK+.FODEV ;[656] DEVICE NAME
PJRST TSIXN ;[656] PRINT IT AND RETURN
> ;END OF IFN FTDEC10
REP 8/396 ;16C352
FDISET: SKIPN FILING ;LOOKING AT MONITOR/MEMORY?
WIT
FDISET: PUSHJ P,FDINFO ;[656] TYPE USEFUL INFO
SKIPN FILING ;[656] LOOKING AT MONITOR/MEMORY?
REP 35/396 ;16C353
SKIPE SYMP+S$ADR ;[461] NO /S. DO WE ALREADY HAVE SYMBOLS
WIT
SKIPE SYMP+S$ADR ;NO /S. DO WE ALREADY HAVE SYMBOLS
REP 40/396 ;16C354
FDISY: SETZM SYTLOC ;[461] 0$5M
WIT
FDISY: SETZM SYTLOC ;0$5M
INS 6/397 ;16C355
IFN FTDEC10&FTPAGM,< ;[652] ONLY DO THIS FOR A -10 WITH PAGING
MOVEI R,.JBEDV ;[652] JOBDAT POINTER TO THE EDV
PUSHJ P,FETCHP ;[652] TRY TO READ IT
JRST FDIAC1 ;[652] DO OLD WAY IF CAN'T
JUMPE T,FDIAC1 ;[652] OR IF NOT THERE
MOVE R,T ;[652] COPY THE POINTER
IFN .EDCNT,<ADDI R,.EDCNT> ;[652] POINT TO THE COUNT WORD (0)
PUSHJ P,FETCHP ;[652] FETCH IT
JRST FDIAC1 ;[652] GIVE UP ON IT IF CAN'T
TLC T,'EDV' ;[652] CHECK BITS
TLNN T,-1 ;[652] MUST HAVE 'EDV' IN LH
CAIG T,.EDCAC ;[652] AND BE LONG ENOUGH
JRST FDIAC1 ;[652] NO OR NO, GO BACK TO THE OLD WAY
ADDI R,.EDDAT-.EDCNT ;[652] YES, POINT TO DATA WORD
PUSHJ P,FETCHP ;[652] READ IT
JRST FDIAC1 ;[652] GIVE UP IF CAN'T
SKIPN S,T ;[652] COPY TO A SAFER PLACE
JRST FDIAC1 ;[652] MUST BE NON-ZERO
ADDI R,.EDEPT-.EDDAT ;[652] POINT TO EPT ADDRESS WORD
PUSHJ P,FETCHP ;[652] GET PHYSICAL ADDRESS OF THE EPT
JRST FDIAC1 ;[652] GIVE UP IF CAN'T
MOVE W2,T ;[652] PRESERVE FOR LATER
ADDI R,.EDSPT-.EDEPT ;[652] POINT TO SPT ADDRESS WORD
PUSHJ P,FETCHP ;[652] GET PHYSICAL BASE ADDRESS OF SPT
JRST FDIAC1 ;[652] WORD MUST BE THERE
MOVE W1,T ;[652] COPY FOR LATER
TXNE S,ED.KLP ;[652] IF KL PAGING IN USE,
JUMPE T,FDIAC1 ;[652] DEMAND A REAL SPT
ADDI R,.EDCST-.EDSPT ;[652] POINT TO CST BASE WORD
PUSHJ P,FETCHP ;[652] GET PHYSICAL BASE ADDRESS OF CST
JRST FDIAC1 ;[652] WORD MUST BE THERE
MOVE W,T ;[652] COPY FOR LATER
ADDI R,.EDCAC-.EDCST ;[652] POINT TO CRASH AC POINTERS WORD
PUSHJ P,FETCHP ;[652] GET ADDR OF ADDR OF CRASH ACS
JRST FDIAC1 ;[652] WORD MUST BE THERE
SKIPN R,T ;[652] COPY POINTER
JRST FDIAC1 ;[652] MUST POINT TO CORE
PUSHJ P,FETCHP ;[652] FETCH ADDRESS OF SAVED ACS
JRST FDIAC1 ;[652] WORD MUST BE LEGIT
SKIPN R,T ;[652] SAVE POINTER AWAY
JRST FDIAC1 ;[652] MUST POINT TO CORE
LSH W2,WRD2PG ;[652] CONVERT EPT ADDRESS TO PAGE NUMBER
MOVEM W2,MAPPG ;[652] SAVE AS IF FROM $U
MOVEM W1,SPTWRD ;[652] SIMILARLY FOR SPT BASE
MOVEM W,CSTWRD ;[652] AND FOR CST BASE
MOVE W,S ;[652] COPY .EDDAT WORD
PUSHJ P,SETKZC ;[652] CLEAR OUT CPU TYPE FLAGS
HRRZ T,W ;[652] GET CPU TYPE CODE
CAIL T,.CCKAX ;[652] MUST BE AT LEAST A KA
CAILE T,.CCKSX ;[652] AND NOT BEYOND A KS
CAIA ;[652] NO, DON'T STORE IT
SETOM KAFLG-.CCKAX(T) ;[652] YES, SET CPU TYPE
MOVE T,KLFLG ;[652] IF A KL
IOR T,KSFLG ;[652] OR A KS
MOVEM T,KLSFLG ;[652] LIGHT THE EITHER/OR FLAG
SETZ W1, ;[652] ASSUME KL PAGING
SETO W2, ;[652] NOT KI PAGING
TXNN W,ED.KLP ;[652] VALID ASSUMPTION?
EXCH W1,W2 ;[652] NO, SWAP FLAGS
PUSHJ P,SETKXP ;[652] SET UP PAGING FLAGS
AOS MAPFN ;[652] FINISH UP THE $0U COMMAND
PUSHJ P,FETCHP ;[652] VALIDATE START
JRST FDIAC0 ;[652] NO, GIVE UP
ADDI R,17 ;[652] YES, POINT TO END
PUSHJ P,FETCHP ;[652] VALIDATE THAT
JRST FDIAC0 ;[652] NO, GIVE UP
SUBI R,17 ;[652] YES, BACK UP TO BASE OF BLOCK
PUSHJ P,SETCA1 ;[652] EMULATE $5U COMMAND
TMSG <[Paging and ACs set up from the Exec Data Vector]
> ;[652] TELL WHAT WE JUST DID
JRST FDIAC4 ;[652] FINISH UP WITH THIS
FDIAC0: SETZM MAPFN ;[652] TURN OFF PAGING AGAIN
FDIAC1:
> ;[652] END IFN FTDEC10&FTPAGM
INS 30/397 ;16C356
IFN FTDEC10&FTPAGM,< ;[652] ONLY NEED THIS FOR -10
SETZM LLOCS ;[652] BACK TO NORMAL STARTING SECTION
> ;[652] END OF IFN FTDEC10&FTPAGM
INS 37/397 ;16C357
FDIGO: JRST DD1 ;[656] GO START DDT
REP 3/398 ;16C358
FDIGO:
IFN FTDEC20,<
TMSG <[Looking at > ;HEADER OF MESSAGE
SKIPN PHYSIO ;PHYSICAL I/O?
JRST FDIGO2 ;NO
PUSHJ P,TYPSTR ;YES, TYPE WHAT WE'RE LOOKING AT
JRST FDIGO6 ;END THE LINE AND START DDT
FDIGO2: SKIPN FILING ;LOOKING AT A DISK FILE
JRST FDIGO4 ;NO
TMSG <file > ;YES, SAY IT'S A FILE
HRROI T1,NAMBUF ;POINT TO THE FILE SPEC
PSOUT% ;TYPE IT TOO
JRST FDIGO6 ;END LINE
FDIGO4: TMSG <the running monitor> ;ONLY POSSIBILITY LEFT
FDIGO6: TMSG <]
> ;END THE LINE
> ;END IFN FTDEC20
JRST DD1 ;GO START DDT
WIT
FDINFO: MOVEI W1,[ASCIZ /[Looking at /]
SKIPE SYMGET ;[656] /S SPECIFIED?
MOVEI W1,[ASCIZ /[Extracting symbols from /]
SKIPE FDIFSW ;[656] /F TYPED?
MOVEI W1,[ASCIZ /[Examining /]
SKIPE PATCHS ;[656] PATCHING?
MOVEI W1,[ASCIZ /[Patching /]
PUSHJ P,TSTRG ;[656] PRINT TEXT
SKIPN PHYSIO ;[656] PHYSICAL I/O?
JRST FDINF1 ;[656] NO
PUSHJ P,TYPSTR ;[656] TYPE STRUCTURE OR UNIT
JRST FDINF4 ;[656] END THE LINE AND START DDT
FDINF1: SKIPN FILING ;[656] LOOKING AT A DISK FILE
JRST FDINF2 ;[656] NO
TMSG <file > ;[656] YES, SAY IT'S A FILE
IFN FTDEC10,<
MOVEI TT,FLPBLK ;[656] POINT TO FILOP BLOCK
PUSHJ P,TYPFIL ;[656] PRINT FILESPEC
> ;END IFN FTDEC10
IFN FTDEC20,<
HRROI T1,NAMBUF ;[656] POINT TO THE FILE SPEC
PSOUT% ;[656] TYPE IT
> ;END IFN FTDEC20
JRST FDINF4 ;[656] END LINE
FDINF2:
IFN FTDEC10,<
SKIPN A,JOBING ;[656] /J?
JRST FDINF3 ;[656] NO
TMSG <job > ;[656] LOOKING AT A JOB
PUSHJ P,FP7 ;[656] TYPE IN DECIMAL
JRST FDINF4 ;[656] ALMOST DONE
> ;END IFN FTDEC10
FDINF3: TMSG <the running monitor> ;[656] ONLY POSSIBILITY LEFT
FDINF4: TMSG <]
> ;[656] END THE LINE
POPJ P, ;[656] RETURN
REP 6/400 ;16C359
SETZM SYMVAL ;[461] SYMBOLS NOT KNOWN YET
PUSHJ P,SYMCHK ;[461] LOCATE AND VERIFY SYMBOL TABLE POINTERS
MOVE T,[SYMP,,FOSPTR] ;[461] SAVE DEFINED SYMBOL BLOCK
BLT T,FOSPTR+S$SIZ-1 ;[461] FOR CLSFIL
MOVE T,[USYMP,,FOUPTR] ;[461] UNDEFINED BLOCK TOO
BLT T,FOUPTR+S$SIZ-1 ;[461] SAVE FOR CLSFIL
MOVE T,[HSYMP,,FOHPTR] ;[461] AND THE HISEG POINTER
BLT T,FOHPTR+S$SIZ-1 ;[461] CLSFIL NEEDS THEM ALL
WIT
SETZM SYMVAL ;SYMBOLS NOT KNOWN YET
PUSHJ P,SYMCHK ;LOCATE AND VERIFY SYMBOL TABLE POINTERS
MOVE T,[SYMP,,FOSPTR] ;SAVE DEFINED SYMBOL BLOCK
BLT T,FOSPTR+S$SIZ-1 ; FOR CLSFIL
MOVE T,[USYMP,,FOUPTR] ;UNDEFINED BLOCK TOO
BLT T,FOUPTR+S$SIZ-1 ;SAVE FOR CLSFIL
MOVE T,[HSYMP,,FOHPTR] ;AND THE HISEG POINTER
BLT T,FOHPTR+S$SIZ-1 ;CLSFIL NEEDS THEM ALL
REP 17/400 ;16C360
MOVE W,SYMP+S$LEN ;[461] COUNT CORE NEEDED
ADD W,USYMP+S$LEN ;[461] FOR ALL TABLES
ADD W,HSYMP+S$LEN ;[461] WHEN SYMBOLS COPIED
MOVE T,W ;[461] COPY SIZE
WIT
MOVE W,SYMP+S$LEN ;COUNT CORE NEEDED
ADD W,USYMP+S$LEN ;FOR ALL TABLES
ADD W,HSYMP+S$LEN ;WHEN SYMBOLS COPIED
MOVE T,W ;COPY SIZE
REP 38/400 ;16C361
SYMFI4: MOVE R,USYMP+S$ADR ;[461] GET USY ADDRESS
MOVEM W1,USYMP+S$ADR ;[461] SAVE FILDDT ADDRESS
SKIPN W2,USYMP+S$LEN ;[461] IS THERE A TABLE TO COPY?
JRST SYMCPY ;[461] NO, SKIP THIS
UCOPY: PUSHJ P,FETCH ;[461] READ ANOTHER SYMBOL WORD
WIT
SYMFI4: MOVE R,USYMP+S$ADR ;GET USY ADDRESS
MOVEM W1,USYMP+S$ADR ;SAVE FILDDT ADDRESS
SKIPN W2,USYMP+S$LEN ;IS THERE A TABLE TO COPY?
JRST SYMCPY ;NO, SKIP THIS
UCOPY: PUSHJ P,FETCH ;READ ANOTHER SYMBOL WORD
REP 5/401 ;16C362
SYMCPY: MOVE R,SYMP+S$ADR ;[461] WHEREABOUTS OF MONITOR SYMBOLS
MOVEM W1,SYMP+S$ADR ;[461] NOW POINT TO FILDDT SYMBOLS
SKIPN W2,SYMP+S$LEN ;[461] GET LENGTH
JRST HSYCPY ;[461] IF NO TABLE, GO CHECK HI SEG
TCOPY: PUSHJ P,FETCH ;[461] GET A WORD
WIT
SYMCPY: MOVE R,SYMP+S$ADR ;WHEREABOUTS OF MONITOR SYMBOLS
MOVEM W1,SYMP+S$ADR ;NOW POINT TO FILDDT SYMBOLS
SKIPN W2,SYMP+S$LEN ;GET LENGTH
JRST HSYCPY ;IF NO TABLE, GO CHECK HI SEG
TCOPY: PUSHJ P,FETCH ;GET A WORD
REP 16/401 ;16C363
HSYCPY: MOVE R,HSYMP+S$ADR ;[461] FILE'S HISEG SYMBOLS
MOVEM W1,HSYMP+S$ADR ;[461] POINT HSYMP TO FILDDT'S COPY
SKIPN W2,HSYMP+S$LEN ;[461] GET LENGTH
JRST SYMFIN ;[461] DONE IF NONE TO COPY
HCOPY: PUSHJ P,FETCH ;[461] GET NEXT WORD OF SYMBOL TABLE
WIT
HSYCPY: MOVE R,HSYMP+S$ADR ;FILE'S HISEG SYMBOLS
MOVEM W1,HSYMP+S$ADR ;POINT HSYMP TO FILDDT'S COPY
SKIPN W2,HSYMP+S$LEN ;GET LENGTH
JRST SYMFIN ;DONE IF NONE TO COPY
HCOPY: PUSHJ P,FETCH ;GET NEXT WORD OF SYMBOL TABLE
REP 24/401 ;16C364
AOS R ;[461] AND FILE'S POINTER
SOJG W2,HCOPY ;[461] LOOP THROUGH ALL SYMBOLS
SYMFIN: SETOM SYMGOT ;FLAG IN-CORE SYMBOLS ARE FROM THIS FILE
SETZM CHGSFL ;[461] AND HAVEN'T BEEN CHANGED YET
IFN FTDEC20,<
WIT
AOS R ;AND FILE'S POINTER
SOJG W2,HCOPY ;LOOP THROUGH ALL SYMBOLS
SYMFIN: SETOM SYMGOT ;FLAG IN-CORE SYMBOLS ARE FROM THIS FILE
SETZM CHGSFL ;AND HAVEN'T BEEN CHANGED YET
DEL 36/401 ;16C365
> ;END IFN FTDEC20
DEL 1/402 ;16C366
REP 9/403 ;16C367
PUSHJ P,WRTSYM ;[461] COPY SYMBOLS BACK IF NEEDED
WIT
PUSHJ P,WRTSYM ;COPY SYMBOLS BACK IF NEEDED
REP 5/404 ;16C368
WRTSYM: SKIPN CHGSFL ;[461] SEE IF SYMBOL TABLE CHANGED
POPJ P, ;[461] NO, DON'T COPY ANYTHING
SKIPE SYMGOT ;YES, DID IT COME FROM ANOTHER FILE?
SKIPE PHYSIO ;OR ARE WE DOING PHYSICAL I/O?
POPJ P, ;[461] YES TO EITHER, NO RE-WRITING SYM TAB
WIT
WRTSYM: SKIPN CHGSFL ;SEE IF SYMBOL TABLE CHANGED
POPJ P, ;NO, DON'T COPY ANYTHING
;RDH SKIPE SYMGOT ;YES, DID IT COME FROM ANOTHER FILE?
SKIPE PHYSIO ;OR ARE WE DOING PHYSICAL I/O?
POPJ P, ;YES TO EITHER, NO RE-WRITING SYM TAB
REP 15/404 ;16C369
SKIPL SYTLOC ;[461] ORIGINALLY JOBDAT?
JRST [ XMOVEI W,SYMP ;[461] GET DEFINED POINTER BLOCK
PUSHJ P,ORGSYM ;[461] CHECK IF ORIGINAL POINTERS THERE
JRST SCPERR ;[461] NOPE, ABORT
XMOVEI W,USYMP ;[461] TRY UNDEFINED BLOCK
PUSHJ P,ORGSYM ;[461] STILL THERE?
JRST SCPERR ;[461] NO, ABORT
JRST CLSFI1] ;[461] ALL GOOD, WRITE SYMS OUT
HRL R,SYTLOC ;[461] YES, GET JOBDAT SECTION
HRRI R,.JBSYM ;[461] RE-FETCH FILE'S .JBSYM
PUSHJ P,FETCH ;[461] GET FROM THE FILE
SETCM T,FOSPTR+S$OPT ;[461] NOT THERE? MAKE SURE COMPARE FAILS
CAME T,FOSPTR+S$OPT ;[461] SAME AS WHEN SYMS WERE COPIED?
JRST SCPERR ;[461] NO, USER DEPOSITED .JBSYM -- ABORT
HRRI R,.JBUSY ;[461] POINT TO FILE'S .JBUSY
PUSHJ P,FETCH ;[461] FROM FILE
SETCM T,FOUPTR+S$OPT ;[461] DIDN'T MAKE IT
CAME T,FOUPTR+S$OPT ;[461] STILL THE SAME AS BEFORE?
JRST SCPERR ;[461] NO, ABORT
SKIPN FOHPTR+S$ADR ;[461] WAS THERE A HISEG POINTER?
JRST CLSFI1 ;[461] NO, DON'T CHECK IT
MOVEI R,.JBHSM ;[461] NOW TRY FOR HISEG TABLE
PUSHJ P,HFETCH ;[461] FETCH FROM HISEG
SETCM T,FOHPTR+S$OPT ;[461] FAILED?
CAME T,FOHPTR+S$OPT ;[461] CHANGED?
JRST SCPERR ;[461] YES, DON'T COPY ANYTHING
MOVE T,FOHPTR+S$LEN ;[461] GET ORIG LENGTH
CAME T,HSYMP+S$LEN ;[461] SAME AS FILDDT'S COUNT?
JUMPN T,SCPERR ;[461] MUST AGREE, SINCE NO ROOM FOR PATCHING
WIT
XMOVEI W,SYMP ;MASTER SYMBOL TABLE POINTER BLOCK
SKIPG SYTLOC ;PDV OR JOBDAT BASIS?
SKIPL S$SUF(W) ;JOBDAT, POINTING TO VECTOR SUBTABLE?
JRST WRTSY2 ;SYMBOL-TABLE-VECTOR-SUBTABLE STYLE
;ORIGINAL SYMBOL TABLE POINTER WERE IOWD-STYLE FROM .JBSYM/.JBUSY
HRL R,SYTLOC ;GET JOBDAT SECTION
HRRI R,.JBSYM ;RE-FETCH FILE'S .JBSYM
PUSHJ P,FETCH ;GET FROM THE FILE
JRST SCPERR ;NOT THERE? CAN'T UPDATE IT THEN
CAME T,FOSPTR+S$OPT ;SAME AS WHEN SYMS WERE COPIED?
JRST SCPERR ;NO, USER DEPOSITED .JBSYM -- ABORT
HRRI R,.JBUSY ;POINT TO FILE'S .JBUSY
PUSHJ P,FETCH ;FROM FILE
JRST SCPERR ;DIDN'T MAKE IT
CAME T,FOUPTR+S$OPT ;STILL THE SAME AS BEFORE?
JRST SCPERR ;NO, ABORT
JRST WRTSY4 ;CHECK HISEG SYMBOL TABLE
;ORIGINAL SYMBOL TABLE POINTERS WERE IN SYMBOL TABLE VECTOR SUBTABLES,
;EITHER ADDRESSED INDIRECTLY BY A PDV OR DIRECTLY BY .JBSYM.
WRTSY2: PUSHJ P,ORGSYM ;CHECK IF ORIGINAL POINTERS THERE
JRST SCPERR ;NOPE, ABORT
XMOVEI W,USYMP ;TRY UNDEFINED BLOCK
PUSHJ P,ORGSYM ;STILL THERE?
JRST SCPERR ;NO, ABORT
;FALL THROUGH TO CHECK HISEG SYMTAB, IF ANY
;NOW CHECK OUT HISEG SYMBOL TABLE, IF ANY
WRTSY4: SKIPN FOHPTR+S$ADR ;WAS THERE A HISEG POINTER?
JRST CLSFI1 ;NO, DON'T CHECK IT
XMOVEI W,HSYMP ;HISEG SYMBOL TABLE POINTER BLOCK
SKIPL S$SUF(W) ;IOWD OR VECTOR SUBTABLE FORMAT?
JRST [PUSHJ P,ORGSYM ;VECTOR SUBTABLE, STILL THERE?
JRST SCPERR ;NOPE, CAN'T UPDATE
JRST WRTSY6] ;YUP, LOOKS GOOD SO FAR
HRLZ R,SYTLOC ;GET JOBDAT SECTION
HRRI R,.JBHSM ;NOW TRY FOR HISEG TABLE
PUSHJ P,HFETCH ;FETCH FROM HISEG
JRST SCPERR ;FAILED?
CAME T,FOHPTR+S$OPT ;CHANGED?
JRST SCPERR ;YES, DON'T COPY ANYTHING
WRTSY6: MOVE T,FOHPTR+S$LEN ;GET ORIG LENGTH
CAME T,HSYMP+S$LEN ;SAME AS FILDDT'S COUNT?
JUMPN T,SCPERR ;MUST AGREE, SINCE NO ROOM FOR PATCHING
REP 8/405 ;16C370
CLSFI1: MOVE T,FOSPTR+S$LEN ;[461] OLD LENGTH
SUB T,SYMP+S$LEN ;[461] GET -DIFFERENCE
ADDM T,FOSPTR+S$ADR ;[461] UPDATE ADDRESS OF FILE'S TABLE
SKIPG SYTLOC ;[461] JOBDAT POINTERS?
JRST [ MOVN T,T ;[461] YES, GET POS DIFFERENCE
HRL T,T ;[461] FORM N,,N
EXCH T,SYMP+S$OPT ;[461] GET OPERANDS IN ORDER FOR SUB
SUBB T,SYMP+S$OPT ;[461] BACK .JBSYM INTO PATCH SPACE
MOVN S,USYMP+S$LEN ;[461] GET -LEN NEW UNDEF S.T.
ADD T,S ;[461] GET START OF NEW UNDEF S.T.
HRL T,S ;[461] FORM -N,,ADR
MOVEM T,USYMP+S$OPT ;[461] SAVE FOR LATER UPDATE
JRST CLSFI2] ;[461] BACK TO COMMON CODE
MOVE T,SYMP+S$LEN ;[461] GET NEW TABLE LENGTH
DPB T,[POINTR SYMP+S$OLN,ST%LEN] ;[461] STORE IT FOR UPDATE
SUB T,FOSPTR+S$LEN ;[461] GET POSITIVE DIFFERENCE
EXCH T,SYMP+S$OPT ;[461] GET OPERANDS IN ORDER FOR SUBTRACT
SUBB T,SYMP+S$OPT ;[461] UPDATE STARTING ADDRESS
MOVE S,USYMP+S$LEN ;[461] GET NEW UNDEF S.T. LENGTH
DPB S,[POINTR USYMP+S$OLN,ST%LEN] ;[461] STORE FOR UPDATE
SUB T,S ;[461] FIND NEW UNDEF S.T. START ADR
MOVEM T,USYMP+S$OPT ;[461] SAVE IT FOR LATER UPDATE
CLSFI2: MOVE T,FOSPTR+S$ADR ;[461] GET FILE'S NEW DEFINED S.T. ADR
SUB T,USYMP+S$LEN ;[461] BACK UP BY NEW UNDEF S.T. LENGTH
MOVEM T,FOUPTR+S$ADR ;[461] STORE FILE'S NEW UNDEF S.T. ADR
;NOW COPY THE UNDEFINED TABLE INTO THE FILE.
SKIPN W2,USYMP+S$LEN ;[461] ANY UNDEF SYMS LEFT?
JRST NOUCPY ;[461] NOTHING TO COPY, JUST GO UPDATE POINTER
MOVE R,FOUPTR+S$ADR ;[461] WHERE IN FILE TO PUT THE DATA
MOVE W1,USYMP+S$ADR ;[461] POINTER TO FILDDT'S COPY
OUCPY: MOVE T,(W1)
PUSHJ P,DEPMEM
JRST SCPERR ;GIVE UP COPY IF CAN'T STORE
AOS R
AOS W1 ;[461]
SOJG W2,OUCPY ;[461]
;FALL THROUGH TO UPDATE POINTER
;STILL IFN FTFILE
;FALL IN FROM PREVIOUS PAGE
WIT
CLSFI1: MOVE T,FOSPTR+S$LEN ;OLD LENGTH
SUB T,SYMP+S$LEN ;GET -DIFFERENCE
ADDM T,FOSPTR+S$ADR ;UPDATE ADDRESS OF FILE'S TABLE
SKIPG SYTLOC ;PDV OR JOBDAT BASIS?
SKIPL SYMP+S$SUF ;JOBDAT, IOWD OR VECTOR SUBTABLE?
JRST CLSFI3 ;SYMBOL TABLE VECTOR SUBTABLES
MOVN T,T ;IOWD, GET POS DIFFERENCE
HRL T,T ;FORM N,,N
EXCH T,SYMP+S$OPT ;GET OPERANDS IN ORDER FOR SUB
SUBB T,SYMP+S$OPT ;BACK .JBSYM INTO PATCH SPACE
MOVN S,USYMP+S$LEN ;GET -LEN NEW UNDEF S.T.
ADD T,S ;GET START OF NEW UNDEF S.T.
HRL T,S ;FORM -N,,ADR
MOVEM T,USYMP+S$OPT ;SAVE FOR LATER UPDATE
JRST CLSFI5 ;BACK TO COMMON CODE
CLSFI3: MOVE T,SYMP+S$LEN ;GET NEW TABLE LENGTH
DPB T,[POINTR SYMP+S$OLN,ST%LEN] ;STORE IT FOR UPDATE
SUB T,FOSPTR+S$LEN ;GET POSITIVE DIFFERENCE
EXCH T,SYMP+S$OPT ;GET OPERANDS IN ORDER FOR SUBTRACT
SUBB T,SYMP+S$OPT ;UPDATE STARTING ADDRESS
MOVE S,USYMP+S$LEN ;GET NEW UNDEF S.T. LENGTH
DPB S,[POINTR USYMP+S$OLN,ST%LEN] ;STORE FOR UPDATE
SUB T,S ;FIND NEW UNDEF S.T. START ADR
MOVEM T,USYMP+S$OPT ;SAVE IT FOR LATER UPDATE
CLSFI5: MOVE T,FOSPTR+S$ADR ;GET FILE'S NEW DEFINED S.T. ADR
SUB T,USYMP+S$LEN ;BACK UP BY NEW UNDEF S.T. LENGTH
MOVEM T,FOUPTR+S$ADR ;STORE FILE'S NEW UNDEF S.T. ADR
;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE
;COPY THE UNDEFINED TABLE INTO THE FILE.
OUCPY: SKIPN W2,USYMP+S$LEN ;ANY UNDEF SYMS LEFT?
JRST OUCPY4 ;NOTHING TO COPY, JUST GO UPDATE POINTER
MOVE R,FOUPTR+S$ADR ;WHERE IN FILE TO PUT THE DATA
MOVE W1,USYMP+S$ADR ;POINTER TO FILDDT'S COPY
OUCPY1: MOVE T,(W1) ;NEXT SYMBOL OR VALUE
PUSHJ P,DEPMEM ;WRITE BACK TO FILE
JRST SCPERR ;GIVE UP COPY IF CAN'T STORE
AOS R ;INCREMENT FILE VIRTUAL ADDRESS
AOS W1 ;INCREMENT INTERNAL-TO-FILDDT ADDRESS
SOJG W2,OUCPY1 ;LOOP FOR REST OF UNDEFINED SYMBOL TABLE
REP 7/406 ;16C371
NOUCPY: SKIPG SYTLOC ;[461] JOBDAT OR PDV?
JRST [ MOVEI R,.JBUSY ;[461] WHERE TO STORE IT
HRL R,SYTLOC ;[461] AND IN WHAT SECTION
JRST NOUCP2] ;[461] GO DO IT
MOVE R,USYMP+S$SUB ;[461] GET SUBTABLE ADDRESS
; ADDI R,.STDAT ;[461] POINT TO TYPE/LENGTH WORD
MOVE T,USYMP+S$OLN ;[461] GET NEW DATA
PUSHJ P,DEPMEM ;[461] STORE IT
JRST SCPERR ;[461] FAILURE
ADDI R,.STPTR-.STDAT ;[461] INCREMENT TO ADDRESS WORD
NOUCP2: MOVE T,USYMP+S$OPT ;[461] GET UPDATED POINTER
WIT
OUCPY4: SKIPG SYTLOC ;JOBDAT OR PDV BASIS?
SKIPL SYMP+S$SUF ;JOBDAT, IOWD OR VECTOR SUBTABLE?
JRST OUCPY6 ;SYMBOL TABLE VECTOR SUBTABLE
MOVEI R,.JBUSY ;WHERE TO STORE IT
HRL R,SYTLOC ;AND IN WHAT SECTION
JRST OUCPY8 ;GO DO IT
OUCPY6: MOVE R,USYMP+S$SUB ;GET SUBTABLE ADDRESS
; ADDI R,.STDAT ;POINT TO TYPE/LENGTH WORD
MOVE T,USYMP+S$OLN ;GET NEW DATA
PUSHJ P,DEPMEM ;STORE IT
JRST SCPERR ;FAILURE
ADDI R,.STPTR-.STDAT ;INCREMENT TO ADDRESS WORD
OUCPY8: MOVE T,USYMP+S$OPT ;GET UPDATED POINTER
REP 21/406 ;16C372
;NOW COPY THE DEFINED TABLE INTO THE FILE
SKIPN W2,SYMP+S$LEN ;[461] ANY SYMBOLS?
JRST NOSCPY ;[461] NOTHING TO COPY, JUST GO UPDATE POINTER
MOVE R,FOSPTR+S$ADR ;[461] WHERE IN FILE TO PUT THE DATA
MOVE W1,SYMP+S$ADR ;[461] POINTER TO FILDDT'S COPY
OSCPY: MOVE T,(W1)
PUSHJ P,DEPMEM
JRST SCPERR ;ERROR
AOS R
AOS W1 ;[461]
SOJG W2,OSCPY ;[461]
WIT
;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE
;COPY THE DEFINED TABLE INTO THE FILE
OSCPY: SKIPN W2,SYMP+S$LEN ;ANY SYMBOLS?
JRST OSCPY4 ;NOTHING TO COPY, JUST GO UPDATE POINTER
MOVE R,FOSPTR+S$ADR ;WHERE IN FILE TO PUT THE DATA
MOVE W1,SYMP+S$ADR ;POINTER TO FILDDT'S COPY
OSCPY1: MOVE T,(W1) ;NEXT SYMBOL OR VALUE
PUSHJ P,DEPMEM ;WRITE BACK TO FILE
JRST SCPERR ;ERROR
AOS R ;INCREMENT FILE VIRTUAL ADDRESS
AOS W1 ;INCREMENT INTERNAL-TO-FILDDT ADDRESS
SOJG W2,OSCPY1 ;LOOP FOR WHOLE SYMBOL TABLE
REP 36/406 ;16C373
NOSCPY: SKIPG SYTLOC ;[461] JOBDAT OR PDV?
JRST [ MOVEI R,.JBSYM ;[461] WHERE TO STORE IT
HRL R,SYTLOC ;[461] AND IN WHAT SECTION
JRST NOSCP2] ;[461] GO DO IT
MOVE R,SYMP+S$SUB ;[461] GET SUBTABLE ADDRESS
; ADDI R,.STDAT ;[461] POINT TO TYPE/LENGTH WORD
MOVE T,SYMP+S$OLN ;[461] GET NEW DATA
PUSHJ P,DEPMEM ;[461] STORE IT
JRST SCPERR ;[461] FAILURE
ADDI R,.STPTR-.STDAT ;[461] INCREMENT TO ADDRESS WORD
NOSCP2: MOVE T,SYMP+S$OPT ;[461] GET UPDATED POINTER
WIT
OSCPY4: SKIPG SYTLOC ;PDV OR JOBDAT BASIS?
SKIPL SYMP+S$SUF ;JOBDAT, IOWD OR VECTOR SUBTABLE?
JRST OSCPY6 ;SYMBOL TABLE VECTOR SUBTABLE
MOVEI R,.JBSYM ;WHERE TO STORE IT
HRL R,SYTLOC ;AND IN WHAT SECTION
JRST OSCPY8 ;GO DO IT
OSCPY6: MOVE R,SYMP+S$SUB ;GET SUBTABLE ADDRESS
; ADDI R,.STDAT ;POINT TO TYPE/LENGTH WORD
MOVE T,SYMP+S$OLN ;GET NEW DATA
PUSHJ P,DEPMEM ;STORE IT
JRST SCPERR ;FAILURE
ADDI R,.STPTR-.STDAT ;INCREMENT TO ADDRESS WORD
OSCPY8: MOVE T,SYMP+S$OPT ;GET UPDATED POINTER
DEL 50/406 ;16C374
;FALL THROUGH TO COPY HIGH SEG SYMBOLS.
;STILL IFN FTFILE
REP 6/407 ;16C375
SKIPN R,FOHPTR+S$ADR ;[461] ANY HISEG SYMBOLS?
POPJ P, ;[461] NONE, ALL DONE WITH COPY
MOVE W2,HSYMP+S$LEN ;[461] GET SIZE OF HISEG TABLE
MOVE W1,HSYMP+S$ADR ;[461] POINTER TO FILDDT'S COPY
HSCPY: MOVE T,(W1) ;GET NEXT DATA WORD
WIT
OHCPY: SKIPN R,FOHPTR+S$ADR ;ANY HISEG SYMBOLS?
POPJ P, ;NONE, ALL DONE WITH COPY
MOVE W2,HSYMP+S$LEN ;GET SIZE OF HISEG TABLE
MOVE W1,HSYMP+S$ADR ;POINTER TO FILDDT'S COPY
OHCPY1: MOVE T,(W1) ;GET NEXT DATA WORD
REP 14/407 ;16C376
AOS W1 ;[461] AND PTR INTO FILDDT
SOJG W2,HSCPY ;[461] LOOP OVER ALL OF FILDDT'S SYMBOLS
POPJ P, ;[461] DONE UPDATING SYMBOLS
;ORGSYM -- CHECK IF ORIGINAL PDV SUBTABLE POINTERS ARE STILL THERE.
WIT
AOS W1 ;AND PTR INTO FILDDT
SOJG W2,OHCPY1 ;LOOP OVER ALL OF FILDDT'S SYMBOLS
POPJ P, ;DONE UPDATING SYMBOLS
;ORGSYM -- CHECK IF ORIGINAL SYMBOL VECTOR SUBTABLE POINTERS ARE STILL THERE.
REP 27/407 ;16C377
ORGSYM: MOVE R,S$SUB(W) ;[461] GET SUBTABLE ADDRESS
; ADDI R,.STDAT ;[461] POINT TO LENGTH WORD
PUSHJ P,FETCH ;[461] GET FROM FILE
SETCM T,S$OLN(W) ;[461] CAN'T, INSURE FAILS
CAME T,S$OLN(W) ;[461] SAME AS WHEN SYMS WERE COPIED?
POPJ P, ;[461] NO, GIVE ERROR
ADDI R,.STPTR-.STDAT ;[461] NOW FOR ADDRESS WORD
PUSHJ P,FETCH ;[461] FROM FILE
SETCM T,S$OPT(W) ;[461] CAN'T, INSURE FAILURE
CAME T,S$OPT(W) ;[461] STILL THE SAME?
POPJ P, ;[461] NO, ERROR
JRST CPOPJ1 ;[461] ALL UNCHANGED, RETURN GOOD
WIT
ORGSYM: MOVE R,S$SUB(W) ;GET SUBTABLE ADDRESS
; ADDI R,.STDAT ;POINT TO LENGTH WORD
PUSHJ P,FETCH ;GET FROM FILE
SETCM T,S$OLN(W) ;CAN'T, INSURE FAILS
CAME T,S$OLN(W) ;SAME AS WHEN SYMS WERE COPIED?
POPJ P, ;NO, GIVE ERROR
ADDI R,.STPTR-.STDAT ;NOW FOR ADDRESS WORD
PUSHJ P,FETCH ;FROM FILE
SETCM T,S$OPT(W) ;CAN'T, INSURE FAILURE
CAME T,S$OPT(W) ;STILL THE SAME?
POPJ P, ;NO, ERROR
JRST CPOPJ1 ;ALL UNCHANGED, RETURN GOOD
REP 46/407 ;16C378
POPJ P, ;[461] RETURN FROM WRTSYM
WIT
POPJ P, ;RETURN FROM WRTSYM
DEL 60/413 ;16C379
DEL 53/419 ;16C380
REP 35/423 ;16C381
WIT
REP 45/423 ;16C382
YFLLEN==.FOLEB+1
WIT
YFLLEN==.FOMAX+1 ;[630][656]
INS 51/423 ;16C383
YRFLEN==.FOFMX
DD(YRFBLK,YRFLEN) ;[656] RETURNED FILESPEC BLOCK
INS 15/424 ;16C384
DD(I.NSTS,1) ;[645] SECTION OF REFERENCE FOR I.NSTE
DD(I.NSS2,1) ;[645] SECTION OF REFERENCE FOR I.NEA2
INS 20/424 ;16C385
DD(I.XJRS,1) ;[634] XJRST VALUE AFTER DOITX'S XCT
INS 20/425 ;16C386
BP$INS==1B1 ;[633] BREAKPOINT INSTALLED
BP$ERM==1B2 ;[633] ERROR MESSAGE TYPED
REP 10/426 ;16C387
DD(SWTEM,1) ;TEMP FOR SWAP (HOLDS REGISTER T)
WIT
DD(SWTEM,1) ;TEMP FOR SAVE/RESTORE/SWAP (HOLDS REGISTER T)
;ALSO USED BY PHYIN (HOLDS INSTRUCTION)
INS 19/426 ;16C388
IFN FTDEC10,< ;[633] -10 DEFAULTS $4M OFF
DD(BPBLK,1,<0>) ;[633] IN-SECTION ADDR OF BREAKPOINT BLOCK
> ;END IFN FTDEC10
IFN FTDEC20,< ;[633] -20 DEFAULTS $4M ON
INS 31/426 ;16C389
> ;END IFN FTDEC20
REP 39/427 ;16C390
DD(ESTUT,2) ;[461] ADDRESS/LENGTH PAIR, COPY OF USYMP
ESTUTL=ESTUT+1 ;[461] USED BY UNDEFINED SYM ASSEMBLER
WIT
DD(ESTUT,2) ;ADDRESS/LENGTH PAIR, COPY OF USYMP
ESTUTL=ESTUT+1 ;USED BY UNDEFINED SYM ASSEMBLER
REP 1/428 ;16C391
DD(SYMP,0) ;[461] DEFINED SYMBOL TABLE POINTER BLOCK
.PHASE 0 ;[461] DEFINE TAGS RELATIVE TO ZERO
S$ADR:! DD(,1) ;[461] ADDRESS OF SYMBOL TABLE
S$LEN:! DD(,1) ;[461] LENGTH OF SYMBOL TABLE (MUST BE S$ADR+1)
S$SUB:! DD(,1) ;[461] PDV SUBTABLE ADDRESS OR IOWD ADDRESS
IFN FTFILE,<
S$OLN:! DD(,1) ;[461] ORIGINAL LENGTH WORD
S$OPT:! DD(,1) ;[461] ORIGINAL POINTER WORD
> ;END IFN FTFILE
S$SIZ==.-S$ADR ;[461] LENGTH OF SYMBOL BLOCK
.DEPHASE ;[461] BACK TO NORMAL
DD(USYMP,S$SIZ) ;[461] UNDEFINED SYMBOL TABLE BLOCK
DD(HSYMP,S$SIZ) ;[461] HISEG SYMBOL TABLE BLOCK
DD(SYTLOC,1) ;[461] -1,,S.T. SECTION /OR/ PDVA
WIT
DD(SYMP,0) ;DEFINED SYMBOL TABLE POINTER BLOCK
.PHASE 0 ;DEFINE TAGS RELATIVE TO ZERO
S$ADR:! DD(,1) ;ADDRESS OF SYMBOL TABLE
S$LEN:! DD(,1) ;LENGTH OF SYMBOL TABLE (MUST BE S$ADR+1)
S$SUB:! DD(,1) ;PDV SUBTABLE ADDRESS OR IOWD ADDRESS
S$SUF:! DD(,1) ;[634] LH: IOWD OR VECTOR SUBTABLE FLAG
;[634] RH: RESERVED
IFN FTFILE,<
S$OLN:! DD(,1) ;ORIGINAL LENGTH WORD
S$OPT:! DD(,1) ;ORIGINAL POINTER WORD
> ;END IFN FTFILE
S$SIZ==.-S$ADR ;LENGTH OF SYMBOL BLOCK
.DEPHASE ;BACK TO NORMAL
DD(USYMP,S$SIZ) ;UNDEFINED SYMBOL TABLE BLOCK
DD(HSYMP,S$SIZ) ;HISEG SYMBOL TABLE BLOCK
DD(SYTLOC,1) ;-1,,JOBDAT SECTION /OR/ PDVA
;[630] /OR/ SYMTAB VECTOR ADDR (-10 ONLY)
REP 24/428 ;16C392
DD(PDVARG,6,<6,.FHSLF>) ;[461] PDVOP% ARG BLOCK - SIZE, FORK
> ;END IFN FTDEC20
DD(PDVA,1) ;[461] DATA BLOCK FOR PDVOP%
WIT
DD(PDVARG,6,<6,.FHSLF>) ;PDVOP% ARG BLOCK - SIZE, FORK
> ;END IFN FTDEC20
DD(PDVA,1) ;DATA BLOCK FOR PDVOP%
REP 31/428 ;16C393
DD(ENDSUB,1) ;[461] END OF VECTOR PROCESSED BY SYMVEC
IFN FTEXEC&FTDEC10,< ;[430]
DD(HSBLK,1) ;0 IF SYMBOLS NOT HIDDEN, ELSE BLOCK ADDRESS
> ;END IFN FTEXEC&FTDEC10
WIT
DD(ENDSUB,1) ;END OF VECTOR PROCESSED BY PDVBLK
IFN FTEX10,< ;[430]
DD(HSBLK,1) ;0 IF SYMBOLS NOT HIDDEN, ELSE BLOCK ADDRESS
DD(JOBEDV,1) ;[651] .JBEDV STORAGE FOR BREAKPOINTS
DD(CPNDDT,1) ;[651] WORD TO POKE WHEN HITTING A BREAKPOINT
DD(CPNBIT,1) ;[651] BIT TO SET IN CPNDDT ON A BREAKPOINT
> ;END IFN FTEX10
REP 6/429 ;16C394
DD(LLIMIT,1) ;LOWER LIMIT WORD (SEARCHES, ETC)
; ALSO VALUE FOR DEFINING SYMBOL
DD(ULIMIT,1) ;UPPER LIMIT WORD (SEARCHES, ETC)
DD(LCOMF,1) ;[534] -1 FOR COMMA SEEN IN LLIMIT ELSE 0
DD(UCOMF,1) ;[534] -1 FOR COMMA SEEN IN ULIMIT ELSE 0
WIT
DD(ABBSY3,1) ;[653] FLAGS MASK FOR ABBREV MATCHING
;ORDER OF LLIMIT/LLREGF/LLACCF IS IMPORTANT!
DD(LLIMIT,1) ;LOWER LIMIT WORD (SEARCHES, ETC)
; ALSO VALUE FOR DEFINING SYMBOL
DD(LLREGF,1) ;[634] REGISTER "F" AT "<" TIME
DD(LLACCF,1) ;[634] FLAG "ACCCF" AT "<" TIME
;ORDER OF ULIMIT/ULREGF/ULACCF IS IMPORTANT
DD(ULIMIT,1) ;UPPER LIMIT WORD (SEARCHES, ETC)
DD(ULREGF,1) ;[634] REGISTER "F" AT ">" TIME
DD(ULACCF,1) ;[634] FLAG "ACCCF" AT ">" TIME
REP 14/429 ;16C395
IFE FTEX20!FTMON,<
DD(PDFSEC,1,-1) ;[451] PERMANENT DEFAULT SECTION
>
IFN FTEX20!FTMON,<
DD(PDFSEC,1,<<MSEC1,,0>>) ;[451] DEFAULT IS MSEC1 FOR TOPS20 MONITOR
>
WIT
DD(PDFSEC,1,-1) ;[671] PERMANENT DEFAULT SECTION
INS 42/429 ;16C396
IFN FTDEC10,< ;[630]
DD(LASTAF,1) ;[664] FULL PAGE ACCESS BITS FOR LASTPG
DD(S0PLIM,1) ;[630] MASK FOR INACCESSIBLE ADDRS FROM SEC. 0
> ;END IFN FTDEC10
DD(NZSXJF,2) ;[630] FOR XJRSTF INTO SECTION 1 ACS
REP 16/430 ;16C397
DD(SPTWRD,1) ;($I+10) SPT BASE ADDRESS (VIRTUAL)
WIT
DD(SPTWRD,1) ;($I+08) SPT BASE ADDRESS (VIRTUAL)
REP 22/430 ;16C398
DD(SECOLD,1) ;[427] PREVIOUS SECDDT DURING SAVEG
WIT
;[634] DD(SECOLD,1) ;[427] PREVIOUS SECDDT DURING SAVEG
INS 29/430 ;16C399
DDS(BZ$CPF,0) ;[632] START OF CPU FLAGS AREA
REP 34/430 ;16C400
DD(KIPAG,1,<FTDEC10>) ;.NE. 0 IF KI-PAGING
DD(KLPAG,1,<FTDEC20>) ;.NE. 0 IF KL-PAGING
WIT
DDS(ZZ$CPF,0) ;[632] END (+1) OF CPU FLAGS AREA
DD(KIPAG,1,<0>) ;[631] .NE. 0 IF KI-PAGING
DD(KLPAG,1,<-1>) ;[631] .NE. 0 IF KL-PAGING
REP 7/433 ;16C401
FLPLEN==.FOLEB+1 ;LENGTH OF FILOP. BLOCK
WIT
FLPLEN==.FOMAX+1 ;[656] LENGTH OF FILOP. BLOCK
REP 13/433 ;16C402
DSKLEN==.DCUSZ+1 ;LENGTH OF DSKCHR BLOCK
DD(DSKBLK,DSKLEN) ;DSKCHR BLOCK (FOR /U)
WIT
RFSLEN==.FOFMX ;[656] LENGTH OF RETURNED FILESPEC BLOCK
DD(RFSBLK,RFSLEN) ;[656] RETURNED FILESPEC BLOCK
DSKLEN==.DCUSZ+1 ;LENGTH OF DSKCHR BLOCK
DD(DSKBLK,DSKLEN) ;DSKCHR BLOCK (FOR /U)
DD(DSKCHA,1) ;[656] DSKCHR AC (FOR /U)
REP 20/434 ;16C403
DD(PDVNUM,1) ;[461] # PDVS READ FROM EXE FILE
DD(PDVTBL,1) ;[461] POINTER(W2) TO PDV LIST
DD(EVLEN,1) ;[461] ENTRY VECTOR LENGTH FROM EXE FILE
DD(EVADR,1) ;[461] ENTRY VECTOR ADR FROM EXE FILE
WIT
DD(PDVNUM,1) ;# PDVS READ FROM EXE FILE
DD(PDVTBL,1) ;POINTER(W2) TO PDV LIST
DD(EVLEN,1) ;ENTRY VECTOR LENGTH FROM EXE FILE
DD(EVADR,1) ;ENTRY VECTOR ADR FROM EXE FILE
REP 37/435 ;16C404
DD(FOSPTR,S$SIZ) ;[461] SYMP ON FILDDT STARTUP
DD(FOUPTR,S$SIZ) ;[461] USYMP ON FILDDT STARTUP
DD(FOHPTR,S$SIZ) ;[461] HSYMP ON FILDDT STARTUP
WIT
DD(FOSPTR,S$SIZ) ;SYMP ON FILDDT STARTUP
DD(FOUPTR,S$SIZ) ;USYMP ON FILDDT STARTUP
DD(FOHPTR,S$SIZ) ;HSYMP ON FILDDT STARTUP
SUM 19489