home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
log
/
hamsys
/
hamdisp.bas
< prev
next >
Wrap
BASIC Source File
|
1987-01-10
|
2KB
|
38 lines
10 ' HAMDISP program to list raw records by relative record number
15 'CHANGE DATE - 1/1/87
20 DEF SEG = 64 : POKE 23,64 : ' SET CAPS LOCK ON
30 CLS:LOCATE 8,1:PRINT "WHICH DRIVE DO YOU WANT TO USE ?"
40 O$=INKEY$ : IF O$="" GOTO 40 ' WAIT FOR RESPONSE
50 IF O$ = "A" OR O$="B" THEN DR1$=O$+":" :GOTO 100 'DISKETTE A OR B
60 IF O$ = "C" OR O$="D" THEN DR1$=O$+":" :GOTO 100 'DRIVE C OR D
70 IF O$ = "a" OR O$="b" THEN DR1$=O$+":" :GOTO 100 'DISKETTE A OR B
80 IF O$ = "c" OR O$="d" THEN DR1$=O$+":" :GOTO 100 'DRIVE C OR D
90 GOTO 30 ' NOT VALID DRIVE, RETRY
100 PRINT "Do you want to view a file created by MANFIX (Y/N) ?"
120 O$=INKEY$ : IF O$="" THEN GOTO 120
125 EXT$ = "DAT" ' Set extension for normal file
130 IF (O$ <> "Y") THEN GOTO 140 ' Not a yes answer
135 EXT$="tmp" ' Set extension for temporary file
140 PRINT "What record (not QSO) number do you want to start with ?"
150 ' *** ROUTINE TO GET HEADER RECORD AND DISPLAY
160 OPEN DR1$+"HAMHDR."+EXT$ AS 3 LEN=24
170 FIELD 3,4 AS A$,4 AS B$,8 AS C$,8 AS D$ : GET 3,1 ' SET HEADER RECORD FLD
180 NUMREC=CVS(A$):NUMQSO=CVS(B$):STRDATE$=C$:ENDDATE$=D$ ' GET HEADER FIELDS
190 PRINT "Your numbers are from 1 to ";NUMREC
200 PRINT "Enter will default to number 1"
210 PRINT "Push ESC to exit program"
220 PRINT : INPUT "==> ";A
230 IF A = 0 THEN A = 1
240 OPEN DR1$+"HAMLOG."+EXT$ AS 1 LEN=72 :' OPEN MAIN FILE TO COPY FROM
250 FIELD 1,70 AS W$,1 AS X$,1 AS Y$
260 CLS ' CLEAR SCREEN
270 FOR I = 1 TO 20 ' get next twenty records
280 GET 1,A : A=A+1 ' get record and set up for next one
290 PRINT W$;ASC(X$);ASC(Y$)
300 NEXT
310 PRINT:PRINT "Record Numbers from ";A-20;" to ";A-1
320 PRINT "Push a key to get next twenty records"
330 O$=INKEY$:IF O$="" GOTO 330
340 IF ASC(O$)=27 THEN RUN "mmenu
350 GOTO 260