6000  REM THIS IS A WORD PROCESSING PROGRAM WRITTEN BY SCOTT GATES ,INC 1995.
6010 KEY OFF
6020 CLS : SCREEN 1: LOCATE 10, 10: PRINT "WELCOME TO TYPER 1995,": LOCATE 11, 11: PRINT "BY SCOTT GATES INC."
6030 LOCATE 12, 12: PRINT "PRESS <S> TO START."
6040 KE$ = INKEY$: IF KE$ = "S" THEN 6070
6050 IF KE$ = "B" THEN PRINT "BACKING UP TYPER": 'SAVE "TYPER": PRINT "DONE": BEEP
6060 GOTO 6040
6070 SOUND 2000, 3
6080 CLEAR 20000
6090 DIM PA$(200)
6100 X = 1
6110 CLS : SCREEN 1
6120 PRINT "TYPE IN YOUR WORDS THEN PRESS </> WHEN FINISHED."
6130 LINE INPUT "START HERE,:"; PA$
6140 IF PA$ = "/" THEN GOTO 6190
6150 X = X + 1: IF X > 200 THEN 6190
6160 PA$(X) = PA$(X) + PA$: PA$(0) = STR$(X)
6170 PRINT PA$(X)
6180 GOTO 6130
6190 FOR Y = 1 TO X
6200 PRINT Y; " "; PA$(Y)
6210 NEXT Y
6220 LINE INPUT "PRESS <P> TO PRINT,<S> TO SAVE,<L> TO LOAD,<R> TO RETURN TO TYPING,<N> TO START A NEW FILE,<E> TO EDIT A LINE,AND <D> TO RETURN TO DOS.<B> RETURNS YOU TO START.<K> TO DELETE A NUMBER "; CH$: IF CH$ = "" THEN SOUND 255, 4: GOTO 6220
6230 IF CH$ = "B" OR CH$ = "b" THEN CHDIR "C:\UTIL": RUN "START"
6240 IF CH$ = "DIR" THEN CLS : SCREEN 2: FILES
6250 IF CH$ = "K" THEN INPUT "NUMBER OF LINE TO BE DELETED"; NU: IF NU < 1 OR NU > (X) THEN PRINT "OUT OF RANGE": SOUND 200, 5:  ELSE PRINT PA$(NU): INPUT "IS THIS THE LINE YOU WANT TO ERASE? "; YN$: IF YN$ = "Y" OR YN$ = "YES" THEN PA$(NU) = "": IF NU = (X) THEN X = X - 1: GOTO 6220
6260 IF CH$ = "P" THEN CLS : SCREEN 2: FOR YY = 1 TO VAL(PA$(0)): PRINT PA$(YY): LPRINT PA$(YY): NEXT YY: PRINT "DONE": SOUND 255, 4: GOTO 6220
6270 IF CH$ = "S" THEN LINE INPUT "NAME OF FILE TO BE SAVED."; NA$: IF NA$ = "" THEN BEEP: GOTO 6220 ELSE OPEN "O", #1, NA$: PA$(0) = STR$(X): PRINT #1, PA$(0): FOR Y1 = 1 TO X: PRINT #1, PA$(Y1): NEXT Y1: CLOSE #1: PRINT "DONE": SOUND 255, 4
6280 IF CH$ = "L" THEN LINE INPUT "NAME OF FILE TO BE LOADED."; NA$: OPEN "I", #1, NA$: LINE INPUT #1, PA$(0): X = VAL(PA$(0)): FOR Y2 = 1 TO X: LINE INPUT #1, PA$(Y2): NEXT Y2: CLOSE #1: PRINT "DONE": SOUND 255, 4: GOTO 6220
6290 IF CH$ = "R" THEN FOR Y3 = 1 TO X: PRINT PA$(Y3): NEXT Y3: GOTO 6130
6300 IF CH$ = "EDIT" OR CH$ = "E" THEN 6380
6310 IF CH$ = "D" THEN CHDIR "C:\": PRINT "RETURNING TO DOS": SYSTEM
6320 IF CH$ = "N" THEN PRINT "EXISTING DATA DELETED.": SOUND 360, 10: GOTO 6000
6330 IF CH$ = "C" THEN INPUT "TYPE IN LETTER OF DRIVE YOU WANT TO USE."; DR$: CHDIR DR$ + ":\TYPER": PRINT "SWITCH TO "; DR$; " DRIVE AT TYPER"
6340 IF CH$ = "START" THEN CHDIR "C:\UTIL": RUN "START"
6350 IF CH$ = "program" OR CH$ = "PROGRAM" THEN CLS : CHDIR "C:\UTIL": KEY ON: LOCATE 1, 1: PRINT "YOU MAY NOW BEGIN TO PROGRAM SCOTT.": SOUND 3000, 2: END
6360 GOTO 6220
6370 END
6380 INPUT "ENTER LINE NUMBER TO BE EDITED."; LN: IF LN < 0 OR LN > X THEN SOUND 2000, 5: PRINT "THAT LINE DOES NOT EXIST.": GOTO 6380
6390 PRINT PA$(LN): PRINT "TYPE IN REPLACEMENT LINE FOR "; LN: LINE INPUT "REPLACEMENT"; PA$
6400 IF PA$ = "" THEN PRINT "NO REPLACEMENT MADE": GOTO 6190
6410 PA$(LN) = PA$
6420 GOTO 6190
6430 END

