home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
misc
/
c3zcz_15
/
logenter.2
< prev
next >
Wrap
Text File
|
1985-09-28
|
4KB
|
109 lines
10 REM LOGENTER VER 791008
20 ERRSET 820,E1,E2
40 REM "Copyright Snow Micro Systems Inc. 1979"
50 GOSUB 5010 \REM SET UP VARIABLES
60 GOSUB 5050 \ REM GET DATA NAME
70 PRINT \ N1=N \E9=1\ REM SET INIT NUMBER
80 IFN>80 THEN PRINT"OPENING LOG NOW"
90 OPEN #1,L1$
100 FOR I=1 TO N
110 READ #1,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q2,X$
120 NEXT \ REM POINTER SHOULD NOW BE SET UP TO WRITE
130 PRINT
140 IF N>0THEN160
150 PRINT\PRINT "BRAND NEW LOG BOOK"\ PRINT\ GOTO 180
160 PRINT"Last entry was :-"
165 I=I-1
170 GOSUB5015 \ GOSUB5020
180 PRINT\PRINT"New Entry Information "\PRINT
190 GOSUB 550 \ REM DATE
200 GOSUB 640 \ REM MODE
210 GOSUB 600 \ REM POWER
220 GOSUB 620 \ REM FREQ/BAND
230 Q1=0 \ Q2=0 \ REM MAIN LOOP
240 GOSUB 660 \ REM REST OF DATA
250 A=0 \ I=N+1 \ PRINT \GOSUB 5015 \ GOSUB 5020
260 INPUT"OK ?",A$
270 IF A$(1,1)="Y" THEN 280 ELSE 440
280 GOSUB 760 \ REM WRITE TO DISC
290 INPUT "Another Entry ? ",A$
300 IF A$(1,1)="Y" THEN 440
310 IF A$(1,1)="A" THEN 410
320 CLOSE #1 \ REMWRITING IS OVER
330 OPEN #0,L2$
340 WRITE #0,N
350 CLOSE #0
360 GOTO 5045
410 IF N>0 THEN N=N-1
420 GOTO 320
430 CHAIN "SYSTEM,"+STR$(I)
440 INPUT "Has DATE, MODE, POWER or FREQ/BAND Changed ? ",A$\IFA$=""THEN440
450 IF A$(1,1)="N" THEN 230 \ REM KEEP GOING
460 INPUT "Has FREQ/BAND changed ? ",A$\IFA$=""THEN460
470 IF A$(1,1)="Y" THEN GOSUB 620
480 INPUT "Has POWER changed ? ",A$\IFA$=""THEN480
490 IF A$(1,1)="Y" THEN GOSUB 600
500 INPUT "Has MODE changed ? ",A$\IFA$=""THEN500
510 IF A$(1,1)="Y" THEN GOSUB 640
520 INPUT"Has DATE changed ? ",A$\IFA$=""THEN520
530 IFA$(1)="Y" THEN GOSUB 550
540 GOTO 230
550 INPUT"Day (1-31) ? ",D1\IFD1<1ORD1>31THEN550
560 INPUT"Month ( 1 - 12 ) ? ",D2\IFD2<0ORD2>12THEN560
570 INPUT "Year (19xx) ?",D3 \ IF D3<1900 THEN 570
580 D3 = D3 - 1900
590 RETURNè600 INPUT "Power (watts) ? ",P
610 RETURN
620 INPUT "Freq/Band ? ",F
630 RETURN
640 INPUT "Mode ? ",M$\IFM$=""THEN640
645 IF M$(1,1)<>" "THEN650ELSEM$=M$(2,LEN(M$))\GOTO645
650 RETURN
660 PRINT \INPUT "Time ? ",T
670 INPUT "Call sign ? ",C$\IFC$=""THEN670
675 IF C$(1,1)<>" "THEN680ELSEC$=C$(2,LEN(C$))\GOTO675
680 INPUT1 "Report Received ? ",R \ PRINT TAB(32),
690 INPUT "Report sent ? ",S
700 INPUT1"QSL card sent ? ",A$ \IFA$=""THEN700
710 PRINTTAB(32),\ IF A$(1,1)="Y" THEN Q1=1
720 INPUT"QSL card received ? ",A$ \IFA$=""THEN720
730 IF A$(1,1)="Y" THEN Q2=1
740 INPUT "Comments ? ",X$
750 RETURN
760 REM PUT IT ON DISC
770 D1=INT(D1) \D2=INT(D2)\D3=INT(D3)\S=INT(S)
780 R=INT(R)\P=INT(P)
790 WRITE#1,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q2,X$
800 N=N+1
810 RETURN
820 ERRSET 820,E1,E2
830 IF E1<>5650 THEN 840 ELSE IF I>4 THEN 5670 ELSE 5660
840 IF E2=15 THEN 360 \ REM CONTROL C INHIBIT
860 IF E1=790 AND E2=3 THEN 1070
870 IF E1=1130 AND E2=3 THEN 1150
890 IF E2<>8 THEN 900 ELSE PRINT"HARD DISC ERROR"\ GOTO 360
900 REM
970 IF E2<>7 THEN 980 ELSE PRINT"FILE ERROR"\GOTO360
980 REM
1000 PRINT"ERROR ",E2,"AT LINE ",E1\GOTO360
1020 PRINT "log file ",L$," does not exist "\GOTO60
1070 N=9999999
1080 PRINT"Log file is full, recovering to last disc entry"
1090 CLOSE#1
1100 OPEN #1,L1$
1110 FOR I=1 TO N
1120 I1=D1\I2=D2\I3=D3\C1$=C$ \ REM SAVE OLD CALL
1130 READ #1,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q2,X$
1140 NEXT
1150 N=I-1
1160 PRINT
1170 PRINT "LAST ENTRY ON DISC IS QSO WITH ",C1$," ON ",I1,I2,I3
1180 PRINT"file is now full, use 'NEWLOG' to open a new one"
1190 PRINT
1200 GOTO 320
1210 IF E9=0 THEN 360 \REM ABORT
1220 IF N<>N1 THEN 1240
1230 GOTO 330
1240 IF N>0 THEN N=N-1
1250 GOTO 360
5000 REM SUBROUTINE PACKAGE VER 790817è