Classic Computer Magazine Archive PROGRAM LISTING: 88-06a/PATCH.LST


40 REM DISKFILE ENHANCEMENT
45 REM BY S.L. HARRISON
46 REM (c)1988, ANTIC PUBLISHING
50 POKE 712,98:DIM FILE$(14)
235 DATA ��
250 GOTO 2695:REM MAIN PROGRAM
473 ? "|������������������������|"
476 ? "|��������������������|"
520 FOR DE=1 TO 200:NEXT DE
610 RESTORE 210:I=0
670 TRAP 680:I=I+1:GOTO 620
680 TRAP 40000:? CS$:GOSUB 270:REM SETBG
975 IF FLAG THEN POKE 702,64:GOTO 1045
990 I=0:TEMP$=BL$
1043 GOTO 1050
1045 FOR I=0 TO COUNT-1
1047 TRAP 2760:INPUT #3;Q$:IF I=0 AND LEN(Q$)<1 THEN POP :GOTO 1045
1073 IF  NOT FLAG THEN GOTO 1080
1075 NEXT I
1077 GOTO 1120
2595 PASS=1:IF FLAG THEN GOTO 2695
2650 IF Q$="N" OR Q$="n" THEN 2695
2695 IF FLAG AND PASS THEN GOTO 2720
2715 GOSUB 3000:REM ->KEYBD OR DISK
2990 REM KEYBOARD OR DISK
3000 GOSUB 270:REM SETBG
3010 POKE 702,64:REM UPPERCASE
3020 ? CS$:POSITION 2,10:? "ENTER NAMES FROM �EYBOARD OR �ISK? D";:INPUT #16;Q$
3030 IF Q$="K" OR Q$="k" THEN FLAG=0:RETURN 
3040 IF Q$<>"D" AND Q$<>"d" THEN GOTO 3020
3050 FLAG=1
3060 REM GET NAME FROM DISK
3070 GOSUB 270:GOSUB 310:REM SETBG, CURSOR
3080 ? CS$:POSITION 7,10:? "INSERT DISK WITH LABEL FILES":? "      PRESS ������РWHEN READY"
3090 CLOSE #1:OPEN #1,4,0,"K:":GET #1,L:IF L<>155 THEN GOTO 3090
3100 GOSUB 310:CLOSE #1:OPEN #1,6,0,"D:*.*":? "}"
3110 TRAP 3120:INPUT #1,TEMP$:? TEMP$:GOTO 3110
3120 CLOSE #1:? :? "ENTER NAME OF FILE CONTAINING NAMES":INPUT FILE$
3130 TEMP$="D:":IF FILE$(2,2)<>":" AND FILE$(3,3)<>":" THEN TEMP$(3)=FILE$:FILE$=TEMP$:TEMP$=""
3140 CLOSE #1:OPEN #1,4,0,FILE$:COUNT=0
3150 INPUT #1,Q$
3160 IF LEN(Q$)<1 THEN GOTO 3200
3170 COUNT=COUNT+1
3180 IF COUNT>4 THEN CLOSE #1:GOTO 3220
3190 GOTO 3150
3200 IF COUNT=0 THEN GOTO 3150
3210 CLOSE #1:GOTO 3270
3220 ? CS$:POSITION 2,11:? "[DO NOT INCLUDE BLANK LINES!]"
3230 POSITION 2,10:? "HOW MANY LINES IN EACH RECORD 3";:INPUT #16;COUNT
3240 IF COUNT<1 THEN ? :? "YOU MUST HAVE AT LEAST ONE LINE":GOTO 3260
3250 IF COUNT>4 THEN ? :? "YOU CAN'T HAVE MORE THAN 4 LINES"
3260 IF COUNT<1 OR COUNT>4 THEN FOR DE=1 TO 150:NEXT DE:GOTO 3020
3270 CLOSE #3:OPEN #3,4,0,FILE$
3280 RETURN 


Back to previous page