{"id":275,"date":"2026-11-19T16:02:31","date_gmt":"2026-11-19T16:02:31","guid":{"rendered":"https:\/\/permacomputer.solarpunk.au\/?p=275"},"modified":"2026-11-19T16:02:31","modified_gmt":"2026-11-19T16:02:31","slug":"permacomputer-text-editor-devlog-2","status":"publish","type":"post","link":"https:\/\/permacomputer.solarpunk.au\/?p=275","title":{"rendered":"Permacomputer Text Editor Devlog #2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The proof-of-concept Tiny BASIC text editor that the people&#8217;s permacomputer project sponsors has hit another milestone.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The text editor has added a primitive edit mode.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Edit mode allows a simple search and replace functionality. Please be advised that the program will only replace the first match it finds, requiring the user to rather laboriously repeat typing in the fields.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ctrl-D (see code, ASCII code number 4) is the keyboard sequence that the user must input in order to complete an edit field. This is somewhat unconventional, but it allows a user to search strings that include newlines.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The code, however, is a global search of the whole buffer, and is a departure from EDITYPE, which required users to step through the buffer one line at a time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Video<\/h2>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"686\" style=\"aspect-ratio: 956 \/ 686;\" width=\"956\" controls src=\"https:\/\/permacomputer.solarpunk.au\/wp-content\/uploads\/2026\/11\/demo2-final.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Current Code<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Please note that all indentation is for cosmetic purposes only. Many of these lines, if copied and pasted verbatim from this presentation of the code, will be truncated by default Stefan&#8217;s BASIC settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Apple 1 compatibility is primarily turned on to enable string array functionality.<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>1 REM PEOPLE'S PERMACOMPUTER EDITOR.\n2 REM INSPIRED BY VIC EDITYPE (1983).\n3 REM\n4 REM DESIGNED FOR THE ARDUINO MEGA 2560.\n5 REM WRITTEN IN STEFAN'S BASIC.\n6 REM\n7 REM PUBLIC DOMAIN DEDICATION.\n8 REM\n9 REM \n10 SET 22,\"Apple1\"\n20 DIM T$(48,24)\n30 FOR I=1 TO 24:T$()(I)=\"\":NEXT I\n40 DIM SCRATCH$(48)\n41 DIM SEARCH$(80)\n42 DIM REPLACE$(80)\n43 DIM C6$(80)\n50 NL=1\n60 BKSP=8\n70 CR=13\n80 LF=10\n499 REM FALL INTO HERE\n500 REM MENU\n510 PRINT: PRINT \"N=NEW E=EDIT P=PRINT S=SAVE Q=QUIT\"\n520 INPUT \">\";M$\n530 IF M$=\"N\" GOTO 1000\n540 IF M$=\"E\" GOTO 3000\n550 IF M$=\"P\" GOTO 4000\n555 IF M$=\"S\" GOTO 5000\n560 IF M$=\"Q\" GOTO 9000\n570 GOTO 500\n1000 REM COMPOSE MODE \n1001 INPUT \"TYPE FILE NAME\";V$\n1002 GOSUB 9000: REM CLEAR SCREEN\n1003 PRINT \"COMPOSE MODE\"\n1005 IF NL>24PRINT \"LINE LIMIT\":  GOTO 500\n1010 PRINT \">\";T$()(NL);\n1020 GET C$\n1030 IF C$=\"\" THEN  GOTO 1020\n1040 IF C$=\"@\" THEN  GOTO 500\n1050 IF C$=CHR$(BKSP) AND LEN(T$()(NL))=0 THEN  GOTO 1020\n1060 IF C$=CHR$(BKSP) THEN  GOTO 1600\n1070 IF C$=CHR$(CR) OR C$=CHR$(LF) THEN  GOTO 1500\n1080 IF ASC(C$)&lt;32 GOTO 1020\n1090 PUT C$\n1100 T$()(NL)=T$()(NL)+C$\n1120 C$=\"\"\n1130 IF LEN(T$()(NL))&lt;48 THEN 1020\n1199 REM FALL INTO HERE\n1200 REM WORD WRAP (IF LINE HITS 48)\n1210 S=LEN(T$()(NL))\n1220 IF RIGHT$(T$()(NL),1)=\" \" THEN  GOTO 1250\n1230 SCRATCH$=T$()(NL+1)\n1232 T$()(NL+1)=RIGHT$(T$()(NL),1)+SCRATCH$\n1240 T$()(NL)=LEFT$(T$()(NL),S-1)\n1245 S=S-1:GOTO 1220\n1250 REM MEMORY CHECKS\n1260 IF T$()(NL)=\"\" THEN T$()(NL)=\" \"\n1270 IF SIZE &lt;600 THEN PRINT \"MEMORY LOW\": PRINT\n1280 IF SIZE &lt;500 THEN PRINT \"MEMORY CRITICAL\":  GOTO 500\n1290 NL=NL+1\n1291 REM ENABLE THE FOLLOWING LINE TO ECHO THE WRAPPED PRECEDING LINE\n1295 REM PRINT:PRINT \">\";T$()(NL-1);\n1300 PRINT: PRINT \">\";T$()(NL);\n1310 GOTO 1020\n1500 REM NEWLINE\n1505 PUT CR: PUT LF\n1510 NL=NL+1\n1520 IF NL>24 THEN PRINT \"BUFFER FULL\":  GOTO 500\n1530 GOTO 1010\n1600 REM BACKSPACE (CURRENT LINE ONLY)\n1610 L=LEN(T$()(NL))\n1615 IF L&lt;1 GOTO 1020\n1620 IF L=1 THEN T$()(NL)=\"\":  GOTO 1640\n1625 SCRATCH$=LEFT$(T$()(NL),L-1)\n1630 T$()(NL)=SCRATCH$\n1640 PUT 8: PUT 32: PUT 8\n1650 GOTO 1020\n2999 REM EDIT MODE\n3000 SEARCH$=\"\": REPLACE$=\"\"\n3010 PRINT \"EDIT MODE\"\n3020 PRINT \"@=RETURN TO MENU\"\n3030 PRINT \"C=CORRECT\"\n3040 FOR I=1 TO 24\n3050     PRINT I,T$()(I)\n3060 NEXT I\n3070 GET W$\n3080 IF W$=\"\" THEN  GOTO 3070\n3090 IF W$=\"@\" THEN  GOTO 500\n3100 IF W$=\"C\" THEN  GOTO 3200\n3110 GOTO 3070\n3200 PRINT \"ERROR:\"\n3210 FOR ERRSTRING=1 TO 80\n3220     GET J$\n3230     IF J$=\"\" THEN  GOTO 3220\n3240     IF J$=CHR$(4) THEN  GOTO 3290\n3250     IF J$=CHR$(BKSP) THEN SEARCH$=LEFT$(SEARCH$,LEN(SEARCH$)-1):  GOTO 3270\n3260     SEARCH$=SEARCH$+J$\n3270     PRINT J$;\n3280 NEXT ERRSTRING\n3290 PRINT: PRINT \"CORRECTION: \"\n3300 FOR ERRSTRING=1 TO 80\n3310     GET J$\n3320     IF J$=\"\" THEN  GOTO 3310\n3330     IF J$=CHR$(4) THEN  GOTO 3500\n3340     IF J$=CHR$(BKSP) THEN REPLACE$=LEFT$(REPLACE$,LEN(REPLACE$)-1):  GOTO 3360\n3350     REPLACE$=REPLACE$+J$\n3360     PRINT J$;\n3370 NEXT ERRSTRING\n3500 GOSUB 9000: REM CLEAR SCREEN\n3510 PRINT \"CORRECTING\"\n3520 FOR I=1 TO 24\n3530     FOR J=1 TO LEN(T$()(I))\n3540         O=LEN(SEARCH$)\n3550         IF MID$(T$()(I),J,O)=SEARCH$ THEN OO=LEN(T$()(I))-J+1-O\n3560         IF MID$(T$()(I),J,O)=SEARCH$ THEN C6$=RIGHT$(T$()(I),OO)\n3570         IF MID$(T$()(I),J,O)=SEARCH$ THEN T$()(I)=LEFT$(T$()(I),J-1):  GOTO 3590\n3580         GOTO 3610\n3590         T$()(I)=T$()(I)+REPLACE$+C6$: SEARCH$=\"\": REPLACE$=\"\"\n3600         FOR H=1 TO I: PRINT T$()(H): NEXT H:  GOTO 3020\n3610     NEXT J\n3620 NEXT I\n3630 PRINT \"ERROR STRING NOT FOUND\": PRINT:  GOTO 3020\n3640 GOTO 3000\n9000 PUT 27: PUT 91: PUT 50: PUT 74: RETURN: REM CLEAR SCREEN<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Important Links<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Git Repo<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/codeberg.org\/vidak\/peoples\">https:\/\/codeberg.org\/vidak\/peoples<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Forum Thread Discussion<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/basiclang.solarpunk.au\/d\/4-the-peoples-permacomputer-project\/15\">https:\/\/basiclang.solarpunk.au\/d\/4-the-peoples-permacomputer-project\/15<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">VIC EDITYPE Historical Source Code<\/h3>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-the-people-039-s-permacomputer-project wp-block-embed-the-people-039-s-permacomputer-project\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"HLHAhHtQ1c\"><a href=\"https:\/\/permacomputer.solarpunk.au\/?p=93\">VIC EDITYPE<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\u201cVIC EDITYPE\u201d \u2014 The People&amp;apos;s Permacomputer Project\" src=\"https:\/\/permacomputer.solarpunk.au\/?p=93&amp;embed=true#?secret=ysarCfUR3i#?secret=HLHAhHtQ1c\" data-secret=\"HLHAhHtQ1c\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/www.vic20listings.freeolamail.com\/book_computevic2.html\">http:\/\/www.vic20listings.freeolamail.com\/book_computevic2.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The proof-of-concept Tiny BASIC text editor that the people&#8217;s permacomputer project sponsors has hit another milestone. The text editor has added a primitive edit mode. Edit mode allows a simple search and replace functionality. Please be advised that the program will only replace the first match it finds, requiring the user to rather laboriously repeat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":279,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"The proof-of-concept Tiny BASIC text editor that the people's permacomputer project sponsors has hit another milestone.\n\nThe text editor has added a primitive edit mode.\n\nEdit mode allows a simple search and replace functionality. Please be advised that the program will only replace the first match it finds, requiring the user to rather laboriously repeat typing in the fields.\n\n#retrocomputing #basic #arduino #permacomputing #solarpunk","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[18,25],"tags":[17,27],"class_list":["post-275","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-basic-text-editors","category-videos","tag-retrocomputing","tag-stefans-basic"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/permacomputer.solarpunk.au\/wp-content\/uploads\/2026\/11\/Screenshot_2026-11-19_23-57-04.png","_links":{"self":[{"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=\/wp\/v2\/posts\/275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=275"}],"version-history":[{"count":4,"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":281,"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions\/281"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=\/wp\/v2\/media\/279"}],"wp:attachment":[{"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/permacomputer.solarpunk.au\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}