home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpmug
/
cpmug041.ark
/
RANDTEXT.BAS
< prev
next >
Wrap
BASIC Source File
|
1984-04-29
|
1KB
|
50 lines
REM RANDTEXT.BAS VERSION 1.00
REM 09/24/79
REM BY JAMES K. MILLS WB9KFP
REM
REM A PROGRAM IN BASIC-E TO GENERATE RANDOM
REM CHARACTER 5-LETTER CODE GROUPS FOR USE
REM WITH A MORSE CODE PRACTICE PROGRAM.
REM
PRINT CHR$(26);CHR$(0) :REM CLEAR ADM-3A SCREEN
PRINT "RANDTEXT VERSION 1.00"
PRINT
10 INPUT "SEED (1 TO 1000)";SEED
IF SEED < 1 OR SEED > 1E3 OR SEED <> INT (SEED) THEN 10
SEED = SEED / 1000
20 INPUT "HOW MANY LINES OF 10 CODE GROUPS EACH";LAST
IF LAST < 1 OR LAST > 255 OR LAST <> INT (LAST) THEN 20
INPUT "FILENAME.TYP (CAPITAL LETTERS ONLY!)";FILE.NAME$
DIM TABLE$(39),C(49)
FOR I = 0 TO 38
READ TABLE$(I)
NEXT I
TABLE$ (39) = CHR$ (44)
LINE = 1
FILE FILE.NAME$
REM
REM GENERATE RANDOM CHARACTERS FOR ONE LINE
REM
100 PRINT "GENERATING LINE ";LINE
FOR I = 0 TO 49
SEED = ((SEED + 3.141593)^5) - \
INT ((SEED + 3.141593)^5)
C(I) = INT (SEED * 39 + 1)
NEXT I
REM
REM PRINT A LINE OUT TO DISKFILE
REM
FOR I = 0 TO 49 STEP 5
PRINT #1; TABLE$ (C (I)) + TABLE$ (C (I+1))+ \
TABLE$ (C (I+2)) + TABLE$ (C (I+3))+ \
TABLE$ (C (I+4))
NEXT I
IF LINE < LAST THEN LINE = LINE + 1 : GOTO 100
CLOSE 1
DATA 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L
DATA M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,?,.,-
END