1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-13 23:36:30 +00:00

Update MIDAS;TSRTNS from 231 to 234.

This commit is contained in:
Lars Brinkhoff 2016-11-03 21:12:11 +01:00
parent d09e5fb011
commit 0efda0c8bc

74
src/midas/tsrtns.231 → src/midas/tsrtns.234 Executable file → Normal file
View File

@ -69,6 +69,7 @@ IFNDEF CRFBSZ,CRFBSZ==DECBFL
IFNDEF LSTBSZ,LSTBSZ==DECBFL
IFNDEF ERRBSZ,ERRBSZ==DECBFL
] ;DECSW
IFN TNXSW,IFNDEF CMBFL,CMBFL==200 ; Longer for PRARG% block stuff
IFNDEF CMBFL,CMBFL==50 ; Length of command buffer.
IFNDEF UTIBFL,UTIBFL==400 ; " Input buffer.
IFNDEF UTOBFL,UTOBFL==200 ; " BIN output buffer.
@ -594,10 +595,16 @@ TSRETN: SKIPLE A,ERRCNT ; If had any errors,
IFN TNXSW,[
TSRETN: SKIPE CCLMOR ; Need to hack any more CCL?
JRST RERUN ; Yeah.
ifdef prarg,[ ; I don't know if tenex has a PRARG
;;; Try to simulate .logout 1, on TNX
movei 2,[2,,0] ;2 is kill this fork code
Move 1,[.PRAST,,.FHSLF] ;yea, kill ME
Movei 3,1
PRARG] ; ifdef PRARG
TSRET1: HALTF
HRROI 1,[ASCIZ/Can't continue/]
PSOUT ; Better than dying randomly
JRST TSRET1
JRST TSRET1 ; stupid system can't understand .logout 1,
] ; IFN TNXSW
SUBTTL MIDAS Murder - fatal internal error handling (GOHALT)
@ -625,13 +632,18 @@ Please send a message to BUG-MIDAS @ MIT-MC describing circumstances.
Error was at location: |]
PSOUT
MOVEI R1,.PRIOU
HRRZ B,HALTER
MOVEI C,8.
HRRZ R2,HALTER
MOVEI R3,8.
NOUT
ERJMP .+1
HRROI R1,[ASCIZ /
/]
PSOUT
hrroi r1,[asciz /, ERRCOD = /]
psout
movei r1,.priou
move r2,errcod
nout
erjmp .+1
hrroi r1,[asciz "
"] ? psout
MOVE R1,HALTR1 ; Restore R1 etc. for later examination
MOVE R2,HALTR2
MOVE R3,HALTR3
@ -2988,7 +3000,7 @@ JCLINI: SETZM CMPTR
BLTZ CMBFL-1,CMBUF ; Zero all but last word,
SETOM CMBUF+CMBFL-1 ; and ensure last word non-zero.
.BREAK 12,[5,,CMBUF] ; Try to read command string.
MOVE A,[440700,,CMBUF]
MOVE A,[010700,,CMBUF-1] ; (Must be positive; see CMD)
SKIPE CMBUF ; If read a cmd-string,
MOVEM A,CMPTR ; Tell TYRLD, GO2A it's there.
POPJ P,
@ -3108,17 +3120,38 @@ JCLIN3: MOVE C,B ; Now flush spaces. Save last ptr for chars.
; TNX snarf of CCL file. No such thing as tmpcor, so just
; look for real file with appropriate name.
JCLIN5: SETZM CCLFLG ; Want 0 in case abort out, will reset if win.
GJINF ; Get job # in R3
HRROI R1,CMBUF ; Use CMBUF to form filename string.
JCLIN5: SETZM CCLFLG ; Want 0 in case abort out, will reset if win.
MOVE R1,[.PRARD,,.FHSLF]
MOVEI R2,CMBUF ; First look for stuff in PRARG% block
MOVEI R3,CMBFL ; (like PA1050, see PAT.MAC for details)
PRARG%
JUMPLE R3,JCLIN7 ; No argument block, try file
SKIPE R1,CMBUF ; Get count of "files"
TLNE R1,-1 ; LH must be zero, RH non-zero
JRST JCLIN7 ; Not TMPCOR format, try file
MOVNS R1 ; Make AOBJN pointer
HRLZS R1
JCLIN6: HRRZ R2,CMBUF+1(R1) ; Get "file" pointer
HLRZ R3,CMBUF(R2) ; Get tag for this "file"
CAIE R3,'MID ; MIDAS?
AOBJN R1,JCLIN6 ; No, next "file"
JUMPGE R1,JCLIN7 ; Try real file if lost
ADD R2,[010700,,CMBUF] ; Point at commands in buffer
MOVEM R2,CMPTR ; NB: must be positive (see CMD:)
SETOM CCLFLG ; Remember that we saw CCL
POPJ P, ; And get out of here
; Here when no PRARG% stuff, try for real file.
JCLIN7: GJINF ; Get job # in R3
HRROI R1,CMBUF ; Use CMBUF to form filename string.
MOVEI R2,(R3)
MOVE R3,[NO%LFL+NO%ZRO+<3_18.>+10.]
NOUT ; ship out job num in 3 digits, radix 10.
NOUT ; ship out job num in 3 digits, radix 10.
GOHALT
HRROI R2,[ASCIZ /MID.TMP/]
SETZ R3,
SOUT ; Flesh out rest of filename string.
SETZ R2, ; Make sure it's ASCIZ.
SOUT ; Flesh out rest of filename string.
SETZ R2, ; Make sure it's ASCIZ.
BOUT
MOVE R1,[GJ%OLD+GJ%SHT] ; Use short-form GTJFN
HRROI R2,CMBUF ; and gobble name from CMBUF.
@ -3132,8 +3165,7 @@ JCLIN5: SETZM CCLFLG ; Want 0 in case abort out, will reset if win.
MOVEI R4,^J ; or LF seen.
SIN
JUMPLE R3,APOPJ ; Forget it if too big for buffer!!
MOVE R2,[440700,,CMBUF] ; Aha, we've got something, so set
MOVE R2,[010700,,CMBUF-1] ; Aha, we've got something, so set
MOVEM R2,CMPTR ; pointer to slurped stuff.
SETOM CCLFLG
HRROI R2,UTIBUF ; Slurp rest into larger buffer,
@ -3257,7 +3289,7 @@ JCLINI: SETZM CMPTR
JRST .+1]
SKIPN CMBUF ; One last check for it to be there
RET ; Alas, there is none
MOVE A,[440700,,CMBUF] ; Load a byte pointer to the command
MOVE A,[010700,,CMBUF-1] ; Load a byte pointer to the command
SETOM CCLFLG
MOVEM A,CMPTR ; There is, set command pointer
JCLIN1: ILDB B,A
@ -3443,11 +3475,11 @@ SUBTTL Command Line Reader (CMD)
.SCALAR CMDPSV ; Saves read ptr into CMBUF, for re-scanning.
CMD: MOVE T,CMPTR ; Check JCL.
CAMN T,[-1] ; If Tenex-type "JCL",
JRST CMD06X ; normal TTY input 'cept no prompt.
JUMPL T,CMD06 ; For DDT/RSCAN/CCL strings, type nothing out.
CALL CRR ; Else must type a CRLF, prompt etc.
CMD: SKIPLE T,CMPTR ; If we have DDT or RSCAN or CCL string,
JRST CMD06 ; go hack it without typing anything out.
CAMN T,[-1] ; If Tenex-type "JCL", normal TTY input 'cept no prompt
JRST CMD06X
CALL CRR ; Nope, must type a CRLF, prompt etc.
CMD05: TYPE "*"
CMD06X: SETZB T,CMPTR
CMD06: MOVEM T,CMDPSV ; Save pointer for later restoration