home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
726.CONTEST.BAS
< prev
next >
Wrap
BASIC Source File
|
1986-04-04
|
7KB
|
111 lines
10 ON ERROR GOTO 950
20 G$="G3ZCZ CONTEST LOGGING PROGRAM VERSION 2.20":CLS:WIDTH 80:LOCATE 10,1:PRINT G$
30 BANDS=7:M9=4000:DIM W$(M9),F1(M9),B(BANDS),B1(BANDS):R1$="00":S1$="59":C$="?"
40 BLANK$=" "
50 C4$="RXWBMCFL*/Q?O":L0$=BLANK$:QS$="-":QR$=QS$:R$=R1$:S$=S1$:L1$=L0$:L2$=L0$:L3$=L0$:L4$=L0$
60 L5$=L0$:L6$=L0$:L7$=L0$:L8$=L0$:L13$=L0$:L12$=L0$:L11$=L0$:L10$=L0$:L9$=L0$
70 FOR I%=1 TO BANDS:READ B(I%):NEXT:DATA 1,4,16,64,256,1024,4096
80 FOR I%=1 TO BANDS:READ B1(I%):NEXT:DATA 10,15,20,40,80,160,2
90 LOCATE 12,1:INPUT "Enter name of lOG file (D:NAME) Log type .LOG Assumed ",L$:IF L$="" THEN 90
95 INPUT "Do you want a running log printed out (Y/N) "; A$: IF A$="" THEN 95
98 IF LEFT$(A$,1)="Y" THEN P1 = 1 ELSE IF LEFT$(A$,1)="N" THEN P1 = 0 ELSE 95
100 GOSUB 880
110 OPEN L$+".$$$" FOR OUTPUT AS #2
120 OPEN L$+".LOG" FOR INPUT AS #1:GOTO 140
130 GOSUB 380 :GOSUB 390 :GOSUB 420:GOTO 800
140 LOCATE 23,1:PRINT "LOADING LAST ENTRY STRINGS":OPEN L$+".CHK" FOR INPUT AS #3
150 INPUT#3,L13$,L12$,L11$,L10$,L9$,L8$,L7$,L6$,L5$,L4$,L3$,L2$,L1$:CLOSE#3
160 PRINT "OPENING LOGBOOK ";L$:N4=0
170 IF EOF(1) THEN GOSUB 650:INPUT"Waiting,touch ENTER to continue ";A$:GOTO 800
180 INPUT#1,D$,T$,B$,C$,R$,S$,M$,P$,QS$,QR$,X$ : PRINT N4,C$,X$:IF C$="/*" THEN N4=N4-1 ELSE N4=N4+1
185 IF C$="/*" THEN C$=C8$:GOSUB 270:W$(J)=" ":F1(J)=F1(J)-B(B%):C$="/*":GOTO 210
190 GOSUB 270:W$(J)=C$:F=VAL(B$):FOR Q%=1 TO BANDS:IF INT(F)=B1(Q%) THEN F1(J)=F1(J)+B(Q%):B%=Q%:GOTO 210
200 NEXT
210 C8$=C$:PRINT#2,D$;",";T$;",";B$;",";C$;",";R$;",";S$;",";M$;",";P$;",";QS$;",";QR$;",";X$:GOTO 170
220 LOCATE 20,1:PRINT BLANK$:LOCATE 20,1:RETURN
230 L0$=BLANK$:MID$(L0$,6)=D$:MID$(L0$,15)=T$:MID$(L0$,20)=C$:MID$(L0$,32)=B$:MID$(L0$,36)=M$:MID$(L0$,40)=P$
240 IF C$="/*" THEN MID$(L0$,1)="-" ELSE N4$=STR$(N4):MID$(L0$,1)=MID$(N4$,2)
250 MID$(L0$,45)=R$:MID$(L0$,49)=S$:MID$(L0$,53)=QS$:MID$(L0$,55)=QR$:MID$(L0$,57)=X$:RETURN
260 T$=LEFT$(TIME$,2)+MID$(TIME$,4,2):D$=RIGHT$(DATE$,2)+"/"+LEFT$(DATE$,2)+"/"+MID$(DATE$,4,2):RETURN
270 J=0:IF C$="/*" THEN 350
280 FOR I%=1 TO LEN(C$):A$=MID$(C$,I%,1):J=J+(ASC(A$)-47):NEXT:J=J*25:IF J<0 THEN J=0
290 IF J>M9 THEN J = J-M9 : GOTO 290
300 IF LEN(W$(J))<1 THEN 350
310 IF LEFT$(W$(J),1)=" " THEN 350
320 IF LEFT$(W$(J),LEN(C$))=C$ THEN 340
330 J=J+1:GOTO 290
340 I=0:RETURN
350 I=1:RETURN
360 INPUT "REPORT RECEIVED ";A$:IF A$="" THEN 365 ELSE X$=A$
365 RETURN
370 GOSUB 220:INPUT "REPORT SENT ";S$:IF S$>"599" THEN 370 ELSE RETURN
380 GOSUB 220:INPUT "POWER (watts) ";P$:IF P$<"0" THEN 380 ELSE RETURN
390 GOSUB 220:INPUT "BAND ";F : IF F>160 THEN 390
400 FOR I%=1 TO BANDS:IF INT(F)=B1(I%) THEN 410 ELSE NEXT:LOCATE 22,1:FOR I%=1 TO BANDS:PRINT B1(I%);" ";:NEXT:GOTO 390
410 B$=MID$(STR$(F),2):B%=I%:GOSUB 650:RETURN
420 GOSUB 220:INPUT "MODE ";M$: IF M$="" THEN 420 ELSE RETURN
430 GOSUB 220:INPUT "CALL SIGN ";A$
440 IF A$="" THEN 510 :IF LEFT$(A$,1)="" THEN A$=LEFT$(A$,LEN(A$):GOTO 440
450 LOCATE 22,1:PRINT BLANK$: LOCATE 22,1:C$=A$:GOSUB 270:IF I=1 THEN PRINT "OK":GOTO 510
460 F2=F1(J): PRINT "WORKED on ";
470 FOR Q%=BANDS TO 1 STEP -1: IF F2<B(Q%) THEN 500
480 PRINT B1(Q%);" ";:F2=F2-B(Q%):IF B1(Q%)=INT(F) THEN PRINT "DUPLICATE";CHR$(7);
490 IF F2>=B(Q%) THEN 470
500 NEXT
510 RETURN
520 GOSUB 220:INPUT "ARE YOU SURE ";A$ :IF A$="" THEN RETURN
530 IF N4<1 THEN GOSUB 220 : PRINT "CAN'T F***** A ZERO ENTRY":RETURN
540 IF A$=""OR LEFT$(A$,1) <> "Y" THEN RETURN
550 C$=C8$:GOSUB 270:F1(J)=F1(J)-B(B%):IF F1(J)<=0 THEN W$(J)=" "
560 C$="/*":GOTO 600
570 IF LEN(X$)=0 THEN 580 ELSE IF LEFT$(C$,1)="?" THEN 580 ELSE 590
580 LOCATE 22,1:PRINT BLANK$: LOCATE 22,1:PRINT "GET THE DATA FIRST":RETURN
590 GOSUB 260:C8$=C$:GOSUB 270: F1(J)=F1(J)+B(B%):W$(J)=C$:GOSUB 860
600 PRINT#2,D$;",";T$;",";B$;",";C$;",";R$;",";S$;",";M$;",";P$;",";QS$;",";QR$;",";X$
610 IF C$="/*" THEN 620 ELSE N4=N4+1:GOTO 630
620 N4=N4-1:IF N4<0 THEN N4=0
630 GOSUB 230:L13$=L12$:L12$=L11$:L11$=L10$:L10$=L9$:LOCATE 1,5:PRINT G$
640 L9$=L8$:L8$=L7$:L7$=L6$:L6$=L5$:L5$=L4$:L4$=L3$:L3$=L2$:L2$=L1$:L1$=L0$:IF P1 = 1 THEN LPRINT L0$
650 GOSUB 660:C$="?":R$=R1$:S$=S1$:X$="":RETURN
660 I=3:GOSUB 700:PRINT L13$:I=4:GOSUB 700:PRINT L12$:I=5:GOSUB 700:PRINT L11$:I=6:GOSUB 700:PRINT L10$
670 I=7:GOSUB 700:PRINT L9$:I=8:GOSUB 700:PRINT L8$:I=9:GOSUB 700:PRINT L7$:I=10:GOSUB 700:PRINT L6$
680 I=11:GOSUB 700:PRINT L5$:I=12:GOSUB 700:PRINT L4$:I=13:GOSUB 700:PRINT L3$:I=14:GOSUB 700:PRINT L2$
690 I=15:GOSUB 700:PRINT L1$:RETURN
700 LOCATE I,1:PRINT BLANK$:LOCATE I,1:RETURN
710 GOSUB 220:INPUT "ARE YOU SURE ";A$:IF A$="" THEN RETURN
720 IF LEFT$(A$,1)<>"Y" THEN RETURN
730 CLS:PRINT "SAVING LAST ENTRY STRINGS BEFORE CLOSING":OPEN L$+".CHK" FOR OUTPUT AS #3
740 PRINT#3,L13$;",";L12$;",";L11$;",";L10$;",";L9$;",";L8$;",";L7$;",";L6$;",";L5$;",";L4$;",";L3$;",";L2$;",";L1$
750 CLOSE#3:CLOSE#1:CLOSE#2
760 KILL L$+".BAK"
770 NAME L$+".LOG" AS L$+".BAK"
780 NAME L$+".$$$" AS L$+".LOG"
790 GOTO 1000 : REM END
800 GOSUB 880: LOCATE 1,5:PRINT G$,L$:GOSUB 660
810 LOCATE 17,30:PRINT "CURRENT ENTRY":GOSUB 260:GOSUB 230
820 MID$(L0$,1)=STR$(N4+1):LOCATE 18,1 : PRINT BLANK$:LOCATE 18,1 : PRINT STR$(N4+1),C$,X$
830 GOSUB 220:INPUT "QRU ";A$:IF A$=""THEN 830
840 FOR J2%=1 TO LEN(C4$):IF LEFT$(A$,1)=MID$(C4$,J2%,1) THEN 850 ELSE NEXT:GOTO 830
850 GOSUB 220:ON J2% GOSUB 360,370,380,390,420,430,520,570,710,890,870,860,1200:GOTO 810
860 LOCATE 21,1:PRINT BLANK$:PRINT BLANK$:PRINT BLANK$:RETURN
870 LOCATE 22,1:PRINT L0$:RETURN
880 CLS:KEY OFF:LOCATE 25,1:FOR I = 1 TO LEN(C4$):PRINT MID$(C4$,I,1);" ";:NEXT:RETURN
890 GOSUB 220:INPUT "ARE YOU SURE ";A$:IF A$="" THEN RETURN
900 INPUT "WHICH PREFIX ";A$:IF LEN(A$)<1 THEN A$="*"
910 I%=0:FOR Q=1 TO M9:IF LEN(W$(Q))<=2 THEN 940
920 IF A$="*" THEN 930 ELSE IF A$=LEFT$(W$(Q),LEN(A$)) THEN 930 ELSE 940
930 PRINT W$(Q),:I%=I%+1:IF I%=4 THEN I%=0:PRINT
940 NEXT:PRINT:INPUT "READY WHEN YOU ARE, HIT ENTER TO CONTINUE";A$:CLS:GOSUB 880:GOSUB 660:RETURN
950 IF ERL = 120 THEN OPEN L$+".LOG" FOR OUTPUT AS #3:CLOSE#3:OPEN L$+".LOG" FOR INPUT AS #1:RESUME 130
955 IF ERR = 61 THEN PRINT "Yuk Yuk Yuk DISK FULL ERROR - You may have blown it" :GOTO 1000
960 IF ERL=140 THEN PRINT "CHECK LIST ERROR, RECOVERING....":RESUME 160
965 IF ERL = 640 THEN RESUME 650
970 IF ERL = 760 THEN RESUME 770
975 IF ERR = 62 AND ERL = 180 THEN GOSUB 650:INPUT"Waiting,touch ENTER to continue ";A$:RESUME 800
980 PRINT "ERROR ";ERR;" AT LINE ";ERL
990 REM RESUME 750:REM CLOSE DOWN IN AN ORDERLY MANNER
1000 END
1200 INPUT "What is the number of lost calls (to be added to the memory) ";O:IF O <0 THEN 1200
1210 N4 = N4+O : RETURN
END
1200 INPUT "What