Trailing-Edge
-
PDP-10 Archives
-
bb-kl11i-bm_tops20_v7_0_atpch_1-22
-
autopatch/tfrcob.c11
There are 3 other files named tfrcob.c11 in the archive. Click here to see a list.
REP 3/1 ;11C1
;COPYRIGHT (C) 1980, 1981, 1983 BY
WIT
;COPYRIGHT (C) 1980, 1981, 1983, 1985 BY
REP 22/1 ;11C2
IF1 <PRINTX TFRCOB-20 Version 4(200)>
WIT
IF1 <PRINTX TFRCOB-20 Version 4(226)>
INS 1/2 ;11C3
;EDITS
;NAME DATE COMMENTS
;V4*****************
;BCM 14-May-85 [226] In $00ATR, check for any change of line state.
;BCM 03-May-85 [225] In DOABS, fix comparison for beyond screen
;BCM 17-Apr-85 [223] Save JFN mode before SFMOD.
;BCM 17-Apr-85 [222] Reinstate wakeup bits when setting ECHO.
;BCM 26-Mar-85 [221] In TFRSET, if V132FG is on, set terminal to 132.
;BCM 22-Mar-85 [220] Correct tests for AVO capable terminals.
;BCM 21-Mar-85 [216] Force out the MULTIPLE display, before ERRLINE.
;BCM 20-Mar-85 [215] Use TFRLPT:TFRLPT.LST to open for LPT output.
;BCM 20-Mar-85 [214] If first subfield of money field,last chr is zero
;BCM 20-Mar-85 [212] Turn off graphics when displaying help.
;MJC 19-Mar-85 [211] Cause <DELETE><CRLF> to return data from TFRRD
; by ckecking for PREDUP in TXTPRE
;BCM 19-Mar-85 [210] SFMOD all wakeup bits.
;BCM 19-MAR-85 [207] If the last chr of numeric field is not numeric
; assume overpunched number, and convert to
; a negative representation.
;BCM 19-Mar-85 [206] Always use IC%UTZ and allow Tops-20 to
; fixup for local time.
;BCM 6-Mar-85 [205] Change position of 201 code, to after count
; of significant digits.
;MJC 2-FEB-85 [204] Call $TTCHK if OLD%TT is set on call to TFRCOB.
;BCM 29-JAN-85 [203] Force out buffers for end of MULTIPLE section
;MJC 29-JAN-85 [202] Add code to TFRCLR to clear a MULTIPLE section.
;MJC 25-JAN-85 [201] Fix ENUMRD setup in WRTDSP to store the number
;; of characters to fill.
;********************
REP 35/11 ;11C4
SETOM DOCHK ;THEN MAKE SURE IT HAPPENS
WIT
CALL $TTCHK ;[204] THEN DO IT
INS 33/34 ;11C5
MOVE A,LENFLD ;[207] GET LENGTH OF FIELD
ADJBP A,VALFLD ;[207] GET BPTR TO LAST CHR
LDB B,A ;[207] GET LAST CHR
MOVE C,CHRTAB(B) ;[207] DETERMINE IF NUMERIC
TRNE C,NUMCHR ;[207] IF NUMERIC
JRST RPZ.1 ;[207] THEN CONTINUE
SUBI B,31 ;[207] ELSE, CONVERT TO NUMERIC
MOVE C,CHRTAB(B) ;[207] GET REAL NUMBER
TRNN C,NUMCHR ;[207] IF NOT 1 TO 9,
MOVEI B,"0" ;[207] THEN ASSUME OVERPUNCHED ZERO
SETOM ISNEG ;[207] INDICATE NEGATIVE NUMBER
DPB B,A ;[207] STORE THE NUMERIC VALUE
REP 48/34 ;11C6
TXNE PRM,%MONEY ;IF THIS IS THE FIRST SUBFIELD IN
SKIPN SUBCNT ; A MONEY FIELD, THE PUT IN A ZERO
JRST RPZ.1
MOVEI A,ZERO
WIT
TXNN PRM,%MONEY ;[214] IF THIS IS THE FIRST SUBFIELD IN
JRST RPZ.1 ;[214] A MONEY FIELD, NO
MOVEI A,ZERO ;[214] YES, THEN PUT IN A ZERO
INS 62/38 ;11C7
SUB B,LENFLD ;[205] NUMBER TO FILL
MOVMM B,ENUMRD ;[205] EQUALS (LEN - DATA SIZE)
INS 67/38 ;11C8
TXO PRM,%DSPLY ;[202] TURN ON %DSPLY IF %MULT
DEL 88/38 ;11C9
MOVEM Z,ENUMRD
INS 42/39 ;11C10
CALL $SEND ;[216] FORCE PREVIOUS OUT NOW
REP 53/39 ;11C11
JRST MWR.3 ;NO - SCROLL THE REST OUT
WIT
JRST MWR.21 ;[203] NO - SCROLL THE REST OUT
REP 57/39 ;11C12
MWR.3:
WIT
MWR.21:
SETOM NOSCRL ;[203] ENABLE SCROLLING
MOVE A,MLTHIR ;[203] POINT TO THE LAST LINE
MOVEI B,1 ;[203]
CALL $POSIT ;[203]
CALL $SCRLU ;[203] SCROLL UP A LINE
CALL $SEND ;[203] FORCE IT OUT
MWR.3:
SETOM NOSCRL ;[203] ENABLE SCROLLING
INS 64/39 ;11C13
CALL $SEND ;[203] FORCE OUT BUFFER
INS 58/42 ;11C14
SKIPE MLTCT1 ;[202] IF MULTIPLE
JRST ABL.3 ;[202] THEN SKIP AHEAD
INS 64/42 ;11C15
ABL.3: ;[202] HERE FOR MULTIPLE SECTION
REP 21/60 ;11C16
CAMG B,.ONCOL ; END OF THE SCREEN
WIT
;**;[225] At DOABS+4L, change 1 line
CAMGE B,.ONCOL ;[225] END OF THE SCREEN
REP 82/61 ;11C17
TDNN B,CHRTAB(A) ;END OF FIELD CHAR.
WIT
TDNE B,CHRTAB(A) ;[211]END OF FIELD CHAR.
SKIPL PREDUP ;[211]BUT NOT IF <DELETE>
DEL 1/62 ;11C18
INS 44/62 ;11C19
SKIPE MLTCT1 ;[202] MULIPLE SECTION?
JRST CLR.10 ;[202] YES - CLEAR IT
INS 78/62 ;11C20
CLR.10: ;[202] CLEAR A MULTIPLE SECTION
CALL ABLANK ;[202] CLEAR FIRST LINE
;[202] SETS UP AC-B AND AC-C
SKIPA A,MLTLOR ;[202] GET FIRST LINE
CLR.11: ;[202]
ADDI A,1 ;[202] NEXT LINE
CAMLE A,MLTHIR ;[202] MORE TO DO?
JRST CLR.4 ;[202] NO - GO SHUT OFF %DSPLY BIT
CALL $POSIT ;[202] GO TO THE LINE
PUSH P,A ;[202] SAVE THE LINE NUMBER
MOVEI A,SPACE ;[202] GET A SPACE
PUSH P,C ;[202] SAVE COUNT
CALL $SMCHAR ;[202] SPACE AC-C TIMES
POP P,C ;[202] RESTORE COUNT
POP P,A ;[202] CURRENT LINE
JRST CLR.11 ;[202] CONTINUE
INS 15/67 ;11C21
;**;[221] At TFRSET+3L, insert 7 lines
SKIPN V132FG ;[221] ARE WE SUPPOSED TO BE 132 MODE?
RET ;[221] NO, RETURN
MOVE A,TTJFN ;[221] THEN SET THE TERMINAL
HRROI B,[BYTE (7)33,"[","?","3","h",0,0,0,0,0]
SETZ C, ;[221]
SOUT ;[221]
ERJMP .+1 ;[221]
REP 18/79 ;11C22
SKIPN A,LPTJFN ;IF WE DON'T HAVE A JFN
JRST [MOVE A,[GJ%SHT+GJ%FOU] ;THEN GET ONE
HRROI B,[ASCIZ /TFRLPT:/]
GTJFN
ERJMP [RET]
MOVEM A,LPTJFN ;GOT ONE NOW
JRST .+1]
WIT
SKIPE A,LPTJFN ;[215] IF WE DO HAVE A JFN
JRST OP3 ;[215] SKIP AROUND THIS STUFF
MOVE A,[GJ%SHT+GJ%FOU] ;[215] ELSE WE BETTER GET ONE
HRROI B,[ASCIZ /TFRLPT:/] ;[215] TRY JUST LOGICAL TFRLPT:
GTJFN ;[215] LOOK IT UP
ERJMP OP1 ;[215] ON FAILURE TRY ANOTHER DEFAULT
JRST OP2 ;[215] WE GOT ONE, GO STORE JFN
OP1:
MOVE A,[GJ%SHT+GJ%FOU] ;[215] THEN GET ONE
HRROI B,[ASCIZ /TFRLPT:TFRLPT.LST/] ;[215] DEFAULT TFRLPT.LST
GTJFN ;[215] TRY OPENING THIS
ERJMP [RET] ;[215] ON FAILURE RETURN
OP2: ;[215]
MOVEM A,LPTJFN ;[215] GOT A JFN NOW
OP3: ;[215]
REP 36/82 ;11C23
MOVEI D,124300 ;SET TO MIDDAY SO DAYLIGHT SAVINGS
WIT
MOVX D,IC%UTZ ;[206] USE TIMEZONE ZERO
REP 24/83 ;11C24
SETZ D,
WIT
MOVX D,IC%UTZ ;[206] USE TIMEZONE ZERO
INS 13/85 ;11C25
MOVE B,CHARST ;[212] IF GRAPHIC CHAR SET IS -
CAIN B,%CSGR ;[212] IN USE THEN REVERT TO US
JRST [SKIPE .TMOPT ;[212]
CALL $SEND ;[212] UPDATE THE SCREEN FIRST
PUSH P,OPTTTY ;[212] SAVE THE OPTIMISER STATE
MOVE A,TTYPE ;[212]
MOVEM A,OPTTTY ;[212] AND SET TO PHYSICAL
HRROI A,[BYTE (7)ESC,"(","B",0,0] ;[212]
CALL $SASCIZ ;[212]
POP P,OPTTTY ;[212] RESET
JRST .+1] ;[212]
REP 53/85 ;11C26
HLP.4:
WIT
HLP.4: MOVE B,CHARST ;[212] CHECK IF GRAPHIC SET NEEDED
CAIN B,%CSGR ;[212] RESTORE IF REQD
JRST [PUSH P,MLTHIR ;[212] PRETEND NO MULT SECT.
SETZM MLTHIR ;[212]
CALL $TTSTR ;[212] SET THE CHARACTER MODE
POP P,MLTHIR ;[212]
JRST .+1] ;[212]
REP 98/87 ;11C27
TXNE C,%OLCLR ; OR IF CLEARING THE LINE STATE
WIT
;**;[226] At $00ATR+5L, change 1 line
TXNE C,%OLCLR!%OLSET ;[226] OR IF CHANGING THE LINE STATE
REP 34/93 ;11C28
TXO B,TT%ECO
WIT
TXO B,TT%WKF!TT%WKN!TT%WKP!TT%WKA!TT%ECO ;[222] turn on wakeup bits
INS 47/93 ;11C29
TXO B,TT%WKF!TT%WKN!TT%WKP!TT%WKA ;[222] turn on wakeup bits
REP 202/93 ;11C30
MOVEM B,OLDMOD
WIT
MOVEM B,OLDMOD ;[223] SAVE OLD JFN MODE WORD
TXO B,TT%WKF!TT%WKN!TT%WKP!TT%WKA ;[210] SET WAKE ALL
SFMOD ;[210]
REP 225/93 ;11C31
MOVEI C,7
WIT
;**;[220] At $ONCE2+12L, insert 1 line
MOVEI C,^D22 ;[220] ALLOW FOR VT240 RESPONSE
INS 230/93 ;11C32
LDB A,[POINT 7,STRBUF,27] ;[220] GET 4th RESPONSE CHR
CAIN A,"6" ;[220] VT240 OR VT102 CLASS?
JRST [SETOM AVOFLG ;[220] YES, ALWAYS HAVE AVO
RET] ;[220] AND WERE DONE
REP 396/99 ;11C33
DOCHK: 0 ;NEED TO CHECK TERMINAL FLAG
WIT
;[204] DOCHK: 0 ;NEED TO CHECK TERMINAL FLAG
SUM 28932