10 DEFINT A-Z
15 FALSE=0:TRUE= NOT FALSE
20 KEY OFF:CLS:CLOSE
30 OPEN "COM1:300,E,7" AS 1
40 B$=INKEY$: IF B$<> "" AND B$ <>"\"      THEN PRINT#1,B$;
50 IF B$="\" THEN PRINT #1,CHR$(19);:       GOTO 500
60 IF EOF(1) THEN 40
70 IF LOC(1)>128 THEN PRINT #1,CHR$(19) ;:   PAUSE=TRUE
80 A$=INPUT$(LOC(1),#1)
90 PRINT A$;
100 IF FLG THEN PRINT #2,A$;
110 IF LOC(1)>0 THEN GOTO 70
120 IF PAUSE THEN PAUSE=FALSE:PRINT #1,     CHR$(17);
130 GOTO 40
500 PRINT "1 OPEN FILE"
510 PRINT "2 CLOSE FILE"
520 PRINT "3 END SESSION"
530 INPUT "OPTION ",OPT
540 ON OPT GOTO 600,700,800
590 REM OPEN FILE
600 INPUT "FILE NAME.EXT ",F$
610 OPEN F$ FOR OUTPUT AS #2
620 PRINT #1,CHR$(17);
625 FLG=TRUE
630 GOTO 40
690 REM CLOSE FILE
700 CLOSE #2
710 PRINT #1,CHR$(17);
715 FLG=FALSE
720 GOTO 40
790 REM END
800 CLOSE
810 END