PROCEDURE ,020000 ;+ ; Copyright (C) 1976 ; Digital Equipment Corporation, Maynard, Mass. ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the inclu- ; sion of the above copyright notice. This software, or any ; other copies thereof, may not be provided or otherwise made ; available to any other person except for use on such system ; and to one who agrees to these license terms. Title to and ; ownership of the software shall at all times remain in DEC. ; ; The information in this software is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation. ; ; DEC assumes no responsibility for the use or reliability of its ; software on equipment which is not supplied by DEC. ; ; Written: 01-Jun-72, -1.0.0-, L. Wade ; ; Modified: 12-Jan-80, -2.0.0-, Henry R. Tumblin ; Produced Duke supported version ; ; Modified: 30-Dec-80, -2.0.1-, J. Berntsen ; ; Verified: 12-Jan-80, -2.0.0-, Henry R. Tumblin ;- CODE MISCS .SBTTL INITIALIZE FOR A NEW LINE ; subroutine to initialize counts and pointers for a new line LINSET::MOV RMARG,R2 ; compute real width of line SUB LMARG,R2 ; as difference of margins SUB INDCT,R2 ; minus indenting MOV R2,LINBK ; store in line-break count MOV #-1,SPCNT ; initial counts of spacing CLR ULBKSP ; underlined backspace flag CLR NSPCH ; and non-spacing chars CLR CPOS ; carriage position is far left CLR LINNSC ; no non-spacing characters MOV LIBUF+BF.ADR,LIBUF+BF.PTR ; clear line input buffer CLR LIBUF+BF.LEN ; reset length MOV LIBUF+BF.ADR,LSTSP ; Set last spacing character here ; DEC LSTSP ; minus one, so off start of buffer ULBSET::MOV #ULPBF,ULPOS ; reset underline position buffer RETURN ; .SBTTL FORCE TO LOGICAL END OF COMMAND ;+ ; $FRCND-force to logical end of command ;- $FRCND::CALL CCIN ; read character from file BITB #CHASP,CHATBL(R1) ; Is it a spacing character? BNE $FRCND ; NE - yes CMPEQ #SEMI,R1,10$ ; semicolon? MOVB R1,GCSCH ; save break character 10$: RETURN ; .SBTTL TABB - FIND NEXT TABSTOP ; routine to find next tabstop for outlin routine. TABB:: CLR R0 ; start at first tabstop BR 20$ ; pre-endcheck, in case none. 10$: MOVB TABTAB-1(R0),R4 ; get current tab stop CMP R2,R4 ; this stop beyond current pos? BLO 40$ ; yes. get difference 20$: CMP R0,NTABS ; looked at all tab stops? BHIS 30$ INC R0 ; advance to next entry BR 10$ 30$: MOV RMARG,R4 ; yes. assume a tabstop at right end 40$: SUB R2,R4 ; get distance to tabstop MOV R4,R2 ; answer in a RETURN ; .END