1 REM PEOPLE'S PERMACOMPUTER EDITOR.
2 REM INSPIRED BY VIC EDITYPE (1983).
3 REM
4 REM DESIGNED FOR THE ARDUINO MEGA 2560.
5 REM WRITTEN IN STEFAN'S BASIC.
6 REM
7 REM PUBLIC DOMAIN DEDICATION.
8 REM
9 REM
10 SET 22, "Apple1"
20 DIM T$(48,24)
30 FOR I=1 TO 24 : T$()(I)="" : NEXT I
40 DIM SCRATCH$(48)
50 NL=1
60 BKSP=8
70 CR=13
80 LF=10
499 REM FALL INTO HERE
500 REM MENU
510 PRINT:PRINT "N=NEW E=EDIT P=PRINT S=SAVE Q=QUIT"
520 INPUT ">"; M$
530 IF M$="N" GOTO 1000
540 IF M$="E" GOTO 2000
550 IF M$="P" GOTO 3000
555 IF M$="S" GOTO 3500
560 IF M$="Q" GOTO 9000
570 GOTO 500
1000 REM COMPOSE MODE
1001 INPUT "TYPE FILE NAME";V$
1002 PUT 27 : PUT 91 : PUT 50 : PUT 74:REM CLEAR SCREEN
1003 PRINT "COMPOSE MODE"
1005 IF NL>24 PRINT "LINE LIMIT" : GOTO 500
1010 PRINT ">";T$()(NL);
1020 GET C$
1030 IF C$="" THEN GOTO 1020
1040 IF C$="@" THEN GOTO 500
1050 IF C$=CHR$(BKSP) AND LEN(T$()(NL))=0 THEN GOTO 1020
1060 IF C$=CHR$(BKSP) THEN GOTO 1600
1070 IF C$=CHR$(CR) OR C$=CHR$(LF) THEN GOTO 1500
1080 IF ASC(C$)<32 GOTO 1020
1090 PUT C$
1100 T$()(NL)=T$()(NL)+C$
1120 C$=""
1130 IF LEN(T$()(NL))<48 THEN 1020
1199 REM FALL INTO HERE
1200 REM WORD WRAP (IF LINE HITS 48)
1210 S=LEN(T$()(NL))
1220 IF RIGHT$(T$()(NL),1)=" " THEN GOTO 1250
1230 SCRATCH$=T$()(NL+1)
1232 T$()(NL+1)=RIGHT$(T$()(NL),1)+SCRATCH$
1240 T$()(NL)=LEFT$(T$()(NL),S-1)
1245 S=S-1:GOTO 1220
1250 REM MEMORY CHECKS
1260 IF T$()(NL)="" THEN T$()(NL)=" "
1270 IF SIZE<600 THEN PRINT "MEMORY LOW":PRINT
1280 IF SIZE<500 THEN PRINT "MEMORY CRITICAL":GOTO 500
1290 NL=NL+1
1295 PRINT:PRINT ">";T$()(NL-1);
1300 PRINT:PRINT ">";T$()(NL);
1310 GOTO 1020
1500 REM NEWLINE
1505 PUT CR : PUT LF
1510 NL=NL+1
1520 IF NL>24 THEN PRINT "BUFFER FULL" : GOTO 500
1530 GOTO 1010
1600 REM BACKSPACE (CURRENT LINE ONLY)
1610 L=LEN(T$()(NL))
1615 IF L<1 GOTO 1020
1620 IF L=1 THEN T$()(NL)="":GOTO 1640
1625 SCRATCH$=LEFT$(T$()(NL),L-1)
1630 T$()(NL)=SCRATCH$
1640 PUT 8 : PUT 32 : PUT 8
1650 GOTO 1020
The project was alerted to the existence of a few text editors and word processors in Nibble magazine by someone on matrix.
What we found was a great wealth of BASIC programs for the Apple II computer. We uncovered several particularly interesting BASIC word processors. Two that are of particular interest are Quickwriter and this one, Nibblewriter.
diskM8 File Dump
Please find an ASCII conversion of the BASIC dump obtained using the following commands:
The project was alerted to the existence of a few text editors and word processors in Nibble magazine by someone on matrix.
What we found was a great wealth of BASIC programs for the Apple II computer. We uncovered several particularly interesting BASIC word processors. Two that are of particular interest are Quickwriter and Nibblewriter.
Both programs are quite long and involved, so instead of creating one enormous post, we decided to split the discussion up into two feature posts.
diskM8 File Dump
Please find an ASCII conversion of the BASIC dump obtained using the following commands:
10 REM ***********
20 REM * *
30 REM * Sketch *
40 REM * *
50 REM ***********
55 REM *** Instructions ***
60 CLS:PRINT:PRINT
70 PRINT TAB(12)"Instructions?"
80 PRINT:PRINT TAB(16)"(Y/N)"
90 GET A$:IF A$="" GOTO 90
100 IF A$="Y" OR A$="y" THEN GOTO 110 ELSE GOTO 270
110 CLS:PRINT:PRINT
120 PRINT TAB(2)"You may use either Sketch or Draft"
130 PRINT TAB(2)"modes. Sketch uses a moving line to"
140 PRINT TAB(2)"draw, while Draft draws lines between"
150 PRINT TAB(2)"two points you specify by hitting ";CHR$(34);"S";CHR$(34);"."
160 PRINT:PRINT TAB(1)"= Hit any key for Sketch instructions =";
170 GET A$:IF A$="" GOTO 170
180 CLS:PRINT
190 PRINT TAB(12)"== Sketch =="
200 PRINT TAB(13)"[Controls:]"
210 PRINT TAB(2)"Arrow Keys -- Change direction"
220 PRINT TAB(2)"Number keys -- Slow down cursor"
230 PRINT TAB(2)CHR$(34);"F";CHR$(34);" -- Return to top speed"
240 PRINT TAB(2)"Space Bar -- Toggle cursor (ON)-(OFF)"
250 PRINT:PRINT TAB(11)"== Hit any key =="
260 GET A$:IF A$="" GOTO 260
265 REM *** Set Delay ***
270 CLS:PRINT:PRINT
280 PRINT TAB(6)"Enter speed desired:"
290 PRINT
300 PRINT TAB(6)"[1] Fast to [9] Slow"
310 GET A$:IF A$="" GOTO 310
320 OG=VAL(A$)*10:IF OG<1 GOTO 310
330 DL=OG
335 REM *** Choose Sketch or Draw Mode ***
340 CLS:PRINT:PRINT
350 PRINT TAB(4)"Do you want:"
360 PRINT:PRINT TAB(6)"[S]ketch mode"
370 PRINT TAB(6)"[D]raft mode"
380 GET A$:IF A$="" GOTO 380
390 IF A$="S" OR A$="s" GOTO 420
400 IF A$="D" OR A$="d" GOTO 710
410 GOTO 380
420 CLS
430 REM FOR N=1 TO VAL(RIGHT$(TIME$,2))
440 REM DM=RND(1)
450 REM NEXT N
460 X=239:Y=63
470 X1=INT(RND(X)*X)+1:Y1=INT(RND(X)*Y)+1
480 COLOR 255: PLOT X1,Y1
485 REM *** Sketch Mode ***
490 GET A$
500 X1=X1+XD:IF X1>239 THEN X1=239
510 IF X1<0 THEN X1=0
520 Y1=Y1+YD:IF Y1>63 THEN Y1=63
530 IF Y1<0 THEN Y1=0
540 DELAY DL*10
550 IF FLAG<>1 GOTO 570
560 COLOR 255:PLOT X1,Y1:DELAY 100:NEXT N:COLOR 0:PLOT X1,Y1:GOTO 580
570 COLOR 255:PLOT X1,Y1
580 IF A$="" GOTO 490
590 IF VAL(A$)<1 GOTO 610
600 DL=DL*VAL(A$)
610 IF A$="F" OR A$="f" THEN DL=OG
620 A=ASC(A$)
630 IF A<>32 GOTO 650
640 IF FLAG=1 THEN FLAG=0 ELSE FLAG=1
650 IF A=4 GOTO 670
651 IF A=5 GOTO 690
652 IF A=19 GOTO 680
653 IF A=24 GOTO 700
654 GOTO 490
655 REM *** Change direction of Cursor ***
660 REM ON A-27 GOTO 670, 680, 690, 700
670 YD=0:XD=1:GOTO 490 REM RIGHT
680 YD=0:XD=-1:GOTO 490 REM LEFT
690 XD=0:YD=-1:GOTO 490 REM UP
700 YD=1:XD=0:GOTO 490 REM DOWN
705 REM *** Draft Mode ***
710 X1=40:Y1=40
720 CLS
730 GET A$
740 X1=X1+XD:IF X1>239 THEN X1=239
750 IF X1<0 THEN X1=0
760 Y1=Y1+YD:IF Y1>63 THEN Y1=63
770 IF Y1<0 THEN Y1=0
780 DELAY DL*10
790 COLOR 255:PLOT X1,Y1
800 DELAY 50
810 COLOR 0:PLOT X1,Y1
820 IF A$="" GOTO 730
830 IF A$="S" or A$="s" GOTO 850
840 GOTO 990
845 REM *** Set one point ***
850 PO=PO+1
860 COLOR 255:PLOT X1,Y1
870 IF PO=1 THEN X2=X1:Y2=Y1:GOTO 730
875 REM *** Draw Line ***
880 LINE X1,Y1,X2,Y2
890 PO=0
900 GET A$:IF A$="" GOTO 900
910 IF A$="S" OR A$="s" GOTO 950
920 A=ASC(A$)
930 IF A<>4 AND A<>5 AND A<>19 AND A<>24 GOTO 900
940 GOTO 980
950 PO=1
960 X2=X1:Y2=Y1
970 GOTO 900
975 REM *** Change Cursor Direction ***
980 IF A=4 GOTO 990 REM RIGHT
981 IF A=5 GOTO 1010 REM UP
982 IF A=19 GOTO 1000 REM LEFT
983 IF A=24 GOTO 1020 REM DOWN
984 GOTO 900
990 YD=0:XD=1:GOTO 730
1000 YD=0:XD=-1:GOTO 730
1010 XD=0:YD=-1:GOTO 730
1020 YD=1:XD=0:GOTO 730