perm filename GOGOL.SRC[10X,AIL]1 blob
sn#091932 filedate 1974-03-26 generic text, type T, neo UTF8
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 1,1
******** GOGOL[S,AIL] **** PAGE 1
1) COMMENT ⊗ VALID 00060 PAGES VERSION 17-1(52)
1) RECORD PAGE DESCRIPTION
*** GOGOL[X,AIL] *** PAGE 1
2) COMMENT ⊗ VALID 00060 PAGES VERSION 17-1(42)
2) RECORD PAGE DESCRIPTION
******** GOGOL[S,AIL] **** PAGE 1
1) 00024 00003 SUBTTL Command File Descriptions
1) 00026 00004 SUBTTL Conditional Assembly Switches, Macros
1) 00030 00005 SUBTTL Titles, Versions
1) 00031 00006 SUBTTL AC Definitions
1) 00032 00007 CDB, SIMIO Indices For IOSER, OTHER INDICES
1) 00037 00008 SUBTTL Base (Low Segment) Data Descriptions -- Macros, Compil spec
1) 00039 00009 Base (Low Segment) Data Descriptions - Params, Links, Size specs
1) 00050 00010 SUBTTL Initialization Routines, Data
1) 00052 00011 SUBTTL Sailor, Reent -- Allocation, Main Program Control
1) 00055 00012 SUBTTL .SEG2. -- Get a second segment
1) 00058 00013
1) 00061 00014
1) 00066 00015
1) 00067 00016 Segment-Fetching Data
1) 00073 00017
1) 00074 00018 SUBTTL %ALLOC -- Main Allocation Routine
1) 00080 00019
1) 00088 00020
1) 00093 00021
1) 00099 00022 COMMENT Utility Subroutines for allocation
1) 00101 00023 SUBTTL %UUOLNK -- UUO Handler (Dispatch Vector Just Below)
1) 00103 00024 DSCR OCTPNT, DECPNT UUO'S
1) 00106 00025 DSCR PRINIT -- INTERFACE TO SYSTEM PRINTING FACILITIES
1) 00111 00026 DSCR ERROR UUOS
1) 00118 00027 DSCR CALLEDFROM -- PRINTS 'CALLED FROM' XXX 'LAST SAIL CALL AT'
1) 00126 00028 SUBTTL Special Printing Routines For Error Handler
1) 00131 00029 DSCR USERERR(VALUE,CODE,"MSG","RESPONSE")
1) 00135 00030 SUBTTL Code to Handle Linkage to Editors
1) 00138 00031 EXPORT VERSION OF EDITOR-INTERFACE
1) 00143 00032 SUBTTL SAVE, RESTR, INSET -- General Utility Routines
1) 00147 00033 SUBTTL Core Service Routines -- General Description
1) 00152 00034 SUBTTL Special AC Declarations
1) 00153 00035 SUBTTL Utility Routines
1) 00159 00036
1) 00164 00037 SUBTTL CORGET
1) 00170 00038
1) 00174 00039 SUBTTL CORINC, CANINC
1) 00180 00040 SUBTTL CORREL
1) 00187 00041 SUBTTL CORPRT, CORBIG
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 1,1
1) 00198 00042 DSCR STRGC (REQUEST)
1) 00204 00043 STRGC, Definitions
1) 00208 00044 STRNGC -- Init, CALSGL, SGSWEP -- main loop through space sorting
1) 00213 00045 STRNGC -- SWPLUP -- main sweep (string moving) loop
1) 00215 00046 STRNGC -- SWPDUN -- expansion/contraction, parameter update
1) 00220 00047 STRNGC -- STSTAT -- Finish Up, collect statistics
1) 00223 00048 STRNGC Service routines -- SGSORT
1) 00226 00049 STRNGC Service routines -- SPGC,STRMRK, etc. -- Descriptor providing routines
1) 00231 00050 STRNGC Service routines -- SRTSPC -- space sorter
1) 00235 00051 STRNGC Service routines -- SOURCE and DEST
1) 00239 00052
1) 00246 00053 STRNGC Service routines -- SGINS and SGREM
1) 00248 00054 STRNGC Service routines -- STCLER and RESCLR
1) 00250 00055 SUBTTL Some Runtime Routines Which Could Go Nowhere Else
1) 00251 00056 COMMENT Kounter Routines
1) 00253 00057
1) 00263 00058 DSCR POW, FPOW, LOGS, FLOGS. BOTH RETURN REALS.
1) 00268 00059 DSCR EXP,ALOG -- FOR USE BY EXPONENTIATION ROUTINES & WORLD
1) 00276 00060 DSCR VAL←CODE(OCTAL COMMAND, REFERENCE ARG)
1) 00280 ENDMK
1) ⊗;
*** GOGOL[X,AIL] *** PAGE 1
2) 00023 00003 Command File Descriptions
2) 00025 00004 Conditional Assembly Switches, Macros
2) 00029 00005 Titles, Versions
2) 00030 00006 AC Definitions
2) 00031 00007 CDB, SIMIO Indices For IOSER, OTHER INDICES
2) 00036 00008 Base (Low Segment) Data Descriptions -- Macros, Compil spec
2) 00038 00009 Base (Low Segment) Data Descriptions - Params, Links, Size specs
2) 00047 00010 Initialization Routines, Data
2) 00049 00011 Sailor, Reent -- Allocation, Main Program Control
2) 00052 00012 .SEG2. -- Get a second segment
2) 00055 00013
2) 00058 00014
2) 00063 00015
2) 00064 00016 Segment-Fetching Data
2) 00069 00017
2) 00070 00018 %ALLOC -- Main Allocation Routine
2) 00076 00019
2) 00084 00020
2) 00089 00021
2) 00095 00022 Utility Subroutines for allocation
2) 00097 00023 %UUOLNK -- UUO Handler (Dispatch Vector Just Below)
2) 00099 00024 DSCR OCTPNT, DECPNT UUO'S
2) 00102 00025 DSCR PRINIT -- INTERFACE TO SYSTEM PRINTING FACILITIES
2) 00103 00026 DSCR ERROR UUOS
2) 00110 00027 DSCR CALLEDFROM -- PRINTS 'CALLED FROM' XXX 'LAST SAIL CALL AT'
2) 00115 00028 Special Printing Routines For Error Handler
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 1,1
2) 00120 00029 DSCR USERERR(VALUE,CODE,"MSG","RESPONSE")
2) 00122 00030 Code to Handle Linkage to Editors
2) 00125 00031 EXPORT VERSION OF EDITOR-INTERFACE
2) 00129 00032 SAVE, RESTR, INSET -- General Utility Routines
2) 00133 00033 Core Service Routines -- General Description
2) 00138 00034 Special AC Declarations
2) 00139 00035 Utility Routines
2) 00145 00036
2) 00150 00037 CORGET
2) 00156 00038
2) 00160 00039 CORINC, CANINC
2) 00166 00040 CORREL
2) 00173 00041 CORPRT, CORBIG
2) 00184 00042 DSCR STRGC (REQUEST)
2) 00190 00043 STRGC, Definitions
2) 00194 00044 STRNGC -- Init, CALSGL, SGSWEP -- main loop through space sorting
2) 00199 00045 STRNGC -- SWPLUP -- main sweep (string moving) loop
2) 00201 00046 STRNGC -- SWPDUN -- expansion/contraction, parameter update
2) 00205 00047 STRNGC -- STSTAT -- Finish Up, collect statistics
2) 00207 00048 STRNGC Service routines -- SGSORT
2) 00210 00049 STRNGC Service routines -- SPGC,STRMRK, etc. -- Descriptor providing routines
2) 00215 00050 STRNGC Service routines -- SRTSPC -- space sorter
2) 00219 00051 STRNGC Service routines -- SOURCE and DEST
2) 00223 00052
2) 00230 00053 STRNGC Service routines -- SGINS and SGREM
2) 00232 00054 STRNGC Service routines -- STCLER and RESCLR
2) 00234 00055 Some Runtime Routines Which Could Go Nowhere Else
2) 00235 00056 Kounter Routines
2) 00237 00057
2) 00243 00058 DSCR POW, FPOW, LOGS, FLOGS. BOTH RETURN REALS.
2) 00248 00059 DSCR EXP,ALOG -- FOR USE BY EXPONENTIATION ROUTINES & WORLD
2) 00256 00060 DSCR VAL←CODE(OCTAL COMMAND, REFERENCE ARG)
2) 00258 ENDMK
2) ⊗;
******** GOGOL[S,AIL] **** PAGE 2
1) 031 102100000064 ⊗;
1) DEFINE .VERSION <102100000064>
1) COMMENT ⊗
1) VERSION 17-1(52) 3-19-74 BY RHT GO OVER FILE WITH RLS
1) VERSION 17-1(51) 3-19-74
1) VERSION 17-1(50) 3-19-74
1) VERSION 17-1(49) 3-19-74
1) VERSION 17-1(47) 3-5-74 BY RHT BUG #RL# STRINGC WAS ACCESSING .NEXT OF A SPACE AFTER CORREL
1) VERSION 17-1(46) 2-20-74 BY RHT BUG #RI# NEEDED AN INSET IN .SONTP
1) VERSION 17-1(45) 2-16-74 BY RHT FEAT %BF% WAY TO EXPAND ERROR BUFFER
1) VERSION 17-1(44) 1-26-74 BY RHT BUG #QQ# INSTRUCTION LEFT OUT OF .SONTP
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 2,2
1) VERSION 17-1(43) 1-26-74 BY RHT BUG #QP# .SONTP STRING DESCR CANON USED WRONG
1) VERSION 17-1(42) 1-12-74 BY RHT FIX COMPIL FOR SGC
*** GOGOL[X,AIL] *** PAGE 2
2) 031 102100000052 ⊗;
2) DEFINE .VERSION <102100000052>
2) COMMENT ⊗
2) VERSION 17-1(42) 1-12-74 BY RHT FIX COMPIL FOR SGC
******** GOGOL[S,AIL] **** PAGE 7
1) ?.ERSWC ←← 20 ;SIZE OF BUILT IN .ERSTR BUFFER
1) GLOB <
*** GOGOL[X,AIL] *** PAGE 7
2) GLOB <
******** GOGOL[S,AIL] **** PAGE 9
1) ;;?.ERSWC ←← 20 ; ERROR STRING BUILT IN BUFFER'S WD CNT (ACTUALLY DEFINED EARLIER)
1) XX (.ERSTR,<BLOCK 20>,INTERNAL,20) ;ERROR MESSAGE STRING.
*** GOGOL[X,AIL] *** PAGE 9
2) XX (.ERSTR,<BLOCK 20>,INTERNAL,20) ;ERROR MESSAGE STRING.
******** GOGOL[S,AIL] **** PAGE 9
1) ;;%BF% -- ERR BUFFER LENGTH KLUGE (1 OF MANY)
1) XX (.ERBWD,0,INTERNAL) ; BYRE(13)CHAR COUNT(23)BUFFER
1) XX (S4PARE,0)
*** GOGOL[X,AIL] *** PAGE 9
2) XX (S3PARE,0)
2) XX (S4PARE,0)
******** GOGOL[S,AIL] **** PAGE 9
1) NOTENX<
1) EXPO <
*** GOGOL[X,AIL] *** PAGE 9
2) EXPO <
******** GOGOL[S,AIL] **** PAGE 9
1) >;NOTENX
1) CMU < ;THIS STUFF USED FOR GAS
*** GOGOL[X,AIL] *** PAGE 9
2) CMU < ;THIS STUFF USED FOR GAS
******** GOGOL[S,AIL] **** PAGE 9
1) ;TENEX XX VARIABLES - MOSTLY FOR INTERRUPTS
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 9,9
1) TENX <
1) XX (CHNTAB,<BLOCK =36>,INTERNAL,=36);SHOULD BE REFERENCED
1) XX (LEVTAB,LPC1,INTERNAL) ;ONLY FROM CODE AT STRT IN SAILOR, Q.V.
1) XX (,LPC2,)
1) XX (,LPC3,)
1) XX (LPC1,0,INTERNAL)
1) XX (LPC2,0,INTERNAL)
1) XX (LPC3,0,INTERNAL)
1) XX (JMPCHN,<BLOCK =36*3>,INTERNAL,=36*3)
1) LOW <
1) EXTERNAL EINTA
1) >;LOW
1) XX (EINT1,0,INTERNAL,)
1) XX (,<JRST EINTA>,,)
1) XX (EINT2,0,INTERNAL,)
1) XX (,<JRST EINTA>,,)
1) XX (EINT3,0,INTERNAL,)
1) XX (,<JRST EINTA>,,)
1) ;XX VARIABLES FOR IO
1) XX (JFNTBL,<BLOCK JFNSIZE>,INTERNAL,JFNSIZE) ;JFNs for each channel
1) XX (CDBTBL,<BLOCK JFNSIZE>,INTERNAL,JFNSIZE) ;Addr. of chnl data buffer for each chnl
1) XX (PRTMP,0,INTERNAL)
1) XX (CTLOSW,0,INTERNAL) ;CTRL-O SWITCH
1) XX (TTCSVB,0,INTERNAL) ;TENEX emulation of TTCALL
1) >;TENX
1) ;PUT NO XX VARIABLES IN AFTER THIS POINT
1) LOW<
1) EXTERNAL LPINI
*** GOGOL[X,AIL] *** PAGE 9
2) LOW <
2) EXTERNAL LPINI
******** GOGOL[S,AIL] **** PAGE 11
1) STRT:
1) NOTENX <
1) CALL6(RESET)
1) >;NOTENX
1) CMU <
*** GOGOL[X,AIL] *** PAGE 11
2) STRT: CALL6(RESET)
2) CMU <
******** GOGOL[S,AIL] **** PAGE 11
1) TENX <
1) EXTERNAL .RESET ;TO BE FOUND IN TENEX IOSER
1) PUSHJ P,.RESET ;JSYS RESET, SET UP INTERRUPTS, CLEAR SAIL FILE SYSTEM
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 11,11
1) >;TENX
1) MOVEI A,RESTRT ;CHANGE JOBSA AND JOBREN
*** GOGOL[X,AIL] *** PAGE 11
2) MOVEI A,RESTRT ;CHANGE JOBSA AND JOBREN
******** GOGOL[S,AIL] **** PAGE 11
1) NOTENX <
1) CALL6 (0,RESET) ;CLEAR THE I/O WORLD
1) CALL6 (1,EXIT) ;QUIT QUIETLY
1) >;NOTENX
1) TENX <
1) JSYS HALTF
1) JRST .-1 ;NO CONTINUATION
1) >;TENX
1) SUBTTL .SEG2. -- Get a second segment
*** GOGOL[X,AIL] *** PAGE 11
2) CALL6 (0,RESET) ;CLEAR THE I/O WORLD
2) CALL6 (1,EXIT) ;QUIT QUIETLY
2) SUBTTL .SEG2. -- Get a second segment
******** GOGOL[S,AIL] **** PAGE 12
1) NOTENX <
1) INTERNAL .SEG2.
*** GOGOL[X,AIL] *** PAGE 12
2) INTERNAL .SEG2.
******** GOGOL[S,AIL] **** PAGE 12
1) >;NOTENX
1) >;NOUP
1) NOTENX <
1) NOCMU <
*** GOGOL[X,AIL] *** PAGE 12
2) >;NOUP
2) NOCMU <
******** GOGOL[S,AIL] **** PAGE 13
1) NOEXPO <
1) ;SEGMENT NAME NOT USEFUL TO EXPO SYSTEM
1) GLOB <
*** GOGOL[X,AIL] *** PAGE 13
2) NOEXPO < ;SEGMENT NAME NOT USEFUL TO EXPO SYSTEM
2) GLOB <
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 13,13
******** GOGOL[S,AIL] **** PAGE 14
1) >;NOTENX
1) EXPO <
*** GOGOL[X,AIL] *** PAGE 14
2) EXPO <
******** GOGOL[S,AIL] **** PAGE 16
1) NOTENX <
1) NOCMU < ;THESE GUYS HAVE TO BE EXTRA SPECIAL
*** GOGOL[X,AIL] *** PAGE 16
2) NOCMU < ;THESE GUYS HAVE TO BE EXTRA SPECIAL
******** GOGOL[S,AIL] **** PAGE 16
1) >;NOTENX
1) TENX <
1) NOUP <
1) INTERNAL .SEG2.
1) .SEG2.: MOVE 1,[XWD 400000,SEGPAG] ;THIS FORK←←400000
1) JSYS RPACS
1) TLNE 2,10000 ;DOES THE PAGE FOR THE SEGMENT EXIST?
1) JRST (P) ;YES
1) HRLZI 1,100001
1) HRROI 2,[FILXXX]
1) JSYS GTJFN
1) JRST [HRROI 1,[ASCIZ/SAIL segment loading error on segment:
1) /]
1) JSYS PSOUT
1) HRROI 1,[FILXXX]
1) JSYS PSOUT
1) HRROI 1,[ASCIZ/
1) /]
1) JSYS PSOUT
1) HLTAGN: JSYS HALTF
1) JRST HLTAGN ;NO CONTINUATION
1) ]
1) HRLI 1,400000
1) JSYS GET
1) SETOM JOBHRL
1) JRST (P)
1) >;NOUP
1) >;TENX
1) ENDCOM(LOR)
*** GOGOL[X,AIL] *** PAGE 16
2) ENDCOM(LOR)
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 16,16
******** GOGOL[S,AIL] **** PAGE 16
1) COMPIL(LUP,<%UUOLNK,%ALLOC,SAVE,RESTR,STACSV,STACRS,INSET,USERERR,$PDLOV,.UINIT,ERMSBF>
1) ,<CORGET,STCLER,GOGTAB,CONFIG,%ALLCHR,CAT,STRNGC,K.ZERO>
*** GOGOL[X,AIL] *** PAGE 17
2) COMPIL(LUP,<%UUOLNK,%ALLOC,SAVE,RESTR,STACSV,STACRS,INSET,USERERR,$PDLOV,.UINIT>
2) ,<CORGET,STCLER,GOGTAB,CONFIG,%ALLCHR,CAT,STRNGC,K.ZERO>
******** GOGOL[S,AIL] **** PAGE 16
1) ;;%BF% ALSO .ERBWD,CORREL
1) EXTERNAL .DTRT.,.ERSTR,.ERSTP,.ERRP.,.ERRJ.,.ERSTC,.ERBWD,CORREL
1) EXTERNAL X11,X22,X44,CORINC,%STDLS,%SPL,KTLNK
*** GOGOL[X,AIL] *** PAGE 17
2) EXTERNAL .DTRT.,.ERSTR,.ERSTP,.ERRP.,.ERRJ.,.ERSTC
2) EXTERNAL X11,X22,X44,CORINC,%STDLS,%SPL,KTLNK
******** GOGOL[S,AIL] **** PAGE 19
1) IMSSS<;HACK FOR MISERABLE IMSSS LOADER -- REMOVE WITH NEW LOADER
1) SETO 1, ;SET TO REMOVE PAGE
1) HRRZ 2,JOBREL ;THAT THE LOADER LEAVES
1) LSH 2,-11 ;WRITE PROTECTED
1) ADDI 2,1
1) HRLI 2,400000 ;THIS FORK
1) JSYS PMAP ;REMOVE
1) >;IMSSS
1) ;;%BF% be sure the ERR below will work
1) SETZM .ERBWD ;INITIALIZE ERROR MESSAGES
1) MOVEI C,MINPDS ;ABOUT 64 WORDS
*** GOGOL[X,AIL] *** PAGE 19
2) MOVEI C,MINPDS ;ABOUT 64 WORDS
******** GOGOL[S,AIL] **** PAGE 21
1) ;;%BF% RHT ASK FOR BIGGER ERROR BUFFER
1) PUSH P,[=256]
1) PUSHJ P,ERMSBF
1) IFNDEF JOBVER,<EXTERNAL JOBVER>
*** GOGOL[X,AIL] *** PAGE 21
2) IFNDEF JOBVER,<EXTERNAL JOBVER>
******** GOGOL[S,AIL] **** PAGE 25
1) TENX <
1) LDB A,[POINT 4,JOBUUO,12]
1) HRRZ FF,JOBUUO
1) TRNN FF,777776 ;IF ADDR. IS FF OR A GET ARG AND/OR
1) ADDI FF,-1(P) ;PUT ANSWER ON STACK WORD FOR FF OR A
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 25,25
1) JRST @.+1(A)
1) ;TTCALL DISPATCH TABLE
1) TTC0
1) TTC1
1) TTC2
1) TTC3
1) TTC4
1) TTC5
1) ILLUUO
1) ILLUUO
1) ILLUUO
1) TTC11
1) TTC12
1) TTC13
1) TTC14
1) ILLUUO
1) ILLUUO
1) ILLUUO
1) TTC4: ;EFFECTIVELY SAME AS TTC0 GIVEN 10X WAKEUP BEHAVIOR
1) TTC0: MOVEM B,TTCSVB ;SAVE B.
1) TTC01: HRRZI 1,100 ;B34 of RFMOD word returned in 2 says
1) JSYS RFMOD ;that BKJFN has been done since last char was
1) JSYS PBIN ;read, i.e. this PBIN will get a re-run. This is
1) CAIN 1,37 ;best EOL-to-CRLF conversion hack I can devise.
1) JRST TTCEOL ;It's impossible to stick a linefeed back in
1) TTC0RT: MOVE B,TTCSVB ;tty input buffer IN FRONT OF extant type-ahead.
1) MOVEM A,@FF
1) JRST USRXIT ;Returning just CR causes SAIL to look for non-
1) TTCEOL: TRNE 2,2 ;existent LF following. And setting a flag loses
1) JRST TTC0BK ;when some random other code does a PBIN. This
1) HRRZI 1,100 ;way, random other code gets a 37 too (Oh well).
1) JSYS BKJFN ;but at least the pending LF is cleared (since
1) JFCL ;the BKJFN bit is cleared). This code returns a
1) HRRZI A,15 ;CR on first reading of EOL and a LF on second.
1) JRST TTC0RT
1) TTC0BK: HRRZI A,12 ;Second reading of eol here.
1) JRST TTC0RT ;"flag" is effectively cleared by PBIN.
1) TTC1: HRRZ 1,@FF
1) JSYS PBOUT
1) JRST USRXIT
1) TTC2: ;Effectively same as TTC 5.
1) TTC5: HRRZI A,100
1) MOVEM B,TTCSVB ;SAVE B - NEW SIBE: B←CNT OF CHRS WAITING IF ANY
1) JSYS SIBE
1) AOSA -2(P) ;Get char and skip return
1) JRST USRXIT ;NOSKIP, NO CHAR, B UNCHANGED
1) JRST TTC01
1) TTC3: HRRO 1,FF
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 25,25
1) JSYS PSOUT
1) JRST USRXIT
1) TTC11: HRRZI 1,100
1) JSYS CFIBF
1) JRST USRXIT
1) TTC12: HRRZI 1,101
1) JSYS CFOBF
1) JRST USRXIT
1) TTC13:
1) TTC14: HRRZI A,100
1) JSYS SIBE
1) AOS -2(P) ;CHAR HAS BEEN TYPED, SKIP RET (BUT
1) ;DON'T READ ANYTHING IN)
1) JRST USRXIT ;NOTHING, NOSKIP.
1) ;This emulates DECUS's SKPINC & SKPINL. Stanford's TTCALL 14,
1) ;is different. I have found one instance of its use (at PARSE&LINSTOP)
1) ;which as far as I could tell wouldn't work on EXPORT systems,
1) ;so I put that under a STANFO switch.
1) >;TENX
1) NOTENX <
1) IFN 0,<
*** GOGOL[X,AIL] *** PAGE 25
2) IFN 0,<
******** GOGOL[S,AIL] **** PAGE 25
1) >;0
1) >;NOTENX
1) DSCR ERROR UUOS
*** GOGOL[X,AIL] *** PAGE 26
2) >
2) DSCR ERROR UUOS
******** GOGOL[S,AIL] **** PAGE 26
1) ;;%##% ADD A COUNT TO BE SURE DO NOT OVERFLOW
1) ;;%BF% allow larger buuffers. do things in this way to make
1) ;; old programs still able to work (sort of)
1) SKIPN C,.ERBWD ;INITIALIZED ??
1) MOVE C,[XWD .ERSWC*5*40,.ERSTR] ;.ERSWC*5 CHARS IN .ERSTR
1) MOVEM C,.ERBWD ;BE SURE PUT AWAY OK
1) LSH C,-5 ;THE COUNT FIELD
1) HLRZM C,.ERSTC ;REMEMBER THE COUNT
1) ;;%##%
1) MOVEI C,@.ERBWD
1) HRLI C,(<POINT 7,0>) ;MAKE UP THE BYTE PTR
1) MOVEM C,.ERSTP
1) ;;%BF%
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 26,26
1) MOVEI A,[BYTE(7) 15,12,0]
*** GOGOL[X,AIL] *** PAGE 26
2) MOVE C,[POINT 7,.ERSTR] ;POINTER TO ERROR STRING.
2) MOVEM C,.ERSTP
2) ;;%##% ADD A COUNT TO BE SURE DO NOT OVERFLOW
2) MOVEI C,20*5 ;HOW MANY CHARS THERE ARE (WISH HAD MORE)
2) ; (ACTUALLY, COUNTDOWN WILL LEAVE 1 FOR THE 0)
2) MOVEM C,.ERSTC ;REMEMBER THE COUNT
2) ;;%##%
2) MOVEI A,[BYTE(7) 15,12,0]
******** GOGOL[S,AIL] **** PAGE 26
1) ;;%BF%
1) SUBI A,@.ERBWD ;SAVED AWAY
1) IMULI A,5
*** GOGOL[X,AIL] *** PAGE 26
2) SUBI A,.ERSTR ;SAVED AWAY
2) IMULI A,5
******** GOGOL[S,AIL] **** PAGE 26
1) ;;%BF% -- also not too sure strngc likes indirects, so ...
1) MOVEI A,@.ERBWD
1) HRLI A,(<POINT 7,0>) ;MAKE UP THE BYTE PTR
1) PUSH SP,A
1) ;;%BF%
1) SKIPN A,%ERRC ;TRACKS LEFT BY USERRR??
*** GOGOL[X,AIL] *** PAGE 26
2) PUSH SP,[POINT 7,.ERSTR]
2) SKIPN A,%ERRC ;TRACKS LEFT BY USERRR??
******** GOGOL[S,AIL] **** PAGE 26
1) ;;%BF%
1) PUUO 3,@.ERBWD ;PRINT ERROR STRING.
1) MOVE A,-6(P) ;RETURN ADDRESS
*** GOGOL[X,AIL] *** PAGE 26
2) PUUO 3,.ERSTR ;PRINT ERROR STRING.
2) MOVE A,-6(P) ;RETURN ADDRESS
******** GOGOL[S,AIL] **** PAGE 27
1) WATNOW:
1) IMSSS<;IMSSS KLUDGE FOR STUDENT SYSTEM
1) PUSHJ P,KIDCHK
1) >;IMSSS
1) MOVE A,GOGTAB ;ADDRESS OF USER TABLE
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 27,27
1) HRRZ FF,TOPBYTE(A) ;CURRENT STRING POINTER
*** GOGOL[X,AIL] *** PAGE 27
2) WATNOW: MOVE A,GOGTAB ;ADDRESS OF USER TABLE
2) HRRZ FF,TOPBYTE(A) ;CURRENT STRING POINTER
******** GOGOL[S,AIL] **** PAGE 27
1) RESGOT:
1) CAIL A,"a" ;lower case?
1) SUBI A,40 ;YES, CONVERT TO UPPER
*** GOGOL[X,AIL] *** PAGE 27
2) RESGOT: CAIL A,"a" ;lower case?
2) SUBI A,40 ;YES, CONVERT TO UPPER
******** GOGOL[S,AIL] **** PAGE 27
1) IMSSS<;KLUDGE FOR STUDENT SYSTEM
1) KIDCHK: PUSH P,A
1) PUSH P,B
1) MOVEI A,101 ;PRIMARY INPUT
1) JSYS RFMOD
1) TRNE B,1B33 ;A STUDENT JOB?
1) JRST ISKIDY ;YES
1) POP P,B
1) POP P,A
1) POPJ P,
1) ISKIDY: HRROI A,[ASCIZ/
1) Sorry, system error.
1) /]
1) JSYS PSOUT
1) SETO A,
1) JSYS KLGOT ;LOG HIM OUT
1) >;IMSSS
1) NOTENX <
1) DDIT: SKIPN JOBDDT
*** GOGOL[X,AIL] *** PAGE 27
2) DDIT: SKIPN JOBDDT
******** GOGOL[S,AIL] **** PAGE 27
1) XIT:
1) MOVEI A,[CALL6 (EXIT)] ;PREPARE TO EXIT
1) POPJ P, ;NON SKIP RETURN.
*** GOGOL[X,AIL] *** PAGE 27
2) XIT: MOVEI A,[CALL6 (EXIT)] ;PREPARE TO EXIT
2) POPJ P, ;NON SKIP RETURN.
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 27,27
******** GOGOL[S,AIL] **** PAGE 27
1) >;NOTENX
1) TENX < ;TENEX CODE TO GET UDDT (DEFINED IN THE FILSPC SECTION OF HEAD)
1) ;IF NO DDT ALREADY HERE
1) DDTORG←←770000
1) DDTPAG←←770
1) UDTSYM←←DDTORG+1 ;UDDT KEEPS A SYMBOL TABLE POINTER HERE
1) DDIT: SKIPE JOBDDT
1) JRST [HRROI 1,[ASCIZ/
1) Type DT.RET$G to continue.
1) /]
1) JSYS PSOUT
1) MOVEI A,[JRST @JOBDDT]
1) POPJ P,]
1) PUSH P,1
1) PUSH P,2
1) MOVE 1,[XWD 400000,DDTPAG] ;XWD THIS FORK, PAGE 770
1) JSYS RPACS ;TEST FOR PAGE 770
1) TLNN 2,10000 ;DOES PAGE 770 EXIST?
1) JRST GTUDDT ;NOPE
1) MOVE 1,DDTORG
1) CAME 1,[JRST DDTORG+2] ;DOES IT LOOK LIKE UDDT?
1) JRST GTUDDT ;NOPE
1) GOTUDT: HRROI 1,[ASCIZ/
1) Type DT.RET$G to continue.
1) /]
1) JSYS PSOUT
1) POP P,2
1) POP P,1
1) MOVEI 1,[JRST DDTORG] ;SET UP FOR CALL
1) POPJ P,
1) GTUDDT: MOVSI 1,1
1) HRROI 1,[UDTFIL]
1) JSYS GTJFN
1) JRST [HRROI 1,[ASCIZ/
1) Cannot GTJFN file:
1) /]
1) JSYS PSOUT
1) HRROI 1,[UDTFIL]
1) JSYS PSOUT
1) JSYS HALTF
1) ]
1) PUSH P,1 ;SAVE JFN
1) MOVEI 1,400000 ;THIS FORK
1) JSYS GEVEC ;GET ENTRY VECTOR INTO 2
1) POP P,1 ;JFN FOR UDDT FILE
1) HRLI 1,400000 ;THIS FORK
1) JSYS GET
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 27,27
1) MOVEI 1,400000 ;THIS FORK
1) JSYS SEVEC ;PUT BACK THE ENTRY VECTOR
1) MOVE 1,JOBSYM ;SET UP SYMBOL TABLE POINTER
1) MOVEM 1,@UDTSYM ;SAVE FOR USER
1) JRST GOTUDT ;AND RETURN
1) XIT: MOVEI A,[JRST DOHLTF] ;TENEX VERSION OF EXIT CODE
1) POPJ P,
1) EPOPJ: AOS (P) ;SKIP RETURN
1) POPJ P,
1)
1) DOHLTF: HRROI A,-1
1) JSYS CLOSF ;CLOSING ALL FILES
1) JFCL ;IS PROBABLY DONE
1) JSYS HALTF ;AUTOMATICALLY ON
1) JRST .-1 ;THE DEC SYSTEM
1) >;TENX
1) BADRSP: TERPRI <Reply [CR] to continue,
*** GOGOL[X,AIL] *** PAGE 27
2) BADRSP: TERPRI <Reply [CR] to continue,
******** GOGOL[S,AIL] **** PAGE 29
1) DSCR ERMSBF
1) CAL SAIL -- ERMSBF(#CHARS)
1) DES WILL CALL CORGET, IF NEED BE TO ENSURE THAT YOU CAN HAVE AT LEAST
1) THE SPECIFIED NUMBER OF CHARS-1 IN YOUR ERROR MESSAGES.
1) SETS UP .ERBWD TO BYTE (13)CHARCNT(23)BUFADR
1) ⊗
1) HEREFK(ERMSBF,.ERMBF)
1) PUSHJ P,SAVE
1) MOVE A,-1(P) ;GET NEW BUFFER, IF NEED IT
1) MOVEI B,0 ;
1) CAIGE A,.ERSWC*5 ;WILL .ERSTR WORK ??
1) JRST FROLD ;YES THE 0 WILL FORCE ITS USE BY NEXT ERR UUO
1) MOVE C,A ;HOW MANY WORDS??
1) IDIVI C,5 ;
1) ADDI C,1 ;FOR SAFETY'S SAKE
1) PUSHJ P,CORGET ;TRY & GET A BLOCK
1) ERR <CORGET OUT OF ROOM>
1) DPB A,[POINT =13,B,12] ; COUNT INTO B
1) FROLD: EXCH B,.ERBWD ;
1) JUMPE B,ERSXT ;WAS NULL BEFORE ??
1) MOVEI B,@B ;GET ADDRESS
1) CAIE B,.ERSTR ;WAS .ERSTR BEFORE ??
1) PUSHJ P,CORREL ;NO, MUST BE A CORGET BLOCK
1) ERSXT: MOVE LPSA,X22
1) JRST RESTR ;GO QUIT
1) SUBTTL Code to Handle Linkage to Editors
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 29,29
1) NOTENX <
1) TVEDIT: TDZA 13,13 ;FLAG AS TV
*** GOGOL[X,AIL] *** PAGE 29
2) SUBTTL Code to Handle Linkage to Editors
2) TVEDIT: TDZA 13,13 ;FLAG AS TV
******** GOGOL[S,AIL] **** PAGE 31
1) >;NOTENX
1) TENX <
1) NOIMSSS<
1) EDIT:
1) TVEDIT: TERPRI <
1) Automatic switching to editors not implemented >
1) JRST WATNOW
1) >;NOIMSSS
1) IMSSS<
1) EDIT: TDOA A,[-1] ;INDICATE STOPGAP
1) TVEDIT: SETZ A, ;INDICATE TERMINAL-DEPENDENT EDITOR
1) SKIPE .ERRP. ;ANYTHING THERE?
1) JRST TVEDI1 ;YES
1) TERPRI <You cannot edit from here.>
1) JRST WATNOW
1) TVEDI1:
1) PUSH P,A ;INFORMATION ABOUT WHICH EDITOR TO THE STACK
1) MOVEI A,1 ;INDICATE THAT WE WANT AN EDIT
1) PUSHJ P,@.ERRP. ;FOR COMPILER, TO MYERR
1) JRST WATNOW ;WHAT -- IT CONTINUED?
1) >;IMSSS
1) >;TENX
1) SUBTTL SAVE, RESTR, INSET -- General Utility Routines
*** GOGOL[X,AIL] *** PAGE 31
2) SUBTTL SAVE, RESTR, INSET -- General Utility Routines
******** GOGOL[S,AIL] **** PAGE 36
1) NOTENX <
1) CALL6 (TEMP,CORE) ;GET ENOUGH
1) CORERR <DRYROT -- NO ROOM FOR USER TABLE>
1) >;NOTENX
1) TENX <
1) HRRZM TEMP,JOBREL
1) >;TENX
1) CORTHER:
*** GOGOL[X,AIL] *** PAGE 36
2) CALL6 (TEMP,CORE) ;GET ENOUGH
2) CORERR <DRYROT -- NO ROOM FOR USER TABLE>
2) CORTHER:
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 36,36
******** GOGOL[S,AIL] **** PAGE 38
1) ;;%##% TWO SEGS OVER 400000 IS A LOSER
1) UP <
1) TENX <
1) ;;ON TENEX, SEGLOC MAY BE ALMOST ANYWHERE
1) IFNDEF SEGLOC, <SEGLOC←←400000>
1) CAIL TEMP,SEGLOC ;WELL??
1) JRST BLEWIT ;GREAT EROR
1) >;TENX
1) NOTENX <
1) CAIL TEMP,400000 ;
1) JRST BLEWIT ;
1) >;NOTENX
1) >;UP
1) NOTENX <
1) CALL6 (TEMP,CORE) ;ASK FOR MORE
*** GOGOL[X,AIL] *** PAGE 38
2) UP <
2) ;;%##% TWO SEGS OVER 400000 IS A LOSER
2) CAIL TEMP,400000 ;WELL??
2) JRST BLEWIT ;GREAT EROR
2) >;UP
2) CALL6 (TEMP,CORE) ;ASK FOR MORE
******** GOGOL[S,AIL] **** PAGE 38
1) >;NOTENX
1) TENX <
1) HRRZM TEMP,JOBREL ;SEE COMMENT @ NODDT ABOVE
1) >;TENX
1) ;;%BB% dcs ! for 2
*** GOGOL[X,AIL] *** PAGE 38
2) ;;%BB% dcs ! for 2
******** GOGOL[S,AIL] **** PAGE 40
1) NOTENX <
1) CALL6 (TEMP,CORE)
1) ERR <DRYROT --CORSER&LNKRET>
1) >;NOTENX
1) TENX <
1) HRRZM TEMP,JOBREL ;SEE COMMENT @ NODDT ABOVE
1) >;TENX
1) ;;%BB%
*** GOGOL[X,AIL] *** PAGE 40
2) CALL6 (TEMP,CORE)
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 40,40
2) ERR <DRYROT --CORSER&LNKRET>
2) ;;%BB%
******** GOGOL[S,AIL] **** PAGE 43
1) ;;#QQ# RHT ! BOY, WAS I ASLEEP WHEN I WROTE THIS CODE
1) HRRZ D,-1(SP) ;LOAD LENGTH
1) ;;#QP# RHT ! (1 OF 4)
1) HRRZ B,(SP)
1) CANON <(SP)>,B ;STANDARD FORM
1) ADD B,D ;ADD LENGTH
1) ;;#QP# RHT ! (2 OF 4)
1) HRRZ C,TOPBYT(USER)
1) CANON <TOPBYT(USER)>,C
*** GOGOL[X,AIL] *** PAGE 43
2) CANON <(SP)>,B ;STANDARD FORM
2) ADD B,D ;ADD LENGTH
2) CANON <TOPBYT(USER)>,C
******** GOGOL[S,AIL] **** PAGE 43
1) ;;#QP# ! RHT (3 OF 4)
1) HRRZ B,(SP)
1) CANON <(SP)>,B ;ON TOP NOW ??
1) ADD B,D
1) ;;#QP# ! RHT (HAD MISREAD CANON) 4 OF 4
1) HRRZ C,TOPBYT(USER)
1) CANON <TOPBYT(USER)>,C
*** GOGOL[X,AIL] *** PAGE 43
2) CANON <(SP)>,B ;ON TOP NOW ??
2) ADD B,D
2) CANON <TOPBYT(USER)>,C
******** GOGOL[S,AIL] **** PAGE 43
1) ;;#RI# RHT SOMETIMES NEED A FW BNDRY
1) SKIPE SGLIGN(USER) ;NEED FW BNDRY??
1) PUSHJ P,INSET ;YES
1) ;;#RI#
1) MOVE B,TOPBYT(USER) ;NEW STRING BP
*** GOGOL[X,AIL] *** PAGE 43
2) MOVE B,TOPBYT(USER) ;NEW STRING BP
******** GOGOL[S,AIL] **** PAGE 44
1) NOTENX <
1) CALL6 (TEMP,MSTIME)
1) MOVNM TEMP,SGCTIME(USER)
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 44,44
1) >;NOTENX
1) TENX <
1) MOVEM 1,SGCTIME(USER) ;SAVE 1 & 2
1) MOVE TEMP,2 ;"TIME" GIVES TIME IN 1, DIVISOR
1) JSYS TIME ;TO GET SECONDS IN 2 (ALWAYS
1) MOVNS 1 ;1000 SO FAR)
1) EXCH 1,SGCTIME(USER) ;BUT SHOULD THIS REALLY BE TIME
1) MOVE 2,TEMP ;OF DAY, NOT BILLABLE RUNTIME?
1) >;TENX
1) SGC1: MOVEM 11,SGACS+11(USER)
*** GOGOL[X,AIL] *** PAGE 44
2) CALL6 (TEMP,MSTIME)
2) MOVNM TEMP,SGCTIME(USER)
2) SGC1: MOVEM 11,SGACS+11(USER)
******** GOGOL[S,AIL] **** PAGE 46
1) ;;#RL# (CMU =B2=) USED TO ACCESS .NEXT AFTER THE CORREL
1) MOVE A,.NEXT(A)
1) PUSHJ P,CORREL ; apparently no longer necessary.
1) JUMPN A,RELLUP
1) ;;#RL#
1) ;STRNGC -- STSTAT -- Finish Up, collect statistics
*** GOGOL[X,AIL] *** PAGE 46
2) PUSHJ P,CORREL ; apparently no longer necessary.
2) SKIPE A,.NEXT(A)
2) JRST RELLUP
2) ;STRNGC -- STSTAT -- Finish Up, collect statistics
******** GOGOL[S,AIL] **** PAGE 47
1) NOTENX <
1) CALL6 (TEMP,MSTIME) ;Collect GC times
1) >;NOTENX
1) TENX <
1) EXCH 1,TEMP
1) PUSH P,2
1) JSYS TIME
1) POP P,2
1) EXCH 1,TEMP
1) >;TENX
1) ADDB TEMP,SGCTIME(USER)
*** GOGOL[X,AIL] *** PAGE 47
2) CALL6 (TEMP,MSTIME) ;Collect GC times
2) ADDB TEMP,SGCTIME(USER)
******** GOGOL[S,AIL] **** PAGE 57
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 57,57
1) NOTENX<
1) MOVE USER,GOGTAB
*** GOGOL[X,AIL] *** PAGE 57
2) MOVE USER,GOGTAB
******** GOGOL[S,AIL] **** PAGE 57
1) >;NOTENX
1) TENX<;TENEX VERSION OF K.OUT
1) MOVE USER,GOGTAB
1) SKIPN KNTLNK(USER) ;ANY KOUNTERS?
1) POPJ P,
1) COMMENT ⊗ SAVE ACS 0-14
1) ⊗;
1) MOVEM 14,15(P)
1) MOVEI 14,1(P)
1) BLT 14,14(P)
1) ADD P,[XWD 15,15]
1) TLNN P,400000 ;OVERFLOW?
1) ERR <PDL overflow in K.OUT routine>
1) COMMENT ⊗ Chain the counters together as above.
1) ⊗;
1) MOVE 2,KNTLNK(USER)
1) SKIPN 1,(2)
1) JRST .+5
1) MOVEI 0,1(2)
1) MOVEM 0,3(1)
1) MOVE 2,1
1) JRST .-5
1)
1) COMMENT ⊗
1) At this point, 1(2) contains the start of a DEC-style
1) dump mode command chain that will be used to write out the
1) counters. -1(2) contains the sixbit for the file name.
1) ⊗;
1) MOVE 5,2 ;SAVE POINTER TO THE CHAIN
1) PUSH P,-1(5) ;SIXBIT/FILENAME/
1) PUSHJ P,CVXSTR ;GET ASCII
1) PUSH P,[0]
1) PUSHJ P,CATCHR ;PUT A NULL BYTE ON THE END
1) POP SP,2 ;BP TO 2 FOR GTJFN
1) SUB SP,X11 ;CLEAR SP STACK
1) MOVEI 1,EKNT ;LONG FORM
1) JSYS GTJFN
1) JRST KNTERR ;GTJFN ERROR
1) MOVE 2,[XWD 440000,100000] ;36 BIT WRITE
1) JSYS OPENF ;JFN REMAINS IN 1
1) JRST KNTERR ;OPENF ERROR
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 57,57
1) ;5 HAS THE START OF A DUMP-MODE COMMAND CHAIN, WHICH WE MUST
1) ;INTERPRET INTO SOUT'S
1) MOVEI 4,1(5) ;START OF COMMAND LIST
1) KNTLUP: MOVE 3,(4)
1) JUMPE 3,KNTDUN ;0 COMMAND MEANS TO STOP
1) TLNE 3,-1 ;0 LEFT HALF MEANS GOTO
1) JRST KNTOUT ;REAL IO WORD
1) MOVE 4,3 ;OK DO THE GOTO
1) JRST KNTLUP
1)
1) KNTOUT: HRRI 2,1(3) ;FIRST LOCATION
1) HRLI 2,444400 ;MAKE A BP
1) HLRO 3,3 ;WORD COUNT
1) JSYS SOUT
1) AOJA 4,KNTLUP
1) KNTDUN: JSYS CLOSF ;CLOSE OUT THE FILE
1) JFCL ;ERROR RETURN
1)
1) KNTRET: MOVSI 14,-14(P) ;RESTORE ACS
1) BLT 14,14
1) SUB P,[XWD 15,15]
1) POPJ P, ;AND RETURN
1) KNTERR: ERR <K.OUT: Cannot GTJFN or OPENF file>,1
1) JRST KNTRET
1) EKNT: XWD 400000,0 ;NEW VERSION
1) XWD 377777,377777 ;NO EXTRA JFNS
1) BLOCK 3
1) XWD -1,[ASCIZ/KNT/] ;DEFAULT VERSION IS .KNT
1) BLOCK 3
1) >;TENX
1) ENDCOM (KNT)
*** GOGOL[X,AIL] *** PAGE 57
2) ENDCOM (KNT)
******** GOGOL[S,AIL] **** PAGE 60
1) NOTENX <;CALL FUNCTION EMULATED IN FILE CALL.TNX
1) DSCR VALUE←CALL(VAL,"FUNCTION");
*** GOGOL[X,AIL] *** PAGE 60
2) DSCR VALUE←CALL(VAL,"FUNCTION");
******** GOGOL[S,AIL] **** PAGE 60
1) >;NOTENX
*** GOGOL[X,AIL] *** PAGE 60
1) GOGOL[S,AIL] vs. 2) GOGOL[X,AIL] SRCCOM 03-19-74 07:09 PAGES 60,60