1140 IF LEN(LI$) <5 THEN LI$ = LI$ + CHR$(32): GOTO 1140
1150 LI = LI +1
1160 FOR I = 1 TO 5: IF ASC( MID$ (LI$,I,1)) >57 OR ASC( MID$ (LI$,I,1)) = 32 THEN LI$ = "0" +LI$
1170 NEXT
1180 IF MID$ (LI$,6,1) < > CHR$(32) THEN PRINT CHR$(7)"+++ ENTRY ERROR":LI = LI -1: RETURN
1190 IF VAL( LEFT$(LI$(LI -1),5)) < VAL( LEFT$(LI$,5)) THEN LI$(LI) = LI$: RETURN
1200 FOR I = 1 TO LI: IF VAL( LEFT$(LI$(I),5)) > = VAL( LEFT$(LI$,5)) THEN 1220
1210 NEXT
1220 IF RIGHT$(LI$, LEN(LI$) -5) = RIGHT$(CH$, LEN(LI$) -5) AND VAL( LEFT$(LI$(I),5)) = VAL( LEFT$(LI$,5)) THEN FOR J = I TO LI -2:LI$(J) = LI$(J +1): NEXT J:LI = LI -2: RETURN
1230 IF VAL( LEFT$(LI$(I),5)) = VAL( LEFT$(LI$,5)) THEN LI$(I) = LI$:LI = LI -1: RETURN
1240 FOR I = 1 TO LI: IF VAL( LEFT$(LI$,5)) < VAL( LEFT$(LI$(I),5)) THEN 1260
1250 NEXT
1260 J = I
1270 FOR I = LI TO J STEP -1:LI$(I) = LI$(I -1): NEXT :LI$(J) = LI$: RETURN
1280 REM -->READ KEYBOARD<--
1290 PRINT "^";:LI$ = ""
1300 GET A$: IF A$ = CHR$(8) AND LEN(LI$) >1 THEN LI$ = LEFT$(LI$, LEN(LI$) -1): PRINT " "A$A$;: GOTO 1300
1310 IF A$ = CHR$(8) AND LEN(LI$) = 1 THEN LI$ = "": PRINT " "A$A$;: GOTO 1300
1320 IF A$ = CHR$(8) AND LEN(LI$) = 0 THEN PRINT " ";A$;: GOTO 1300
1330 IF A$ = CHR$(21) THEN 1300
1340 PRINT A$;: IF A$ = CHR$(13) THEN RETURN
1350 LI$ = LI$ +A$: GOTO 1300
1360 RETURN
1370 REM -->CENTERING ROUTINE<--
1380 HTAB 21 - LEN(A$)/2: PRINT A$: RETURN
1390 DIM LI$(500): RETURN
1400 REM -->PRINTER RTN<--
1410 PRINT CHR$(4)"PR#1": PRINT CHR$(9)"80N"
1420 FOR I = 1 TO LI: PRINT LI$(I): NEXT
1430 PRINT CHR$(4)"PR#0"
1440 RETURN
1450 REM -->ERROR ROUTINE<--
1460 ER = PEEK(222): REM <-- ERROR TYPE
1470 EL = PEEK(218) + PEEK(219) *256: REM <-- ERROR LINE
1480 CALL 768
1490 IF ER = 255 THEN TEXT : HOME : END
1500 REM OTHER ERRORS
1510 IF ER = 6 THEN PRINT CHR$(7)"+++ FILE NOT FOUND": GOTO 140
1520 IF ER = 8 THEN PRINT CHR$(7)"+++ I/O ERROR": GOTO 140
1530 IF ER = 9 THEN PRINT CHR$(7)"+++ DISK FULL": GOTO 140
1540 IF ER = 10 THEN PRINT CHR$(7)"+++ FILE LOCKED": GOTO 140
1550 IF EL = 870 THEN PRINT CHR$(7)"+++ DOS COMMAND ERROR": GOTO 140
1560 IF ER = 53 THEN PRINT CHR$(7)"+++ ENTRY ERROR": GOTO 140
1570 IF ER = 16 OR ER = 11 THEN PRINT CHR$(7)"+++SYNTAX ERROR": GOTO 140
1580 PRINT "ERROR TYPE :"ER: PRINT "ERROR LINE :"EL: STOP
1590 REM -->EDIT LINE SEARCH<--
1600 IF LI <1 THEN PRINT CHR$(7)"+++ WORK FILE EMPTY": RETURN
1610 IF MID$ (LI$,5,1) < > CHR$(32) THEN PRINT CHR$(7)"+++SYNTAX ERROR": RETURN
1620 LI$ = RIGHT$(LI$, LEN(LI$) -5):SE = VAL(LI$)
1630 FOR I = 1 TO LI: IF SE = VAL( LEFT$(LI$(I),5)) THEN FL = I
1640 NEXT : IF FL >0 THEN I = FL:FL = 0: HOME : HTAB 2: PRINT LI$(I): VTAB 3: GOTO 1660
1650 PRINT CHR$(7)"+++LINE NUMBER NOT FOUND": RETURN
1660 REM -->EDIT<--
1670 PO = 1:LI$ = LEFT$(LI$(I),6):LI$(I) = RIGHT$(LI$(I), LEN(LI$(I)) -6)
1680 PRINT "^";: HTAB 8
1690 GET A$: IF A$ = CHR$(21) THEN PO = PO +1:H = PEEK(36): IF H = 39 THEN H = 0: PRINT : POKE 36,H: GOTO 1690
1700 IF A$ = CHR$(21) THEN H = H +1: POKE 36,H: GOTO 1690
1710 IF A$ = CHR$(8) AND PO >0 THEN PO = PO -1: PRINT A$;: GOTO 1690
1720 IF A$ = CHR$(8) AND PO = 0 THEN 1690
1730 IF A$ = CHR$(13) AND LI$(I) = "" THEN J = I: FOR I = J +1 TO LI:LI$(I -1) = LI$(I): NEXT :LI$(LI) = "":LI = LI -1: HOME : RETURN
1740 IF A$ = CHR$(13) THEN LI$(I) = LI$ +LI$(I): HOME : PRINT LI$(I): RETURN
1750 IF A$ = CHR$(4) AND LEN(LI$(I)) < = 1 THEN LI$(I) = "": GOTO 1690
1760 IF A$ = CHR$(4) AND PO = 1 THEN LI$(I) = RIGHT$(LI$(I), LEN(LI$(I)) -1): HOME : HTAB 2: PRINT LI$;LI$(I): VTAB 3: HTAB 8:PO = 1: GOTO 1690
1770 IF A$ = CHR$(4) AND PO = LEN(LI$(I)) THEN LI$(I) = LEFT$(LI$(I),PO -1): PRINT " " CHR$(8) CHR$(8);:PO = PO -1: GOTO 1690
1780 IF A$ = CHR$(4) AND PO > LEN(LI$(I)) THEN 1690