01 !MSGEN.BAS
02 !PROGRAM TO CONSTRUCT MO RECORDS FOR BASIC
10 DIM A$[64],B$[64]V,C$[64],D$[64]V,E$[15]
30 LET I=0
35 OPEN #5,"BASIC.MSG/UP/RN/LN:64"
36 LET E$="%5A %D%8A %D - "
40 GOTO 300
50 PRINT "ERROR #",I-1
60 INPUT B$
70 LET A1=LEN(B$)
72 IF A1 = 0 THEN GOTO 160
75 IF A1 > 49 GO TO 140
100 LET A$ = E$+B$
110 PRINT A$;"!"
120 PRINT #5'I,A$
130 RETURN
140 PRINT "STRING TOO LONG",A1
150 GOTO 50
160 CLOSE 5
170 STOP
200 IF I<0 THEN 270
210 LET I=I+1
220 INPUT #5'I,A$
230 PRINT A$
240 PRINT "NEW STRING (START CHAR=16)"
250 GOSUB 50
260 RETURN
270 LET I=-I+1
280 GOSUB 50
290 RETURN
300 PRINT "ERROR # (- FOR NEW STRING, + TO REVIEW OLD) ";
310 INPUT I
320 GOSUB 200
330 GOTO 300
