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 - "
37 STOP 
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 GOTO 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
600 PRINT #5'Z9+1,RJS$("  ",64)
610 RETURN 
700 PRINT "LIMITS: "; : INPUT Z1,Z2
710 FOR Z9 = Z1 TO Z2
720 GOSUB 600
730 NEXT Z9
740 STOP 
