10 REM ::::: PROGRAM NAME = BIBCV OCT 1985 ::::::::: 11 REM :: THIS PROGRAM WILL PRINT THE CHAPTER AND VERSES :: 12 REM ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 19 REM VT 100 ADDRESSING AND SCREEN ERASE 20 PRINT CHR$(27);"[H";CHR$(27);"[2J OUTPUT TO (LS:=PRINTER TT:=TUBE =NONE)"; 30 INPUT F$ 31 IF LEN(F$)=0 THEN F$="TT" 40 IF F$="NONE" THEN F$="TT" 50 IF F$="TUBE" THEN F$="TT" 60 IF F$="TT:" THEN F$="TT" 70 IF F$="TT" THEN 90 80 OPEN F$ FOR OUTPUT AS FILE #6 DOUBLE BUF 90 DIM B$(66) 91 FOR I=1 TO 66 92 READ B$(I) 93 NEXT I 100 DATA GEN,EXO,LEV,NUM,DEU,JOS,JUD,RUT,1SA,2SA,1KI,2KI,1CH,2CH,EZR,NEH,EST 110 DATA JOB,PSA,PRO,ECC,SOL,ISA,JER,LAM,EZE,DAN,HOS,JOE,AMO,OBA,JON,MIC,NAH 120 DATA HAB,ZEP,HAG,ZEC,MAL,MAT,MAR,LUK,JOH,ACT,ROM,1CO,2CO,GAL,EPH,PHI,COL,1TH 130 DATA 2TH,1TI,2TI,TIT,PHIN,HEB,JAM,1PE,2PE,1JO,2JO,3JO,JUDE,REV 140 DIM #1,A$(4.42880E+06)=1 150 OPEN "BIBLE.BIB" AS FILE #1 160 DIM #2,I(66,150) 170 OPEN "BIBLE.I" AS FILE #2 172 GO TO 180 173 F$="TT" 174 CLOSE #6 175 GO TO 180 176 F$=I$ 177 OPEN F$ FOR OUTPUT AS FILE #6 DOUBLE BUF 180 PRINT "BOOK,CHAPTER,VERSE,# TO PRINT"; 181 REM .................... INPUT -------- 182 LINPUT I$ 183 IF I$="TT" THEN 173 184 IF I$="TT:" THEN 173 185 IF I$="STOP" THEN 700 186 IF I$="END" THEN 700 187 IF I$="CLOSE" THEN 173 188 IF I$="QUIT" THEN 700 189 IF SEG$(I$,LEN(I$),LEN(I$))=":" THEN 176 190 P1=POS(I$,",",1) 191 P2=POS(I$,",",P1+1) 192 P3=POS(I$,",",P2+1) 193 IF P1*P2*P3=0 THEN 400 194 P4=POS(I$,",",P3+1) 195 IF P4>0 THEN 400 196 V=VAL(SEG$(I$,P2+1,P3-1)) 197 N=VAL(SEG$(I$,P3+1,LEN(I$))) 198 B$=SEG$(I$,1,P1-1) 199 B1$=B$ 200 C=VAL(SEG$(I$,P1+1,P2-1)) 201 F=0 202 FOR I=1 TO LEN(B$) 210 IF ASC(SEG$(B$,I,I))<48 THEN 225 220 IF ASC(SEG$(B$,I,I))>57 THEN 225 222 GO TO 230 225 F=1 230 NEXT I 231 IF F=1 THEN 260 240 B=VAL(B$) 241 IF B>0 THEN 340 250 GO TO 400 260 IF LEN(B$)=3 THEN 290 265 IF LEN(B$)<3 THEN 400 270 B1$=SEG$(B$,1,4) 271 IF B1$="JUDE" THEN B=65 GO TO 340 275 B1$=SEG$(B$,1,3) 280 IF SEG$(B$,1,5)<>"PHILE" THEN 290 282 B=58 283 GO TO 340 290 FOR I=1 TO 66 300 IF B1$<>B$(I) THEN 320 310 B=I 320 NEXT I 321 IF B>0 THEN 340 330 GO TO 400 340 V9=V+N 350 IF B>0 THEN IF B<67 THEN 370 360 GO TO 400 370 IF C>0 THEN IF C<=I(B,0) THEN 390 380 GO TO 400 390 IF V>0 THEN 410 400 PRINT CHR$(7);"ILLEGAL INPUT TRY AGAIN" 401 GO TO 180 410 I=I(B,C)+(V-1)*64 411 REM ................. ROUGH START ------------------ 420 PRINT "BOOK #";B;B$(B);" CHAPTER";C;" VERSE";V 430 IF F$<>"TT" THEN PRINT #6 440 IF F$<>"TT" THEN PRINT #6,"* BOOK #";B;B$(B);" CHAPTER";C;" VERSE";V 450 I=I+1 41 REM ................................... LOOP ------------------ 452 IF "*"=A$(I) THEN 475 454 IF "="=A$(I) THEN 475 460 IF "#"<>A$(I) THEN 450 470 GOSUB 480 471 GO TO 520 475 PRINT CHR$(7);"NO SUCH VERSE" 476 IF F$<>"TT" THEN PRINT #6,"NO SUCH VERSE" 477 GO TO 180 480 J=1 481 V$="" 482 REM ............................... FIND VERSE ----------- 490 J=J+1 491 V1$=A$(I+J) 492 V$=V$+V1$ 493 IF V1$<>" " THEN 490 500 V0=VAL(V$) 510 RETURN 520 IF V0"TT" THEN PRINT #6,"#"; 550 I=I+1 551 IF "#"=A$(I) THEN 600 555 IF I>4.42870E+06 THEN 180 560 IF "*"=A$(I) THEN 180 570 IF "="=A$(I) THEN 180 580 IF F$<>"TT" THEN PRINT #6,A$(I); 590 PRINT A$(I); 591 GO TO 550 600 GOSUB 480 610 IF V0