perm filename COMSER.MS[MEW,AIL] blob
sn#091956 filedate 1974-03-19 generic text, type T, neo UTF8
1) COMSER vs. 2) COMSER[S,AIL] SRCCOM 03-19-74 03:16 PAGES 1,1
******** COMSER **** PAGE 1
1) COMMENT ⊗ VALID 00012 PAGES VERSION 17-1(17)
1) RECORD PAGE DESCRIPTION
1) 00001 00001
1) 00005 00002 HISTORY
1) 00007 00003 Comser Data -- Povtab, Dsplin stuff
1) 00009 00004 Strngc Supply Routines for Compiler Structures
1) 00011 00005 IMSSS<MYERR FOR IMSSS SYSTEM
1) 00021 00006 SERVICE ROUTINES TO MYERR
1) 00023 00007 MORE SERVICE ROUTINES FOR MYERR
1) 00027 00008 DSCR PRINT.
1) 00029 00009 Dsplin Routine for Displaying Input Line
1) 00033 00010 Interrupt Handler -- Intrpt, Povtrp
1) 00039 00011
1) 00040 00012
1) 00041 ENDMK
1) ⊗;
1) COMMENT ⊗HISTORY
1) AUTHOR,REASON
1) 021 102100000021 ⊗;
1) COMMENT ⊗
1) VERSION 17-1(17) 3-17-74 BY RLS INSTALL TENEX
1) VERSION 17-1(16) 12-8-73 BY JRL REMOVE SPECIAL STANFORD CHARACTERS(WHERE POSSIBLE)
*** COMSER[S,AIL] *** PAGE 1
2) COMMENT ⊗ VALID 00010 PAGES VERSION 17-1(16)
2) RECORD PAGE DESCRIPTION
2) 00001 00001
2) 00002 00002 HISTORY
2) 00004 00003 Comser Data -- Povtab, Dsplin stuff
2) 00006 00004 Strngc Supply Routines for Compiler Structures
2) 00008 00005 Compiler-Specific portion of Error UUO stuff
2) 00011 00006 SERVICE ROUTINES TO MYERR
2) 00013 00007 MORE SERVICE ROUTINES FOR MYERR
2) 00016 00008 DSCR PRINT.
2) 00018 00009 Dsplin Routine for Displaying Input Line
2) 00021 00010 Interrupt Handler -- Intrpt, Povtrp
2) 00025 ENDMK
2) ⊗;
2) COMMENT ⊗HISTORY
2) AUTHOR,REASON
2) 021 102100000020 ⊗;
2) COMMENT ⊗
2) VERSION 17-1(16) 12-8-73 BY JRL REMOVE SPECIAL STANFORD CHARACTERS(WHERE POSSIBLE)
******** COMSER **** PAGE 3
1) NOTENX <
1) MAKCDB(LOG,LOG,0,0,1)
1) COMSER vs. 2) COMSER[S,AIL] SRCCOM 03-19-74 03:16 PAGES 3,3
1) >;NOTENX
1) TENX <
1) LOGJFN: 0 ;LOGFLN, a bp to log file name, is set up in SAIL
1) ;in the command scanner
1) >;TENX
1) ZERODATA( LOGGING VARIABLES)
*** COMSER[S,AIL] *** PAGE 3
2) MAKCDB(LOG,LOG,0,0,1)
2) ZERODATA( LOGGING VARIABLES)
******** COMSER **** PAGE 4
1) IMSSS<;MYERR FOR IMSSS SYSTEM
1) COMMENT ⊗Compiler-Specific portion of Error UUO stuff⊗
1) DSCR MYERR
1) DES Part of the second segment kludge -- so that the error
1) handler can call some routines which are specific to the
1) compiler. There routines are -- display the current line.
1) -- call the editor on the current input file.
1) ⊗;
1) IFN FTDEBUG,<
1) INNA ;FR0M ERR -- TO LOOK AT STACK
1) ;> 0 ;NO DEBUGGER
1) ↑↑MYERR:
1) DSCR
1) Glorious IMSSS EDITOR interface. (Patent pending.)
1) Here we are going to decide whether we want to edit,
1) and if so, which editor.
1) If ac A has 1, then we want some kind of edit.
1) The information as to which editor we use is on the
1) stack -- 0 for whichever editor is appropriate to the device,
1) non-zero for STOPGAP, regardless of the device.
1) The only difference, apart from the run call, is the contents
1) of TMPCBF+4. This is the linenumber.
1) EDITOR CONTENTS of TMPCBF+4
1) ------ ---------------------
1) TVEDIT physical linenumber on the page
1) TEC xwd byteno,lineno
1) where byteno is the bytenumber on the
1) line, and lineno is the linenumber on the
1) page
1) SOS the ASCID STOPGAP linenumber as stored by the
1) scanner.
1) ⊗;
1) EXTERNAL JFNS,CVSIX,JFNTBL,RUNPRG
1) DEFINE JFNSMK(X,Y)<
1) PUSH P,[1]
1) PUSH P,[XWD X,0]
1) COMSER vs. 2) COMSER[S,AIL] SRCCOM 03-19-74 03:16 PAGES 4,4
1) PUSHJ P,JFNS
1) PUSHJ P,CVSIX
1) MOVEM A,Y
1) >
1) CAIE A,1 ;REQUEST FOR EDIT?
1) JRST NOE ;NO
1) ;definitely call some editor. First store things that
1) ;are the same for all editors.
1) MOVE TEMP,[XWD TMPCBF,TMPCBF+1]
1) SETZM TMPCBF
1) BLT TEMP,TMPCBF+37 ;clear before starting
1) MOVEW JFNTBL+1,SRCJFN ;FAKE FOR JFNS -- WHAT A KROK
1) MOVEW TMPCBF+32,<[SIXBIT/SYS/]>
1) MOVEW TMPCBF+33,<[SIXBIT/SAIL/]> ;return to SAIL
1) MOVE TEMP,[XWD CMDLIN,TMPCBF+6]
1) BLT TEMP,TMPCBF+30 ;COPY OVER COMMAND
1) EXCH SP,STPSAV ;GET STRING PDL
1) JFNSMK(001000,TMPCBF) ;GET FILE NAME PIECES
1) JFNSMK(000100,TMPCBF+1)
1) JFNSMK(010000,TMPCBF+3)
1) MOVEW TMPCBF+5,FPAGNO ;page number
1) SKIPN -1(P) ;STOPGAP?
1) JRST DECIDE ;NOPE, DECIDE WHICH EDITOR
1) DOSOS: SKIPN TEMP,ASCLIN ;THE LINE NO
1) MOVE TEMP,[ASCID/00000/];SUPPLY ONE
1) TRO TEMP,1 ;TURN ON BIT, IN CASE OFF
1) MOVEM TEMP,TMPCBF+4
1) ;STORE RUNCALL INFO IN TEMP
1) MOVEI TEMP,[ =16
1) POINT 7,[ASCIZ/<SUBSYS>EDIT.SAV/],-1]
1) JRST DORUNC ;DO THE RUN CALL
1) DECIDE:
1) ;HERE WE WANT TO DECIDE WHICH EDITOR TO CALL
1) ;FIRST, GET THE TENEX TTYNO.
1) ;THIS CODE IS TEMPORARY UNTIL TENEX KNOWS WHAT
1) ;IT IS DOING.
1) JSYS GJINF ;GET THE JOB INFORMATION
1) MOVE 1,4 ;TTY NO.
1) SETO 2, ;NO HSL NO.
1) JSYS TTCVT ;GET HSL TTYNO. IN OLD STYLE
1) LSH 2,-=9 ;EXTRACT HSL NO.
1) CAIN 2,5 ;IS IT SOME TEC?
1) JRST DOTEC ;YES
1) CAIL 2,14 ;CURRENT IMLAC RANGE 14-26
1) CAILE 2,26
1) JRST DOSOS ;DEFAULT TO SOS
1) MOVE TEMP,BINLIN
1) SUBI TEMP,1 ;BECAUSE TVEDIT WANTS ONE LESS
1) COMSER vs. 2) COMSER[S,AIL] SRCCOM 03-19-74 03:16 PAGES 4,4
1) MOVEM TEMP,TMPCBF+4
1) MOVEI TEMP,[=18
1) POINT 7,[ASCIZ/<SUBSYS>TVEDIT.SAV/],-1]
1) ;HERE FOR ACTUAL PASSAGE OF INFO AND CALL TO EDITOR
1) DORUNC:
1) SETO A,
1) MOVEI B,TMPCBF
1) JSYS PTINF ;SPECIAL IMSSS PTINF JSYS
1) JFCL
1) MOVEI A,400000 ;THIS FORK
1) SETO B,
1) JSYS DIC ;DEACTIVATE ALL CHANNELS
1) JSYS CIS ;CLEAR INTERRUPT SYSTEM
1) MOVEI A,10 ;CONTROL-H INTERRUPT
1) JSYS DTI ;DISABLE IT
1) PUSH P,[1] ;INCREMENT FOR CCL STUFF
1) PUSH P,[0] ;SAME FORK
1) PUSH SP,(TEMP) ;PROGRAM TO RUN
1) PUSH SP,1(TEMP)
1) PUSHJ P,RUNPRG
1) HRROI A,[ASCIZ/
1) Runcall error for IMSSS editor interface.
1) /]
1) JSYS PSOUT
1) EXCH SP,STPSAV ;PUT BACK THE STRING PDL
1) JRST SAIL
1) DOTEC: MOVE TEMP,BINLIN ;LINE NUMBER
1) ;TRICKY CODE TO GET THE BYTE NUMBER
1) MOVE A,PNEXTC ;BP TO NEXT CHAR
1) SKIPN LSTCHR ;NEED TO BACK UP BP?
1) JRST DOTEC1 ;NO
1) REPEAT 4,<IBP A>
1) SOJ A, ;BACK IT UP
1) DOTEC1: SETZ C, ;KEEP COUNT IN 3
1) MOVE B,PLINE ;POINTER TO BEGINNING OF CURRENT LINE
1) DOTECL: IBP B ;INCREMENT
1) AOJ C, ;ONE MORE CHAR
1) CAMN A,B ;SAME YET?
1) JRST GOTIT ;YES
1) CAIG C,=300 ;NO LINE GOES MORE THAN 300 CHARS
1) JRST DOTECL ;ANOTHER
1) SETZ C, ;ASSUME NONE
1) GOTIT:
1) HRL TEMP,C ;XWD BYTENO,LINENO
1) MOVEM TEMP,TMPCBF+4 ;STORE IT
1) MOVEI TEMP,[=15
1) POINT 7,[ASCIZ/<SUBSYS>TEC.SAV/],-1]
1) JRST DORUNC ;STORE INFO AND DO RUN CALL
1) COMSER vs. 2) COMSER[S,AIL] SRCCOM 03-19-74 03:16 PAGES 4,4
1) >;IMSSS
1) NOIMSSS<;MYERR FOR NON-IMSSS SYSTEM
1) COMMENT ⊗Compiler-Specific portion of Error UUO stuff⊗
*** COMSER[S,AIL] *** PAGE 4
2) COMMENT ⊗Compiler-Specific portion of Error UUO stuff⊗
******** COMSER **** PAGE 5
1) TENX <
1) JRST NOE ;NO EDIT INTERFACE ON 10X (SEE IMSSS CODE
1) ;FOR SOME BAD IDEAS)
1) >;TENX
1) NOTENX <
1) MOVE 13,SRCFIL ;FILE NAME NEEDED IN ANY CASE
*** COMSER[S,AIL] *** PAGE 7
2) MOVE 13,SRCFIL ;FILE NAME NEEDED IN ANY CASE
******** COMSER **** PAGE 5
1) >;NOTENX
1) >;NOIMSSS
1) GOHOHO: SUB SP,X44 ;GET RID OF STRINGS
*** COMSER[S,AIL] *** PAGE 7
2) GOHOHO: SUB SP,X44 ;GET RID OF STRINGS
******** COMSER **** PAGE 7
1) NOTENX <
1) SETFL: RELEASE LOG,0
*** COMSER[S,AIL] *** PAGE 7
2) SETFL: RELEASE LOG,0
******** COMSER **** PAGE 7
1) >;NOTENX
1) TENX <
1) SETFL: MOVEI A,ELOGF ;FILENAME FROM TERMINAL
1) JRST SETXX
1) SETLOG: MOVEI A,ELOGL ;STANDARD FILENAME
1) SETXX: SETZ B,
1) JSYS GTJFN
1) JRST BDLGFL
1) MOVE B,[XWD 70000,100000] ;7 bit writing
1) JSYS OPENF
1) JRST BDLGFL
1) EXCH 1,LOGJFN ;Take care of any leftover jfn
1) JUMPG 1,[ HRRZI 1,(1) ;Clear lh so CLOSF will also do RLJFN
1) JSYS CLOSF
1) COMSER vs. 2) COMSER[S,AIL] SRCCOM 03-19-74 03:16 PAGES 7,7
1) JFCL
1) JRST .+1]
1) >;TENX
1) SETOM %LOGGIN
1) PUSH P,%QUIET ;SAVE FLAGS
1) SETOM %QUIET ;MAKE IT NOT PRINT
1) PUSHJ P,ERPRIN ;PRINT AGAIN
1) POP P,%QUIET ;RESTORE FLAGS
1) JRST GOFLY
1) TENX <
1) BDLGFL: HRROI 1,[ASCIZ /
1) Cannot set up your logfile.
1) /]
1) JSYS PSOUT
1) JRST GOFLY
1) ;long form GTJFN block -- this is for default file name
1) ELOGL: XWD 400000,0
1) XWD 377777,377777
1) 0
1) 0
1) XWD -1,DEFFLN ;set in CC
1) XWD -1,[ASCIZ/LOG/]
1) BLOCK 3
1) ;this one is for file from terminal
1) ELOGF: XWD 460000,0 ;CONFIRM BITS ON
1) XWD 100,101
1) 0
1) 0
1) XWD -1,DEFFLN
1) XWD -1,[ASCIZ/LOG/]
1) BLOCK 3
1) >;TENX
1) DEBUGA:
*** COMSER[S,AIL] *** PAGE 7
2) SETOM %LOGGIN
2) PUSH P,%QUIET ;SAVE FLAGS
2) SETOM %QUIET ;MAKE IT NOT PRINT
2) PUSHJ P,ERPRIN ;PRINT AGAIN
2) POP P,%QUIET ;RESTORE FLAGS
2) JRST GOFLY
2) DEBUGA:
******** COMSER **** PAGE 8
1) NOTENX <
1) HRLI A,(<POINT 7,0>) ;BYTE POINTER
1) GG..: ILDB B,A ;GET BYTE
1) JUMPE B,MPOPJ ;END OF LINE
1) COMSER vs. 2) COMSER[S,AIL] SRCCOM 03-19-74 03:16 PAGES 8,8
1) SOSG LOGCNT
1) OUTPUT LOG,
1) IDPB B,LOGPNT
1) JRST GG..
1) >;NOTENX
1) TENX <
1) HRROI 2,(1)
1) HRRZ 1,LOGJFN
1) PUSH P,3
1) SETZ 3,
1) JSYS SOUT
1) POP P,3
1) >;TENX
1) MPOPJ: POP P,B
*** COMSER[S,AIL] *** PAGE 8
2) HRLI A,(<POINT 7,0>) ;BYTE POINTER
2) GG..: ILDB B,A ;GET BYTE
2) JUMPE B,MPOPJ ;END OF LINE
2) SOSG LOGCNT
2) OUTPUT LOG,
2) IDPB B,LOGPNT
2) JRST GG..
2) MPOPJ: POP P,B
******** COMSER **** PAGE 9
1) NOTENX <
1) NOBAK: PUSH P,12 ;SAVE TEMPORARILY
*** COMSER[S,AIL] *** PAGE 9
2) NOBAK: PUSH P,12 ;SAVE TEMPORARILY
******** COMSER **** PAGE 9
1) >;NOTENX
1) TENX <
1) NOBAK: PUSH P,B
1) MOVE TEMP,[POINT 7,DLINBF] ;OUTPUT POINTER
1) MOVE A,[POINT 7,SRCFLN] ;NAME, SET UP IN CC
1) PUSHJ P,ASCFIL ;COPY OVER, LEAVING UPDATED BP IN TEMP
1) POP P,B
1) >;TENX
1) MOVE D,FPAGNO
*** COMSER[S,AIL] *** PAGE 9
2) MOVE D,FPAGNO
******** COMSER **** PAGE 10
1) NOTENX <
1) COMSER vs. 2) COMSER[S,AIL] SRCCOM 03-19-74 03:16 PAGES 10,10
1) ↑INTRPT:
*** COMSER[S,AIL] *** PAGE 10
2) ↑INTRPT:
******** COMSER **** PAGE 10
1) >;NOTENX
1) TENX <
1) ;First the TENEX equivalent of <ESC>I - currently control H - which
1) ;is copied somewhat blindly from DCS's code @ INTRPT above. The only
1) ;other TENX switched code related to this is in SAILNIT where
1) ;the compiler sticks the right vector into the channel table to direct
1) ;the interrupt here and arm the control character (ATI jsys).
1) ↑ITTYDO: SETZM %ERGO
1) SETZM %QUIET
1) SETZM MULTP
1) MOVEM TEMP,.DBG. ;SAVE TEMP
1) MOVE TEMP,[XWD 400000,377777] ;MAGIC NUMBER WORKS FOR DCS
1) EXCH TEMP,.DBG. ;OUGHT TO WORK FOR ME. RESTORE TEMP
1) JSYS DEBRK ;CONTINUE INTERRUPTED CODE
1) ;Now for PDLOV stuff. Like <ESC I> requires SAIL init. to set up CHNTAB
1) ;but in this case it MUST set it up as a level 3 interrupt or at least
1) ;the same level assumed by the EXCH below. Also Stanford people beware
1) ;of TENEX DEBRK which is just different enough from your DEBREAK to be
1) ;confusing. See a JSYS manual.
1) EXTERNAL LPC3
1) ↑POVDO: MOVEM TEMP,PDLSV
1) MOVEM LPSA,PDLSV1
1) HRRZI TEMP,.+3
1) EXCH TEMP,LPC3 ;ASSUME LEVEL 3. FORCE CONTINUATION
1) ;OF INTERRUPTED CODE AT THE DEBRK+1
1) JSYS DEBRK
1) ;BACK TO NORMAL USERMODE NOW; AC'S NOT CHANGED (I.E. SAVED OR RESTORED)
1) ;THUS TEMP STILL HOLDS REAL INTERRUPT ADDR FOR PUTTING INTO JOBTPC
1) >;TENX
1) MOVEM TEMP,JOBTPC ;SO CODE BELOW WORKS (A REAL HACK)
*** COMSER[S,AIL] *** PAGE 10
2) MOVEM TEMP,JOBTPC ;SO CODE BELOW WORKS (A REAL HACK)