10 REM SCREEN EDITOR BY M W BENNETT UPDATED 26.04.81 VERSION 04.39 20 DEG : NOESC : IMODE : X=1.1 : IF X<>1 THEN RUN 30 DIM A$(1918),B$(0),B1$(1),C$(0),D$(0),E$(1),E5$(2),F$(13),F1$(13) 40 DIM G$(77),H$(2),I$(1918),J$(0),K$(0),M$(0),N$(0),R$(0),S$(0),T$(0),U$(17),Z$(77) 50 INTEGER A1,A,B,B1,E,E1,F,F(9),H,I,L,L1,N,O,P,R,S,S1,V,V1,X,X1,Y,Y1,Z,Z1 60 SHORT G,G1,G2,G3,G4,G5,D,M1,M2,M(9,2) 70 MAT M=1 80 MAT F=0 90 H=1 100 V=24 110 SET 0,-1 120 OPEN\1\"$SY" 130 B$=CHR$(8) 140 D$=CHR$(30) 150 E$=CHR$(13)+CHR$(10) 160 E5$=CHR$(27)+"=" 170 H$=CHR$(11)+CHR$(7)+CHR$(11) 180 J$=" " 190 K$=CHR$(10) 200 M$=CHR$(11) 210 N$=CHR$(12) 220 R$=CHR$(13) 230 S$=" " 240 T$=CHR$(26) 250 U$=" Computer working " 260 REM. 270 @\1\T$; 280 @"BENNETT Screen Editor version 04.39" 290 @"Screen allows you to create and alter upto 10 pages of text." 300 @ 310 INPUT"What is the filename to be edited (including extension TXT) ? ",F$ 320 L=LEN(F$) 330 IF F$(L-3)<>"TXT"THEN@H$; : GOTO 300 340 REM. 350 ON ERROR GOTO 380 360 CREATE F$ 370 F=1 380 OPEN\2,1920\F$ : ON ERROR GOTO 420 390 GET\2,0\A$(-1) 400 F(0)=1 410 GOTO 470 420 @"File ";F$;" not found. Create anyway (Y/N) ? "; 430 GOSUB 8430 440 IF A<>89 AND A<>121 THEN ERASE F$ : GOTO 300 450 @E$;"Creating file ";F$;" on drive ";IOSTAT(0,0) 460 A$(-1)=S$+A$(-1) 470 P=0 480 F1$=F$ 490 F1$(L-3)="BAK" 500 ON ERROR GOTO 530 510 CLOSE\2\ 520 ERASE F1$ 530 RENAME F$,F1$ 540 CREATE F$ 550 OPEN\2,1920\F1$ 560 OPEN\3,1920\F$ 570 ON ERROR GOTO 8490 580 GOTO 8450 590 REM. 600 @\1\T$; 610 @A$; 620 @E5$;CHR$(56-V);CHR$(H+31); 630 GOSUB 8430 640 REM. 650 IF A<>95 THEN 680 660 H=H-1 : IF H<1 THEN H=1 670 Z=(24-V)*80+H-1 : A$(Z,Z)=S$ : @B$;S$;B$; : GOTO 630 680 IF H<1 THEN H=1 690 IF V>24 THEN V=24 700 IF H<>79 THEN 720 710 IF A>31 OR A=12 OR A=21 OR A=22 OR A=23 OR A=29 THEN 630 720 IF V<>1 THEN 740 730 IF A=10 OR A=13 OR A=15 OR A=22 THEN 630 740 IF A=23 OR A=16 THEN 780 750 IF A>31 THEN@C$; : Z=(24-V)*80+H-1 : A$(Z,Z)=C$ : H=H+1 : GOTO 630 760 REM. 770 ON A+1 GOTO 800,600,1020,1950,2110,4940,5240,5420,5540,5560,7090,7100,7110,7120,630,7140 780 ON A-15 GOTO 7190,7270,7290,7390,7460,7690,7760,7770,7800,7840,7970,8070,7940,8110,8140 790 REM. 800 @\1\T$; 810 @"List of all Editor commands :" : @ : @ 820 @"@ Print list of Editor commands P Output Page to printer" 830 @"A Retype current page Q Cursor to Horizontal centre" 840 @"B Supplementary text commands R Renter character" 850 @"C Change one string to another S Specify character" 860 @"D Delete / Insert / Move Screen T Set markers (0-9)" 870 @"E Exit Screen to Basic U Draw Upwards" 880 @"F File input / output V Draw Verically downwards" 890 @"G Grid screen W Draw left" 900 @"H Move cursor left X Up tab cursor" 910 @"I Invert parts of screen Y Yank page from file" 920 @"J Move cursor down Z Zap character" 930 @"K Move cursor up [ Back tab cursor" 940 @"L Move cursor right \ Cursor to Vertical centre" 950 @"M Return and line feed ] Forward tab cursor" 960 @"N *** H E L P *** ^ Home cursor" 970 @"O Down tab cursor";D$; 980 GOSUB 8430 990 IF A>31 THEN 600 1000 GOTO 650 1010 REM. 1020 @\1\T$; 1030 @"Auxiliary text commands" 1040 @TAB(4);"Press :" 1050 @TAB(11);"C";SPC(4);"Centre text on current line" 1060 @TAB(11);"D";SPC(4);"Display marker positions" 1070 @TAB(11);"G";SPC(4);"Goto marker" 1080 @TAB(11);"L";SPC(4);"Line between two markers" 1090 @TAB(11);"M";SPC(4);"Marker positions on screen" 1100 @TAB(11);"P";SPC(4);"Position of cursor" 1110 GOSUB 8390 1120 IF A<1 OR A>26 THEN 600 1130 ON A GOTO 600,600,1150,1330,600,600,1430,600,600,600,600,1530 1140 ON A-12 GOTO 1810,600,600,1890,600,600,600,600,600,600,600,600,600,600 1150 S=(24-V)*80 1160 E=S+77 1170 G$(-1)=S$+G$(-1) 1180 FOR X=S TO E 1190 A=ASC(A$(X,X)) 1200 IF A<>32 THEN S1=X : GOTO 1230 1210 NEXT X 1220 REM. 1230 FOR X=E TO S STEP-1 1240 A=ASC(A$(X,X)) 1250 IF A<>32 THEN E1=X : GOTO 1270 1260 NEXT X 1270 X=E1-S1 1280 B=38-(X+1)/2 1290 G$(B,B+X)=A$(S1,E1) 1300 A$(S,E)=G$ 1310 GOTO 600 1320 REM. 1330 @\1\T$; 1340 @"Marker positions :" 1350 @ : @ : @"Marker Number","X coord","Y coord" 1360 FOR L=0 TO 9 1370 @L,M(L,1),M(L,2) 1380 NEXT L 1390 @ : @ : @"Press any key to return to screen "; 1400 GET\1\C$ 1410 GOTO 600 1420 REM. 1430 @\1\T$; 1440 @"Goto marker" 1450 @ : @ : @"Enter marker number [0] (0-9) ? "; 1460 GOSUB 8430 1470 A=ASC(C$)-48 1480 IF A<0 OR A>9 THEN@R$;H$;H$ : GOTO 1450 1490 @\1\T$; 1500 @A$;E5$;CHR$(56-M(A,2));CHR$(M(A,1)+31); 1510 GOTO 630 1520 REM. 1530 @\1\T$; 1540 @"Draw a line between markers" 1550 @ : @ : INPUT"Enter marker1 , marker2 (0-9),(0-9) ",M1,M2 1560 IF M1=M2 OR M1<1 OR M2<1 OR M1>9 OR M2>9 THEN@H$;H$ : GOTO 1550 1570 IF M(M2,1)=M(M1,1)THEN G=999 : GOTO 1590 1580 G=(M(M2,2)-M(M1,2))/(M(M2,1)-M(M1,1)) 1590 G1=MIN(M(M1,1),M(M2,1)) 1600 G2=MAX(M(M1,1),M(M2,1)) 1610 Y1=MIN(M(M1,2),M(M2,2)) 1620 Y2=MAX(M(M1,2),M(M2,2)) 1630 @ : @ : @"Enter character that is to be used for drawing "; 1640 GOSUB 8430 1650 IF A<32 THEN@R$;H$;H$ : GOTO 1630 1660 IF G=999 THEN 1740 1670 FOR G3=G1 TO G2 1680 Y=INT(G*(G3-M(M1,1))+M(M1,2)+0.1) 1690 Z=(24-Y)*80+G3-1 1700 A$(Z,Z)=C$ 1710 NEXT G3 1720 GOTO 600 1730 REM. 1740 FOR G3=Y1 TO Y2 1750 X=M(M1,1) 1760 Z=(24-G3)*80+X-1 1770 A$(Z,Z)=C$ 1780 NEXT G3 1790 GOTO 600 1800 REM. 1810 @\1\T$; 1820 @"Press any key to return to Screen" 1830 FOR L=0 TO 9 1840 @E5$;CHR$(56-M(L,2));CHR$(M(L,1)+31);L; 1850 NEXT L 1860 GET\1\C$ 1870 GOTO 600 1880 REM. 1890 @\1\T$; 1900 @"Cursor position at (";H;" , ";V;")" 1910 FOR L=1 TO 5000 1920 NEXT L 1930 GOTO 600 1940 REM. 1950 @\1\T$; 1960 @"Change one string for another." : @ : G$="" : Z$="" 1970 INPUT"Enter string to be changed (length upto 78 characters) ? ",G$ 1980 INPUT"Enter new string (length upto 78 characters) ? ",Z$ 1990 @ 2000 @"Changing all references of ";G$ : @TAB(24);"to ";Z$ 2010 L=LEN(G$) 2020 L1=LEN(Z$) 2030 IF LL1 THEN Z$(L1,L)=S$+Z$(L1,L) 2050 FOR X=1 TO 1872 2060 P1=POS(A$,G$,P1) : IF P1=-1 THEN 600 2070 A$(P1,P1+L-1)=Z$ 2080 NEXT X 2090 GOTO 600 2100 REM. 2110 @\1\T$; 2120 @"Delete / Move / Insert selective parts of screen. Press :" 2130 @TAB(11);"A";SPC(4);"Deletes from top of page to cursor" 2140 @TAB(11);"B";SPC(4);"Deletes from cursor to end of page" 2150 @TAB(11);"C";SPC(4);"Deletes current line" 2160 @TAB(11);"D";SPC(4);"Deletes current line and moves up text" 2170 @TAB(11);"E";SPC(4);"Deletes above cursor and moves up text" 2180 @TAB(11);"F";SPC(4);"Deletes from cursor to end of line" 2190 @TAB(11);"G";SPC(4);"Deletes from margin to cursor" 2200 @TAB(11);"I";SPC(4);"Insert line and move down text" 2210 @TAB(11);"J";SPC(4);"Rotate screen about Centre" 2220 @TAB(11);"K";SPC(4);"Reflect screen about Horizontal axis" 2230 @TAB(11);"L";SPC(4);"Reflect screen in Vertical axis" 2240 @TAB(11);"M";SPC(4);"Move whole screen" 2250 @TAB(11);"N";SPC(4);"Reverse whole screen" 2260 @TAB(11);"O";SPC(4);"Obliterate page" 2270 @TAB(11);"P";SPC(4);"Rotate whole screen about any point" 2280 @TAB(11);"R";SPC(4);"Renter whole column" 2290 @TAB(11);"S";SPC(4);"Wraparound right column to left > []" 2300 @TAB(11);"T";SPC(4);"Wraparound left column to right < []" 2310 @TAB(11);"U";SPC(4);"Wraparound bottom row to top V []" 2320 @TAB(11);"V";SPC(4);"Wraparound top row to bottom ^ []" 2330 @TAB(11);"W";SPC(4);"Write whole column" 2340 @TAB(11);"Y";SPC(4);"Write whole row" 2350 @TAB(11);"Z";SPC(4);"Zap whole column";D$; 2360 GOSUB 8390 2370 @\1\T$; 2380 @U$; 2390 REM. 2400 Z=(24-V)*80+H-1 2410 S=Z-H+1 2420 E=S+77 2430 ON A GOTO 2450,2460,2470,2490,2540,2600,2610,600,2620,2670,2680,2780,2880 2440 ON A-13 GOTO 3690,3800,3850,600,4130,4220,4360,4500,4610,4720,600,4790,4830 2450 A$(0,Z)=S$+A$(0,Z) : GOTO 8450 2460 A$(Z,1917)=S$+A$(Z,1917) : GOTO 8450 2470 A$(S,E)=S$+A$(S,E) : GOTO 600 2480 REM. 2490 I$=A$(E+3,1917) 2500 A$(1840,1917)=S$+A$(1840,1917) 2510 A$(S,1837)=I$ 2520 GOTO 600 2530 REM. 2540 A$(S,Z)=S$+A$(S,Z) 2550 I$=A$(S,1917) 2560 A$(-1)=S$+A$(-1) 2570 A$(0,1917-S)=I$ 2580 GOTO 8450 2590 REM. 2600 A$(Z,E)=S$+A$(Z,E) : GOTO 600 2610 A$(S,Z)=S$+A$(S,Z) : GOTO 600 2620 I$=A$(S,1837) 2630 A$(S,E)=S$+A$(S,E) 2640 A$(E+3,1917)=I$ 2650 GOTO 600 2660 REM. 2670 G1=38 : G2=12 : GOTO 3930 2680 I$=A$ 2690 A$(-1)=S$+A$(-1) 2700 FOR Y=1 TO 24 2710 FOR X=1 TO 78 2720 Z1=(24-Y)*80+X-1 2730 Z2=(Y-1)*80+X-1 2740 A$(Z2,Z2)=I$(Z1,Z1) 2750 NEXT X 2760 NEXT Y 2770 GOTO 8450 2780 I$=A$ 2790 A$(-1)=S$+A$(-1) 2800 FOR Y=1 TO 24 2810 FOR X=1 TO 78 2820 Z1=(24-Y)*80+X-1 2830 Z2=(24-Y)*80+78-X 2840 A$(Z2,Z2)=I$(Z1,Z1) 2850 NEXT X 2860 NEXT Y 2870 GOTO 8450 2880 @\1\T$; 2890 @"Move Whole screen" 2900 @"This command will destroy part of the screen." : @"Press :" 2910 @TAB(11);"D";SPC(4);"Move screen Down by one row V" 2920 @TAB(11);"E";SPC(4);"Move screen Diagonally upwards and left \" 2930 @TAB(11);"F";SPC(4);"Move screen Diagonally upwards and right /" 2940 @TAB(11);"G";SPC(4);"Move screen Diagonally downwards and left /" 2950 @TAB(11);"H";SPC(4);"Move screen Diagonally downwards and right \" 2960 @TAB(11);"L";SPC(4);"Move screen left one column <" 2970 @TAB(11);"R";SPC(4);"Move screen right one column >" 2980 @TAB(11);"U";SPC(4);"Move screen up one row ^" 2990 GOSUB 8310 3000 IF R<1 OR R>78 THEN@H$ : GOTO 2990 3010 @ : @"Select option from the above list (any other key to abort) "; 3020 GOSUB 8430 3030 @C$; 3040 IF A>90 THEN A=A-32 3050 IF A<>68 THEN 3120 3060 FOR L=1 TO R 3070 I$=A$ 3080 A$(80,1917)=I$(0,1837) 3090 A$(0,77)=S$+A$(0,77) 3100 NEXT L 3110 GOTO 600 3120 IF A<>69 THEN 3210 3130 FOR L=1 TO R 3140 I$=A$ 3150 A$(0,1836)=I$(81,1917) 3160 A$(1837,1917)=S$+A$(1837,1917) 3170 GOSUB 8160 3180 NEXT L 3190 GOTO 8450 3200 REM. 3210 IF A<>70 THEN 3290 3220 FOR L=1 TO R 3230 I$=A$ 3240 A$(0,1838)=I$(79,1917) 3250 A$(1840,1917)=S$+A$(1840,1917) 3260 GOSUB 8200 3270 NEXT L 3280 GOTO 8450 3290 IF A<>71 THEN 3370 3300 FOR L=1 TO R 3310 I$=A$ 3320 A$(80,1917)=I$(1,1838) 3330 A$(0,77)=S$+A$(0,77) 3340 GOSUB 8160 3350 NEXT L 3360 GOTO 8450 3370 IF A<>72 THEN 3450 3380 FOR L=1 TO R 3390 I$=A$ 3400 A$(81,1917)=I$(0,1836) 3410 A$(0,77)=S$+A$(0,77) 3420 GOSUB 8200 3430 NEXT L 3440 GOTO 8450 3450 IF A<>76 THEN 3530 3460 FOR L=1 TO R 3470 I$=A$ 3480 A$(0,1916)=I$(1,1917) 3490 GOSUB 8160 3500 NEXT L 3510 GOTO 8450 3520 RETURN 3530 IF A<>82 THEN 3610 3540 FOR L=1 TO R 3550 I$=A$ 3560 A$(1,1917)=I$(0,1916) 3570 GOSUB 8200 3580 NEXT L 3590 GOTO 8450 3600 RETURN 3610 IF A<>85 THEN 600 3620 FOR L=1 TO R 3630 I$=A$ 3640 A$(0,1837)=I$(80,1917) 3650 A$(1840,1917)=S$+A$(1840,1917) 3660 NEXT L 3670 GOTO 600 3680 REM. 3690 I$=A$ 3700 A$(-1)=S$+A$(-1) 3710 FOR Y=1 TO 24 3720 FOR X=1 TO 78 3730 Z=(24-Y)*80+X-1 3740 Z1=(Y-1)*80+78-X 3750 A$(Z1,Z1)=I$(Z,Z) 3760 NEXT X 3770 NEXT Y 3780 GOTO 600 3790 REM. 3800 A$(-1)=S$+A$(-1) 3810 H=1 3820 V=24 3830 GOTO 8450 3840 REM. 3850 @\1\T$; 3860 @"Rotate screen about any point" 3870 ON ERROR GOTO 3880 3880 @ : @"Please specify axis of roation [39,12] (X:1-78 , Y:1-24) "; 3890 INPUT G1,G2 3900 ON ERROR GOTO 8490 3910 IF G1=0 OR G2=0 THEN G1=38 : G2=24 3920 IF G1<1 OR G2<1 OR G1>78 OR G2>24 THEN@H$; : GOTO 3880 3930 @ 3940 INPUT"Rotate by how many degrees [180] (1-360) ? ",B1$ 3950 D=VAL(B1$) 3960 IF D=0 THEN D=180 3970 IF D<1 OR D>360 THEN@H$ : GOTO 3930 3980 I$=A$ 3990 A$(-1)=S$+A$(-1) 4000 FOR Y=1 TO 24 4010 FOR X=1 TO 78 4020 Z1=(X-G1)*COS(D)-(Y-G2)*SIN(D)+G1 4030 Z2=(X-G1)*SIN(D)+(Y-G2)*COS(D)+G2 4040 IF Z1<1 OR Z2<1 OR Z1>78 OR Z2>24 THEN 4080 4050 Z3=(24-Y)*80+X-1 4060 Z4=(24-Z2)*80+Z1-1 4070 A$(Z4,Z4)=I$(Z3,Z3) 4080 NEXT X 4090 NEXT Y 4100 H=1 4110 V=24 4120 GOTO 8450 4130 FOR V1=1 TO 24 4140 Z=(24-V1)*80+H-1 4150 E=Z-H+78 4160 S=E-77 4170 G$=A$(Z,E) 4180 A$(Z,Z)=J$ 4190 A$(Z+1,E)=G$ 4200 NEXT V1 4210 GOTO 600 4220 @\1\T$; 4230 @"Wraparound right column to left > []" 4240 GOSUB 8310 4250 IF R<1 OR R>78 THEN@H$;H$ : GOTO 4240 4260 FOR L=1 TO R 4270 I$=A$ 4280 A$(1)=I$ 4290 FOR X=0 TO 1840 STEP 80 4300 Z=X+77 4310 A$(X,X)=I$(Z,Z) 4320 NEXT X 4330 NEXT L 4340 GOTO 8450 4350 REM. 4360 @\1\T$; 4370 @"Wraparound left column to right < []" 4380 GOSUB 8310 4390 IF R<1 OR R>78 THEN@H$;H$ : GOTO 4380 4400 FOR L=1 TO R 4410 I$=A$ 4420 A$=I$(1) 4430 FOR X=0 TO 1840 STEP 80 4440 Z=X+77 4450 A$(Z,Z)=I$(X,X) 4460 NEXT X 4470 NEXT L 4480 GOTO 8450 4490 REM. 4500 @\1\T$; 4510 @"Wraparound bottom row to top V []" 4520 GOSUB 8350 4530 IF R<1 OR R>24 THEN@H$;H$ : GOTO 4520 4540 FOR L=1 TO R 4550 I$=A$ 4560 A$(80,1917)=I$(0,1837) 4570 A$(0,77)=I$(1840,1917) 4580 NEXT L 4590 GOTO 600 4600 REM. 4610 @\1\T$; 4620 @"Wraparound top row to bottom ^ []" 4630 GOSUB 8350 4640 IF R<1 OR R>24 THEN@H$;H$ : GOTO 4630 4650 FOR L=1 TO R 4660 I$=A$ 4670 A$(0,1837)=I$(80,1917) 4680 A$(1840,1917)=I$(0,77) 4690 NEXT L 4700 GOTO 600 4710 REM. 4720 IF H=79 THEN 600 4730 FOR V1=1 TO 24 4740 Z=(24-V1)*80+H-1 4750 A$(Z,Z)=J$ 4760 NEXT V1 4770 GOTO 600 4780 REM. 4790 A$(S,E)=J$+A$(S,E) 4800 H=1 4810 GOTO 600 4820 REM. 4830 IF H=78 THEN 630 4840 FOR V1=1 TO 24 4850 Z=(24-V1)*80+H-1 4860 E=Z-H+78 4870 S=E-77 4880 G$=A$(Z+1,E) 4890 A$(E,E)=S$ 4900 A$(Z,E-1)=G$ 4910 NEXT V1 4920 GOTO 600 4930 REM. 4940 @\1\T$; 4950 @TAB(10);"Press :" 4960 @TAB(20);"Q To Quit Screen and exit without updating file ";F$ 4970 @TAB(20);"U To Update file ";F$;" and exit Screen." 4980 @TAB(23);"Any other key to return." : @ 4990 GOSUB 8430 5000 IF A<>85 AND A<>117 THEN 5140 5010 @"Updated file ";F$;" being written to disc" 5020 ON ERROR GOTO 5120 5030 PUT\3,P\A$(-1);K$ 5040 IF F=1 THEN CLOSE\2\ : ERASE F1$ : GOTO 8490 5050 ON ERROR GOTO 8490 5060 FOR X=0 TO 9 5070 IF F(X)=1 THEN 5100 5080 GET\2,X\A$(-1) 5090 PUT\3,X\A$(-1);K$ 5100 NEXT X 5110 GOTO 8490 5120 @"Output file ";F$;" write error" 5130 GOTO 8490 5140 IF A<>81 AND A<>113 THEN 600 5150 REM. 5160 @"Discard Screen buffer, restore Input File, and quit SCREEN (Y/N) ? "; 5170 GOSUB 8430 5180 IF A<>121 AND A<>89 THEN 600 5190 CLOSE\3\ 5200 ERASE F$ 5210 RENAME F1$,F$ 5220 GOTO 8490 5230 REM. 5240 @\1\T$; 5250 @"Screen allows you to create or modify upto 10 pages of text numbered 0 - 9 ." 5260 @ : @"You are currently in page ";P;". Which page next ? "; 5270 GOSUB 8430 5280 N=A-48 : IF N<0 OR N>9 THEN 600 5290 PUT\3,P\A$(-1);K$ : ON ERROR GOTO 5350 5300 REM. 5310 @E$;"Read page from sourcefile (else from file created during run) (Y/N) ? "; 5320 GOSUB 8430 5330 O=2 : IF A<>121 AND A<>89 THEN O=3 5340 GET\O,N\A$(-1) : P=N : IF ASC(A$(78,78))=13 THEN 600 5350 @ 5360 @"Page ";N;" does not exist. Create new page ";N;" ? "; 5370 GOSUB 8430 5380 IF A<>89 AND A<>121 THEN 5260 5390 A$(-1)=S$+A$(-1) : P=N 5400 GOTO 8450 5410 REM. 5420 @\1\T$; 5430 @"Grid screen with any printable character" 5440 @"What character is to be used to grid ? "; 5450 GOSUB 8430 5460 IF A<32 THEN@H$; : GOTO 5440 5470 I$=A$ 5480 FOR X=0 TO 1917 5490 IF I$(X,X)=S$THEN I$(X,X)=C$ 5500 NEXT X 5510 @\1\T$; 5520 @I$;D$;K$;M$; : H=1 : V=24 : GOTO 630 5530 REM. 5540 @C$; : H=H-1 : GOTO 630 5550 REM. 5560 @\1\T$; 5570 @"Invert parts of the screen." 5580 @TAB(4);"Press one of the following keys : " : @ 5590 @TAB(11);"A";SPC(4);"Above current cursor position" 5600 @TAB(11);"B";SPC(4);"Below current cursor position" 5610 @TAB(11);"C";SPC(4);"Current line" 5620 @TAB(11);"D";SPC(4);"Top left quadrant" 5630 @TAB(11);"E";SPC(4);"Top right quadrant" 5640 @TAB(11);"F";SPC(4);"Bottom left quadrant" 5650 @TAB(11);"G";SPC(4);"Bottom right quadrant" 5660 @TAB(11);"H";SPC(4);"Cursor forming top left quadrant" 5670 @TAB(11);"I";SPC(4);"Cursor forming top right quadrant" 5680 @TAB(11);"J";SPC(4);"Cursor forming bottom left quadrant" 5690 @TAB(11);"K";SPC(4);"Cursor forming bottom right quadrant" 5700 @TAB(11);"L";SPC(4);"Alternate squares (first inverted)" 5710 @TAB(11);"M";SPC(4);"Alternate squares (first unaltered)" 5720 @TAB(11);"N";SPC(4);"Cursor to right screen column" 5730 @TAB(11);"O";SPC(4);"Cursor to left screen column" 5740 @TAB(11);"P";SPC(4);"Top left traingle" 5750 @TAB(11);"Q";SPC(4);"Bottom right triangle" 5760 @TAB(11);"R";SPC(4);"Top right triangle" 5770 @TAB(11);"S";SPC(4);"Bottom left triangle" 5780 @TAB(11);"W";SPC(4);"Whole screen" 5790 @TAB(16);"Any other key to return";D$; 5800 GOSUB 8390 5810 @\1\T$; 5820 Z=(24-V)*80+H-1 5830 IF A<1 OR A>24 THEN 600 5840 A1=A 5850 @ 5860 @"Which character is to be used for inversion ? "; 5870 GET\1\C$ 5880 @C$; 5890 A=ASC(C$) 5900 S=0 5910 E=1917 5920 Z=(24-V)*80+H-1 5930 IF A>127 THEN C$=CHR$(A-128) 5940 IF A<32 OR A=95 THEN@R$; : GOTO 5860 5950 ON A1 GOTO 5970,5980,5990,6070,6080,6090,6100,6110,6120,6130 5960 ON A1-10 GOTO 6140,6250,6310,6370,6380,6480,6630,6780,6940,600,600,600,6010 5970 E=Z : GOTO 6000 5980 S=Z : GOTO 6000 5990 E=Z-H+78 : S=E-77 6000 @" Computer working "; 6010 FOR X=S TO E 6020 IF A$(X,X)=S$THEN A$(X,X)=C$ : GOTO 6040 6030 A=ASC(A$(X,X)) : IF A<>13 AND A<>10 THEN A$(X,X)=S$ 6040 NEXT X 6050 GOTO 600 6060 REM. 6070 T=24 : B=13 : L=1 : R=39 : GOTO 6160 6080 T=24 : B=13 : L=40 : R=78 : GOTO 6160 6090 T=12 : B=1 : L=1 : R=39 : GOTO 6160 6100 T=12 : B=1 : L=40 : R=78 : GOTO 6160 6110 T=24 : B=V : L=1 : R=H : GOTO 6160 6120 T=24 : B=V : L=H : R=78 : GOTO 6160 6130 T=V : B=1 : L=1 : R=H : GOTO 6160 6140 T=V : B=1 : L=H : R=78 : GOTO 6160 6150 REM. 6160 FOR Y=B TO T 6170 FOR X=L TO R 6180 Z=(24-Y)*80+X-1 6190 IF A$(Z,Z)=S$THEN A$(Z,Z)=C$ : GOTO 6210 6200 A$(Z,Z)=S$ 6210 NEXT X 6220 NEXT Y 6230 GOTO 600 6240 REM. 6250 FOR X=0 TO 1916 STEP 2 6260 IF A$(X,X)=S$THEN A$(X,X)=C$ : GOTO 6280 6270 A$(X,X)=S$ 6280 NEXT X 6290 GOTO 8450 6300 REM. 6310 FOR X=1 TO 1917 STEP 2 6320 IF A$(X,X)=S$THEN A$(X,X)=C$ : GOTO 6340 6330 A$(X,X)=S$ 6340 NEXT X 6350 GOTO 8450 6360 REM. 6370 L=H : R=78 : GOTO 6390 6380 L=1 : R=H 6390 FOR Y=1 TO 24 6400 FOR X=L TO R 6410 Z=(24-Y)*80+X-1 6420 IF A$(Z,Z)=S$THEN A$(Z,Z)=C$ : GOTO 6440 6430 A$(Z,Z)=S$ 6440 NEXT X 6450 NEXT Y 6460 GOTO 8450 6470 REM. 6480 @\1\T$; 6490 @"Invert top left triangle" 6510 IF B<1 OR B>78 THEN@H$;H$ : GOTO 6500 6520 B1=25-MIN(24,B1) 6530 FOR Y=24 TO B1 STEP-1 6540 FOR X=1 TO B 6550 Z=(24-Y)*80+X-1 6560 IF A$(Z,Z)=S$THEN A$(Z,Z)=C$ : GOTO 6580 6570 A$(Z,Z)=S$ 6580 NEXT X 6590 B=B-1 6600 NEXT Y 6610 GOTO 600 6620 REM. 6630 @\1\T$; 6640 @"Invert bottom right triangle" 6660 IF B<1 OR B>78 THEN@H$;H$ : GOTO 6650 6670 B1=MIN(24,(79-B1)) 6680 FOR Y=1 TO B1 6690 FOR X=B TO 78 6700 Z=(24-Y)*80+X-1 6710 IF A$(Z,Z)=S$THEN A$(Z,Z)=C$ : GOTO 6730 6720 A$(Z,Z)=S$ 6730 NEXT X 6740 B=B+1 6750 NEXT Y 6760 GOTO 600 6770 REM. 6780 @\1\T$; 6790 @"Invert top right triangle" 6810 GOSUB 8270 6820 IF B<1 OR B>78 THEN@H$;H$ : GOTO 6800 6830 B1=MIN(24,(79-B)) 6840 FOR Y=24 TO B1 STEP-1 6850 FOR X=B TO 78 6860 A=(V/4)*4 : IF V<5 THEN A=A-1 6870 V=V-1 6880 GOTO 620 6890 NEXT X 6900 B=B+1 6910 NEXT Y 6920 GOTO 8450 6930 REM. 6940 @\1\T$; 6950 @"Invert bottom left triangle" 6960 GOSUB 8230 6970 IF B<1 OR B>78 THEN@H$;H$ : GOTO 6960 6980 B1=MIN(B,24) 6990 FOR Y=1 TO B1 7000 FOR X=1 TO B 7010 Z=(24-Y)*80+X-1 7020 IF A$(Z,Z)=S$THEN A$(Z,Z)=C$ : GOTO 7040 7030 A$(Z,Z)=S$ 7040 NEXT X 7050 B=B-1 7060 NEXT Y 7070 GOTO 8450 7080 REM. 7090 @C$; : V=V-1 : GOTO 630 7100 @C$; : V=V+1 : GOTO 630 7110 @C$; : H=H+1 : GOTO 630 7120 @E$; : H=1 : V=V-1 : GOTO 630 7130 REM. 7140 A=V-(V/4)*4 : IF A=0 THEN A=4 7150 IF V<5 THEN A=A-1 7160 V=V-A 7170 GOTO 620 7180 REM. 7190 @\1\T$; 7200 @"Output current page ";P;" of Screen to Printer." 7210 @"Is page to be Overtyped (Y/N) ? " 7220 GOSUB 8430 7230 IF A=89 OR A=121 THEN 7600 7240 @"If printer is not connected press ^P to return." 7250 @CHR$(23);A$;K$;CHR$(20); : GOTO 600 7260 REM. 7270 H=38 7280 GOTO 620 7290 Z=(24-V)*80+H-1 7300 E=Z-H+78 7310 S=E-77 7320 G$=A$(Z,E) 7330 A$(Z,Z)=J$ 7340 A$(Z+1,E)=G$ 7350 IF V=1 THEN 600 7360 @E$;M$;A$(S,E);R$;A$(S,Z); 7370 GOTO 630 7380 REM. 7390 @\1\T$; 7400 @"Specify character to be used in R, U, V and W commands ? "; 7410 GOSUB 8430 7420 J$=C$ 7430 IF A<32 OR A=95 THEN@R$; : GOTO 7400 7440 GOTO 600 7450 REM. 7460 F1=0 7470 GET\1\C$ : @C$;B$;S$;B$; 7480 A=ASC(C$)-48 7490 IF A>79 THEN A=A-128 7500 IF A<0 OR A>9 THEN 7550 7510 M(A,1)=H 7520 M(A,2)=V 7530 IF F1=0 THEN 630 7540 GOTO 600 7550 @\1\T$; 7560 @"Marker must be in range 0-9, renter marker : "; 7570 F1=1 7580 GOTO 7470 7590 REM. 7600 @\1\T$; 7610 @"Output page ";P;" to printer, overtyped" 7620 @CHR$(23); 7630 FOR X=0 TO 1840 STEP 80 7640 E=X+77 7650 @A$(X,E+1);A$(X,E+1);K$; 7660 NEXT X 7670 @CHR$(20); 7680 GOTO 600 7690 IF V=24 THEN 630 7700 Z=(24-V)*80+H-1 7710 A$(Z,Z)=J$ 7720 V=V+1 7730 @J$;M$;B$; 7740 GOTO 630 7750 REM. 7760 Z=(24-V)*80+H-1 : A$(Z,Z)=J$ : V=V-1 : @J$;K$;B$; : GOTO 630 7770 Z=(24-V)*80+H-1 : A$(Z,Z)=J$ : @J$;B$;B$; : H=H-1 : IF H=0 THEN H=1 7780 GOTO 630 7790 REM. 7800 V=((V/4)+1)*4 7810 IF V>24 THEN V=24 7820 GOTO 620 7830 REM. 7840 @\1\T$; 7850 @"Yank a page from file into the current page" : ON ERROR GOTO 7930 7860 @"You are in page ";P;". Which page to be read in (0-9) ? "; 7870 GOSUB 8430 7880 N=A-48 : IF N<0 OR N>9 THEN 600 7890 @E$;"Read in page from sourcefile (else from file created during run) (Y/N) ? "; 7900 GOSUB 8430 7910 O=2 : IF A<>121 AND A<>89 THEN O=3 7920 GET\O,N\A$(-1) : GOTO 600 7930 @"Page";N;" does not exist" : GOTO 7860 7940 V=12 7950 GOTO 620 7960 REM. 7970 IF H=78 THEN 630 7980 Z=(24-V)*80+H-1 7990 E=Z-H+78 8000 S=E-77 8010 G$=A$(Z+1,E) 8020 A$(E,E)=S$ 8030 A$(Z,E-1)=G$ 8040 IF V=1 THEN 600 8050 @E$;M$;A$(S,E);R$;A$(S,Z); : GOTO 630 8060 REM. 8070 H=(((H-2)/8)*8)-1 8080 IF H<1 THEN H=1 8090 GOTO 620 8100 REM. 8110 H=(((H-1)/8)+1)*8+1 8120 IF H>78 THEN H=78 8130 GOTO 620 8140 @C$; : H=1 : V=24 : GOTO 630 8150 REM. 8160 FOR X=77 TO 1917 STEP 80 8170 A$(X,X)=S$ : NEXT X 8180 RETURN 8190 REM. 8200 FOR X=0 TO 1840 STEP 80 8210 A$(X,X)=S$ : NEXT X 8220 RETURN 8230 @ : @ : INPUT"Enter end column number [24] (1-78) ? ",B1$ 8240 B=VAL(B1$) : IF B=0 THEN B=24 8250 RETURN 8260 REM. 8270 @ : @ : INPUT"Enter starting column number [55] (1-78) ? ",B1$ 8280 B=VAL(B1$) : IF B=0 THEN B=55 8290 RETURN 8300 REM. 8310 @ : @ : INPUT"Enter repeat factor [1] (1-78) ? ",B1$ 8320 R=VAL(B1$) : IF R=0 THEN R=1 8330 RETURN 8340 REM. 8350 @ : @ : INPUT"Enter repeat factor [1] (1-24) ? ",B1$ 8360 R=VAL(B1$) : IF R=0 THEN R=1 8370 RETURN 8380 REM. 8390 GOSUB 8430 8400 IF A>96 THEN A=A-32 8410 A=A-64 8420 RETURN 8430 GET\1\C$ : A=ASC(C$) : IF A>127 THEN A=A-128 8440 C$=CHR$(A) : RETURN 8450 FOR L=78 TO 1838 STEP 80 8460 A$(L,L+1)=E$ : NEXT L 8470 A$(1918)=R$ : GOTO 600 8480 REM. 8490 ON ERROR GOTO 8520 8500 CLOSE 8510 @ 8520 END