7000 '   ** * * * * *   S O F T M A R K     I N C.    * * * * * **
7010 '   **                     Soft/Edit                       **
7020 '   **                (C) Copyright 1982                   **
7030 '   ** * * * * * * * * * * * * * * * * * * * * * * * * * * **
7040 I59=0:I60=0:I61=0:I62=0:I63=0:I64=0:I65=0:I66=0:I67=0:I68=0:I69=0:I70=0:I71=0:I81=0:I82=0:I99=0:I57=0:I58=0:I11=0:I10=0
7060 RL=VAL(MID$(SM.DESCR$,1,2)):IF RL>SW THEN RL=SW
7061 SM.FIELD$=SPACE$(RL)
7070 SR=VAL(MID$(SM.DESCR$,3,2)):SC=VAL(MID$(SM.DESCR$,5,2))
7080 DC=VAL(MID$(SM.DESCR$,7,2))
7090 A$="000000": INSC=1
7100 FOR X=1 TO 25 STEP 2
7110 IF MID$(SM.ATTRIB$,X,2)="AR" THEN I11=1
7120 IF MID$(SM.ATTRIB$,X,2)="AL" THEN I59=1
7130 IF MID$(SM.ATTRIB$,X,2)="M0" THEN I57=1
7140 IF MID$(SM.ATTRIB$,X,2)="M1" THEN I58=1
7150 IF MID$(SM.ATTRIB$,X,2)="ME" THEN I61=1
7160 IF MID$(SM.ATTRIB$,X,2)="ND" THEN I68=1: I60=1
7170 IF MID$(SM.ATTRIB$,X,2)="MF" THEN I62=1
7180 IF MID$(SM.ATTRIB$,X,2)="RB" THEN I63=1
7190 IF MID$(SM.ATTRIB$,X,2)="RZ" THEN I64=1
7200 IF MID$(SM.ATTRIB$,X,2)="LB" THEN I65=1
7210 IF MID$(SM.ATTRIB$,X,2)="LZ" THEN I66=1
7220 IF MID$(SM.ATTRIB$,X,2)="BC" THEN I67=1
7230 IF MID$(SM.ATTRIB$,X,2)="NU" THEN I68=1
7240 IF MID$(SM.ATTRIB$,X,2)="CE" THEN I69=1
7250 IF MID$(SM.ATTRIB$,X,2)="DR" THEN I70=1
7260 IF MID$(SM.ATTRIB$,X,2)="DN" THEN I71=1
7270 IF MID$(SM.ATTRIB$,X,2)="HI" THEN MID$(A$,1,1)="1"
7280 IF MID$(SM.ATTRIB$,X,2)="RI" THEN MID$(A$,2,1)="1"
7290 IF MID$(SM.ATTRIB$,X,2)="BK" THEN MID$(A$,3,1)="1"
7300 IF MID$(SM.ATTRIB$,X,2)="UN" THEN MID$(A$,4,1)="1"
7310 IF MID$(SM.ATTRIB$,X,2)="" THEN X=25
7320 NEXT X
7330 IF A$="000000" THEN F=7:B=0
7340 IF A$="100000" THEN F=15:B=0
7350 IF A$="010000" THEN F=0:B=7
7360 IF A$="110000" THEN F=0:B=15
7370 IF A$="001000" THEN F=23:B=0
7380 IF A$="101000" THEN F=31:B=0
7390 IF A$="000100" THEN F=1:B=0
7400 IF A$="100100" THEN F=9:B=0
7410 IF A$="001100" THEN F=17: B=0
7420 IF A$="101100" THEN F=25:B=0
7430 IF A$="011000" THEN F=16:B=7
7440 IF (F=0) AND (B=0) THEN F=7
7450 IF I71=1 THEN F=0:B=0
7460 IF MID$(SM.DATATAB$,1,RL)="" THEN I81=0 ELSE I81=1
7470 IF MID$(SM.RANGE$,1,RL)="" THEN I82=0 ELSE I82=1
7480 STARTROW=SR:STARTCOL=SC:COUNT=0:ENDCOL=(SC+RL)-1:IF ENDCOL>SW THEN ENDCOL=((ENDCOL-SW)+1):I14=1
7490 '
7500 LOCATE SR,SC,1:COLOR F,B
7510 I99=0:I75=0:I74=0
7520 ENT$=INKEY$
7530 IF ENT$="" THEN GOTO 7500
7540 IF (I59=1) AND (ENT$>CHR$(47)) AND (ENT$ENDCOL THEN SC=ENDCOL
7650 IF R$=CHR$(77) THEN GOTO 7500
7660 IF ENT$=CHR$(43) THEN I79=1: GOTO 7810
7670 IF ENT$=CHR$(13) THEN GOTO 7810                   ' "enter" was pressed
7680 IF (ENT$=CHR$(32)) AND (I67=1) THEN GOTO 7500      'no blanks allowed
7690 IF I68=0 THEN GOTO 7740
7700 IF ENT$=CHR$(32) THEN I75=1: GOTO 7740
7710 IF (ENT$CHR$(57)) THEN GOTO 7500
7740 DIF=SR-STARTROW:IF DIF<0 THEN DIF=1
7750 DD=DIF*SW
7760 LOCATE SR,SC,0:PRINT ENT$:MID$(SM.FIELD$,(((SC+DD)-STARTCOL)+1),1)=ENT$
7770 SC=SC+1:IF SC>SW THEN SC=1:SR=SR+1:IF SR>23 THEN SR=1
7771 IF I14=1 THEN 7791
7780 IF SC<=ENDCOL THEN GOTO 7500
7790 IF SC>ENDCOL THEN SC=ENDCOL:GOTO 7800
7791 IF SC<>ENDCOL THEN GOTO 7500
7800 IF I69=1 THEN GOTO 7500
7810 IF I61=1 THEN GOSUB 8480
7820 IF I99=1 THEN SC=STARTCOL:SR=STARTROW:GOTO 7510
7830 IF I62=1 THEN GOSUB 8530
7840 IF I99=1 THEN SC=STARTCOL:SR=STARTROW:GOTO 7510
7850 IF I68=1 THEN SM.FIELD=VAL(SM.FIELD$)
7860 IF I79=1 THEN GOSUB 8560
7870 IF I66=1 THEN GOSUB 8010
7880 IF I81=1 THEN GOSUB 8170
7890 IF I99=1 THEN COUNT=0:SR=STARTROW:SC=STARTCOL:GOTO 7490
7900 IF I82=1 THEN GOSUB 8240
7910 IF I99=1 THEN COUNT=0:SR=STARTROW:SC=STARTCOL:GOTO 7490
7920 IF I70=1 THEN GOSUB 7960
7930 IF I63=1 THEN GOSUB 8050
7940 IF I64=1 THEN GOSUB 8050
7950 COLOR 7,0:RETURN
7960 FOR Q=1 TO RL
7970 IF MID$(SM.FIELD$,Q,1)<>" " THEN RETURN
7980 NEXT Q
7990 SR=STARTROW:SC=STARTCOL:GOTO 7480
8000 RETURN
8010 X=RL:IF X=0 THEN X=1
8020 IF MID$(SM.FIELD$,X,1)=" " THEN MID$(SM.FIELD$,X,1)="0": X=X-1:GOTO 8020
8030 R=STARTROW:C=STARTCOL
8040 LOCATE R,C:PRINT MID$(SM.FIELD$,1,RL):RETURN
8050 SM.XXXX$=SPACE$(RL)
8060 R=STARTROW:C=STARTCOL:X=RL
8070 IF X=0 THEN X=1
8080 IF MID$(SM.FIELD$,X,1)=" " THEN CT=CT+1:X=X-1:GOTO 8080
8090 FOR X=1 TO CT
8100 IF I64=1 THEN MID$(SM.XXXX$,X,1)="0"  ELSE MID$(SM.XXXX$,X,1)=" "
8110 NEXT X
8120 FOR X=1 TO (RL-CT)
8130 MID$(SM.XXXX$,(X+CT),1)=MID$(SM.FIELD$,X,1)
8140 NEXT X
8150 LOCATE R,C:PRINT SM.XXXX$:SM.FIELD$=SM.XXXX$:SM.XXXX$=SPACE$(RL):CT=0
8160 RETURN
8170 FOR XX=1 TO 255 STEP RL
8180 IF (I68=0) AND (MID$(SM.FIELD$,1,RL)=MID$(SM.DATATAB$,XX,RL)) THEN XX=255: GOTO 8230
8190 IF (I68=1) AND (VAL(MID$(SM.FIELD$,1,RL))=VAL(MID$(SM.DATATAB$,XX,RL))) THEN XX=255: GOTO 8230
8200 IF MID$(SM.DATATAB$,XX,RL)="" THEN XX=255
8210 NEXT XX
8220 I99=1
8230 RETURN
8240 FOR YY=1 TO 255 STEP (RL*2)
8250 IF (VAL(MID$(SM.FIELD$,1,RL))>=VAL(MID$(SM.RANGE$,YY,RL))) AND (VAL(MID$(SM.FIELD$,1,RL))=SW THEN C=1:R=R+1
8330 IF R>23 THEN R=1
8340 NEXT XX
8350 RETURN
8360 FOR X=1 TO RL
8370 MID$(SM.FIELD$,(RL-(X-1)),1)=MID$(SM.FIELD$,(RL-X),1)
8380 IF (ENDCOL-(X-1))=SC THEN X=RL: LOCATE SR,SC,1:PRINT ENT$
8390 NEXT X
8400 LOCATE STARTROW,STARTCOL:PRINT MID$(SM.FIELD$,1,RL):LOCATE SR,(ENDCOL-(X-1)),0
8410 RETURN
8420 FOR X=1 TO RL
8430 MID$(SM.FIELD$,((SC-STARTCOL)+X),1)=MID$(SM.FIELD$,((SC-STARTCOL)+(X+1)),1)
8440 IF ((SC-STARTCOL)+(X+1))=RL THEN X=RL: MID$(SM.FIELD$,RL,1)=" ":LOCATE SR,ENDCOL,0:PRINT " "
8450 NEXT X
8460 LOCATE STARTROW,STARTCOL:PRINT MID$(SM.FIELD$,1,RL)
8470 RETURN
8480 I99=1
8490  FOR X=1 TO RL
8500 IF MID$(SM.FIELD$,X,1)<>" " THEN I99=0
8510 NEXT X
8520 RETURN
8530 FOR X=1 TO RL
8540 IF MID$(SM.FIELD$,X,1)=" " THEN I99=1
8550 RETURN
8560 FOR X=1 TO RL
8570 MID$(SM.FIELD$,((SC-STARTCOL)+X),1)=" "
8580 IF (((SC-STARTCOL)+1)+X)>RL THEN X=RL
8590 NEXT X
8600 LOCATE STARTROW,STARTCOL:PRINT MID$(SM.FIELD$,1,RL)
8610 RETURN
8650 SAVE FILENAME$:CHAIN "A:ASDARUN"
RL
8590 NEXT X
8600 LOCATE STARTROW,STARTCOL:PRINT MID$(SM.F