home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
749.LOGARNGE.2
< prev
next >
Wrap
Text File
|
1985-09-22
|
5KB
|
121 lines
10 REM LOGARNGE VER 830911 COPYRIGHT JOE KASSER G3ZCZ 1983
20 Q3=0\N1=0\N4=0 \ GOSUB 5010
30 ERRSET 800,E1,E2
40 INPUT"Name of LOG file ? ",L1$\IF L1$=""THEN 40
50 INPUT"Which drive is it on ? ",D1\IFD1<1ORD1>4THEN50
60 INPUT"Name of file when arranged ? ",L2$\IF L2$=""THEN60
65 IF LEN(L2$)<8THEN70ELSE!"LENTH ERROR (max is 7)"\GOTO60
70 IF L1$<>L2$ THEN80 ELSE PRINT"FILE NAME ERROR"\GOTO60
80 INPUT"Which drive do you want it put on ? ",D2 \ IF D2<1ORD2>4 THEN80
90 D1$=STR$(D1) \ D2$=STR$(D2) \D1$=D1$(2,2)\D2$=D2$(2,2)
100 IF FILE(L2$+","+D$(2,2))=2 THEN 120 ELSE 110
110 IF FILE(L2$+","+D$(2,2))=3 THEN 120 ELSE 130
120 PRINT"FILE ",L2$," ALREADY EXISTS ON DRIVE ",D$\GOTO 60
130 OPEN#0,"*"+L1$+","+D1$ \ READ#0,N1 \ CLOSE#0
140 PRINT"There are ",N1," entries in ",L1$
150 CREATE "*"+L2$+","+D2$ , 2 \ REM POINTER FILE
160 CREATE L2$+","+D2$ ,INT(N1/5+N1/10)+1
170 OPEN#0,L1$+","+D1$ \ REM OPEN OLD LOG FILE
180 OPEN#1,L2$+","+D2$ \ REM OPEN NEW LOG FILE
190 INPUT"What Contest was the log for ? ",A$\IFA$=""THEN190
195 GOSUB5025\N1$=X$\C8$=C$\M9$=M$\C$="CONTEST"\M$=" "\X$=A$\S9=S\S=0
197 GOSUB5020\GOSUB5035\S=S9\X$=N1$\M$=M9$\C$=C8$\GOTO203
200 GOSUB 5025
203 A$="59"\N4=N4+1\N1$=X$\IFLEN(X$)<3THEN270
205 IFLEN(X$)<3THEN220
210 IF X$(1,1)<"A"THEN215ELSEX$=X$(2,LEN(X$))\GOTO205
215 IF X$(1,1)<>" "THEN240
220 X$=N1$ \ GOTO 270
240 A$=X$(1,2)\X$=STR$(N4)+"-"+X$(3,LEN(X$))\R=VAL(A$)
270 GOSUB5020\GOSUB 5035 \ IF N4+1>N1 THEN 720 \ REM CLOSEOUT
310 GOTO200
720 N4=N4+1
730 CLOSE#0
740 CLOSE#1
750 OPEN#0,"*"+L2$+","+D2$
760 WRITE#0,N4
770 CLOSE#0
780 IF Q3=1 THEN 790 ELSE IF Q=2 THEN PRINTC1$+" WAS NOT IN THE LOG"
790 GOTO 5045 \ REM TERMINATE
800 ERRSET 800,E1,E2
810 IFE2<>15THEN820ELSEIFE1<130THEN900ELSE880
820 IF E1<>5560 THEN 830 ELSE IF I>4 THEN 5570 ELSE 5565
830 IF E1<>5650 THEN 840 ELSE IF I>4 THEN 5670 ELSE 5660
840 IF E2<>7 THEN 850 ELSE PRINT "FILE ERROR"\GOTO 900
850 IF E2<>8 THEN 860 ELSE PRINT "HARD DISC ERROR"\GOTO 900
860 REM
870 PRINT"ERROR ",E2," AT LINE ",E1
880 DESTROY"*"+L2$+","+D2$
890 DESTROY L2$+","+D2$
900 GOTO 790
5000 REM SUBROUTINE PACKAGE VER 790821
5005 GOTO 5550 \ REM GET STNDATA
5010 GOTO 5060 \ REM SET UP VARIABLES & CONSTANTS
5015 GOTO 5180 \ REM PRINT TITLE LINE
5020 GOTO 5110 \ REM PRINT LINE OF DATA
5025 GOTO 5600 \ REM READ ENTRY FROM DISC
5030 GOTO 5500 \ REM PRINT HEADING
5035 GOTO 5620 \ REM WRITE ENTRY TO DISC
5040 GOTO 5230 \ DETERMINE OUTPUT DEVICE
5045 STOP
5050 GOTO 5260 \ REM DETERMINE NAME OF LOG FILE & GET N
5060 DIMX$(64),N1$(64) \ P1=66\P2=1
5065 DIMM1$(36)\M1$="JanFebMarAprMayJunJulAugSepOctNovDec"
5070 T0 = 9 \ T1=T0+ 4 \ T2= T1+ 3 \ T3 = T2 +3
5075 T4=T3+10\T5=T4+10\T6=T5+4\T7=T6+5\T8=T7+4\T9=T8+6
5080 DEF FNT$(V)
5085 V1=INT(V/1000)\V2=INT((V-V1*1000)/100)
5090 V3=INT((V-V1*1000-V2*100)/10)\V4=INT(V-V1*1000-V2*100-V3*10)
5095 RETURN CHR$(48+V1)+CHR$(48+V2)+CHR$(48+V3)+CHR$(48+V4)
5096 FNEND
5100 RETURN
5110 PRINT #A,%5I,I,TAB(6),%2I,D1,TAB(T0),M1$((D2-1)*3+1,(D2-1)*3+3),
5112 PRINT #A,TAB(T1),%2I,D3,TAB(T2),
5115 T$=FNT$(T)
5120 PRINT #A,T$,TAB(T3),%Z8F3,F,TAB(T4),C$,TAB(T5),%3I,S,TAB(T6),
5130 PRINT #A,%3I,R,TAB(T7),M$,TAB(T8),%4I,P,TAB(T9),
5140 IF Q1=1 THEN PRINT#A,"S", ELSE PRINT#A,"-",
5150 IF Q2=1 THEN PRINT#A,"R", ELSE PRINT#A,"-",
5160 PRINT#A," ",X$
5165 P1=P1-1\IFP1>2THEN5170 ELSE P1=66\P2=P2+1\!#A\!#A"-"\!#A\GOSUB5500
5170 RETURN
5180 PRINT#A,"QSO #",TAB(5)," DATE",TAB(T1+3),"TIME",TAB(T3),
5190 PRINT#A," BAND",TAB(T4),"STATION",TAB(T5)," S",TAB(T6),
5200 PRINT#A," R",TAB(T7-1),"MODE",TAB(T8)," PWR",TAB(T9),
5210 PRINT#A,"QSL COMMENTS"
5220 RETURN
5230 INPUT"Which output device ? ",A
5240 IF A>7 OR A<0 THEN 5230
5250 RETURN
5260 INPUT"What is the name of the log file ? ",L$\IFL$=""THEN5260
5270 INPUT"Which drive is it on ? ",D$\IFD$=""THEN 5270
5275 IF LEN(D$)>1THEN5270
5310 L1$=L$+","+D$ \ REM LOG FILE
5320 L2$="*"+L$+","+D$
5325 IF FILE(L1$)=3 THEN 5327 ELSEPRINT"LOG FILE IS NOT ON DISC"\GOTO5045
5327 IF FILE(L2$)=3 THEN 5330 ELSEPRINT"LOG POINTER FILE ERROR"\GOTO 5045
5330 OPEN#2,L2$
5340 READ#2,N
5350 CLOSE#2
5360 RETURN
5500 PRINT#A\PRINT#A,"STATION LOG ",C1$,TAB(32),"PAGE",P2,
5510 PRINT#A,TAB(48),"FILE ",L$\P1=P1-4\GOTO 5180
5550 X1$="STNDATA,"
5555 FOR I=1 TO 4\ I$=STR$(I) \ X$=X1$+I$(2,2)
5560 IF FILE(X$)=3 THEN EXIT 5590
5565 NEXT
5570 PRINT"*STNDATA file is not on system"\ X=1\RETURN
5590 OPEN#2,X$ \ READ#2,L$,C1$ \ CLOSE#2
5595 RETURN
5600 READ #0,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q2,X$
5610 RETURN
5620 WRITE#1,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q2,X$
5630 RETURN
5640 FOR I=1 TO 4
5650 IF FILE ("SYSTEM,"+STR$(I))=2 THEN EXIT 5690
5660 NEXT
5670 PRINT"put the SYSTEM disc in the computer, then hit 'RETURN'"
5680 INPUT "",A$ \ GOTO 5640
5690 CHAIN "SYSTEM,"+STR$(I)
5695 REM ERROR E1<>5650 THEN +10 ELSE I>4 THEN 5670 ELSE 5660