C 5000 GO TO 9400 C%%A-RCB-0077-SL-12 LST -- 51 DETECT TXT CARRIAGE CONTROL C Events: 1 Normal C 2 '1' detected C 5100 IEVENT = 2 BCHAR = BUFFER(IFIRST) IFIRST = IFIRST + 1 NCHAR = MAX(1,NCHAR-1) ILAST = IFIRST + NCHAR - 1 IBACK = 1 IF(BCHAR.EQ.'1') GO TO 10 C IEVENT = 1 BCC = BCHAR GO TO 10 C%%A-RCB-0077-SL-12 LST -- 52 BHEAD2 AND POINTERS FOR GENERAL FILES C Event: 1 C C Notes on general format C C The listing is shifted by 24 columns (3 tabs). The % is in C byte 2 of the record. Thus, columns 1-24 are blank, 25-108 (84 columns) C contain data, and 109-132 are blank. C 5200 IEVENT = 1 C CALL DATE(BWORK) BWORK(5) = BWORK(5) + 32 BWORK(6) = BWORK(6) + 32 CALL TIME(BWORK(10)) C ENCODE (HD2LNG,5210,BHEAD2) BNAMIN,(BWORK(I),I=1,17) 5210 FORMAT(X,T25,32A1,T90,9A1,2X,8A1) C INDENT = 24 IPERPT = 1 GO TO 10 C%%A-RCB-0077-SL-12 LST -- 53 BHEAD2 AND POINTERS FOR MAC C Event: 1 C C Notes on MAC format C C The assembler shifts the listing by 40 columns (5 tabs). This puts C the % (from column 2 of the source file) in column 14 (shifted by C 7 blanks and 5 tabs -- the assembler uses tabs to do its shifting). C We shift the listing by another 8 spaces, and leave 8 spaces at the C right as well. C This routine puts the TITLE from the listing into BHEAD2, and C initializes the subtitle to TABLE OF CONTENTS. The TITLE is C truncated to 80 characters. Note that we skip the first character C of the title, since it is a formfeed. C 5300 IEVENT = 1 C CALL DATE (BWORK) BWORK(5) = BWORK(5) + 32 BWORK(6) = BWORK(6) + 32 CALL TIME (BWORK(10)) C ENCODE (HD2LNG,5310,BHEAD2) BVERSN,(BWORK(I),I=1,17) 5310 FORMAT (X,T93,16A1,T106,9A1,2X,8A1) NCHAR = ILAST - IFIRST CALL TABBER (BUFFER(IFIRST+1),BHEAD2(9),1,80,NCHAR) C ENCODE (SBTLNG,5330,BSBTTL) 5330 FORMAT (X,T1,'TABLE OF CONTENTS') ISBTTL = 17 C INDENT = 8 IPERPT = 13 GO TO 10 C%%A-RCB-0077-SL-12 LST -- 54 COMPARE MAC SUBTITLES C Events: 1 Buffer matches current subtitle C 2 Buffer is different C 3 Subtitle is 'SYMBOL TABLE' C C If the buffer is different, it is copied into the subtitle. C CONTEN is set TRUE if the subtitle is TABLE OF CONTENTS. C 5400 IEVENT = 1 NCHAR = ILAST - IFIRST + 1 IF (COMPAR(BSBTTL,BUFFER(IFIRST),ISBTTL,NCHAR)) 1 GO TO 5420 C IEVENT = 2 ENCODE (SBTLNG,5410,BSBTTL) (BUFFER(I),I=IFIRST,ILAST) 5410 FORMAT (X,T1, A1) ISBTTL = NCHAR IF (COMPAR('SYMBOL TABLE', BSBTTL, 12, ISBTTL)) IEVENT = 3 C 5420 CONTEN = COMPAR('TABLE OF CONTENTS', BSBTTL, 17, ISBTTL) GO TO 10 C%%A-RCB-0077-SL-12 LST -- 55 REWIND LUDI C Event: 1 C 5500 IEVENT = 1 REWIND LUDI GO TO 10 C%%A-RCB-0077-SL-12 LST -- 56 CLEAN UP TABLE OF CONTENTS C Event: 1 C 5600 IEVENT = 1 IF (.NOT.CONTEN) GO TO 10 DO 5620 I = IFIRST,IFIRST+5 BUFFER(I) = BLANK 5620 CONTINUE GO TO 10 C%%A-RCB-0077-SL-12 LST -- 57 DETECT MACRO PAGE BREAKS C Events: 1 Normal C 2 Start of new major page number C 5700 IEVENT = 1 DO 5720 I = ILAST,IFIRST,-1 IF (BUFFER(I).EQ.BMINUS) GO TO 10 IF (BUFFER(I).EQ.BLANK) GO TO 5730 5720 CONTINUE C C Provoke an error if buffer looks bad IEVENT = 3 GO TO 10 C 5730 IEVENT = 2 GO TO 10 C 5800 GO TO 9400 C 5900 GO TO 9400