--- title: "Text Editor 2000 2.2" id: 55074 type: "computer_media" slug: "text-editor-2000-2-2" url: "http://localhost/computer_media/text-editor-2000-2-2/" markdown_url: "http://localhost/computer_media/text-editor-2000-2-2.md" published_at: "2024-06-14T01:24:05+00:00" modified_at: "2026-03-31T22:39:54+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2019/02/20230809-041332.jpg" excerpt: "A surprisingly capable full-screen text editor that handles insert, delete, search-and-replace, justification, centering, and tape-based save/load all within a single BASIC program." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Christopher Nystrom" slug: "christopher-nystrom" taxonomy: "indiv" url: "http://localhost/indiv/christopher-nystrom/" - name: "Mannie Quintero" slug: "mannie-quintero" taxonomy: "indiv" url: "http://localhost/indiv/mannie-quintero/" - name: "Ron Ruegg" slug: "ron-ruegg" taxonomy: "indiv" url: "http://localhost/indiv/ron-ruegg/" genre: - name: "Word Processor" slug: "word-processor" taxonomy: "genre" url: "http://localhost/type/word-processor/" media_type: "Program" programmers: - name: "Christopher Nystrom" slug: "christopher-nystrom" taxonomy: "indiv" url: "http://localhost/indiv/christopher-nystrom/" - name: "Ron Ruegg" slug: "ron-ruegg" taxonomy: "indiv" url: "http://localhost/indiv/ron-ruegg/" - name: "Mannie Quintero" slug: "mannie-quintero" taxonomy: "indiv" url: "http://localhost/indiv/mannie-quintero/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Text%20Editor%202000%202.2%20%281985%29%28Nystrom%2C%20Chris%29%28TS2068%29%28US%29%28Program%29.zip" mediadate: "1985" images: - url: "http://localhost/wp-content/uploads/2024/06/SCR-20260331-qhik.png" - url: "http://localhost/wp-content/uploads/2024/06/SCR-20260331-qhkn.png" article_media: - id: 61226 title: "TEXT EDITOR 2000" type: "article" url: "http://localhost/article/text-editor-2000/" related_products: - id: 22435 title: "Text Editor 2000" type: "product" url: "http://localhost/product/text-editor-2000/" media_type_tags: "Word Processor" --- This program is a full-featured text editor called “Text Editor 2000” (version 2.2), storing the entire document as a single string array variable `t$` dimensioned in multiples of 32 characters per line and up to 704 characters per screen page. The editor supports cursor movement, insert and delete operations, search-and-replace, text justification, centering, save/load via tape, printer output with optional double-spacing or double-width modes, and SCREEN$ embedding in printed output. Text manipulation (insert, delete, copy) is performed by copying `t$` into a working buffer `u$`, resizing the array with DIM, then writing back in 704-character chunks to work around the lack of string slicing assignment across large buffers. The program includes a POKE to address 23609 to adjust the keyboard repeat rate, and uses `PAPER`, `INK`, `BORDER`, and stream `#1` (lower display area) for its status bar interface. Printer control codes are sent directly via `OUT 127` for double-width mode on compatible printers. *** ## Program Analysis ### Program Structure The program is organized into a set of numbered modules, each responsible for a distinct editor function. Execution begins at line `9830` (the startup routine), which initializes display colors, dimensions the text buffer `t$`, sets column width `w=32`, and falls through to the main menu at line `735`. The main menu at line `720` dispatches to feature modules via computed `GO TO VAL s$*1000` (line `890`), mapping digit keys 1–9 directly to module entry points at lines 1000, 2000, … 9000. | Line Range | Module | | --- | --- | | 10–420 | Cursor/editor main loop and Enter handler | | 720–895 | Main menu display and dispatch | | 900–990 | Input text (option 0) | | 1000–1160 | Save text to tape (option 1) | | 2000–2080 | Load text from tape (option 2) | | 3000–3330 | Insert text / load-insert (option 3) | | 3500–3510 | Type-over mode (option B) | | 4000–4170 | Delete text (option 4) | | 4500–4510 | Change column width (option W) | | 5000–5250 | Justify text (option 5) | | 5500–5730 | Center text (option A) | | 6000–6580 | Search and replace (option 6) | | 7000–7760 | Text output: screen, printer, double-width (option 7) | | 8000–8070 | Clear text (option 8) | | 8500–8620 | Change display colors (option C) | | 9000–9040 | Quick Note direct printer output (option 9) | | 9100–9120 | Subroutine: clear status bar (stream #1) | | 9200–9290 | Subroutine: copy t$ to u$, expand t$ (CLEAR t$) | | 9300–9360 | Subroutine: write prefix of u$ into t$ (ADD TEXT #1) | | 9400–9460 | Subroutine: write v$ block into t$ at insertion point (ADD TEXT #2) | | 9500–9580 | Subroutine: write suffix of u$ into t$ after insertion (ADD TEXT #3) | | 9600–9650 | Subroutine: render current screen page from t$ | | 9830–9890 | Program entry point and initialization | | 9940–9990 | Self-save routine (option S) | ### Text Buffer Management The entire document is stored in a single string array `t$` dimensioned in multiples of 32 characters (one line = 32 chars, one screen = 22 lines = 704 chars). Because BASIC does not support in-place resizing of string arrays, insert and delete operations follow a three-phase copy protocol: (1) the current `t$` is duplicated into a working buffer `u$` via subroutine `9200`/`9210`; (2) `t$` is re-dimensioned with `DIM` to the new required size; (3) the prefix (subroutine `9300`), new content, and suffix (subroutine `9510`) are written back in 704-character chunks to avoid exceeding string slice limits. The 704-character chunked copy loop pattern appears repeatedly throughout (lines `9220`–`9270`, `9300`–`9360`, `9400`–`9460`, `9500`–`9570`). Each loop checks whether the remaining data fits in the current 704-byte window and uses a tail assignment `t$(i TO )` for the final partial chunk. ### Cursor and Display Model The editor maintains a logical cursor position as a character index `s` into `t$`, along with screen row `x1` and column `x2`. Each cursor-movement routine (left: `125`, right: `275`, up: `220`, down: `170`) first prints the character at the current position to “unmark” it, adjusts `s`, `x1`, and `x2`, then calls the screen-render subroutine at `9600` when a page boundary is crossed. Page up/down (lines `320`, `350`) scroll by exactly 704 characters (22 rows × 32 columns). The variable `a` tracks the first character index of the currently displayed page, and `b` is computed as `a+703`. ### Input Handling and Mode Switching The main edit loop (lines `50`–`115`) polls `INKEY$` directly without `PAUSE 0`, cycling until a key is detected. Control characters are dispatched by ASCII code: - `CHR$ 4` — Page Down - `CHR$ 5` — Page Up - `CHR$ 8` — Cursor Left - `CHR$ 9` — Cursor Right - `CHR$ 10` — Cursor Down - `CHR$ 11` — Cursor Up - `CHR$ 13` — Enter / mark selection - `CHR$ 226` — Menu (EDIT key or equivalent) Type-over mode is indicated by `s$="B"` or `s$="b"` (line `105`), which allows any non-control character to be written directly into `t$(s)` at the current cursor position (line `110`). ### Search and Replace The search subroutine at line `6500` scans `t$` character by character from position `s2`, printing each scanned character to the screen as it goes (providing a visual “scrolling” effect). When a match is found, it returns with `d=0`; when the end of the string is reached, it sets `d=1`. The replace loop (lines `6030`–`6150`) handles the case where the replacement string is longer or shorter than the search string by resizing `t$` via the standard buffer-copy protocol before writing the replacement. ### Printer Output Options The text output module (option 7) offers several printer modes: plain stream output via `PRINT #3;t$`, measured-width output via subroutine `7500` which sends each `w`-character line with optional double-spacing (`LPRINT` of a blank line), double-width mode at lines `7600`–`7750` which prints even and odd line passes separately, and SCREEN$-interleaved output (lines `7330`–`7490`) which searches for the string `"SCR$"` as a marker, prints text up to each marker, loads a SCREEN$ from tape, copies it, then continues. Double-width printer mode is initialized with a sequence of `OUT 127` port writes at line `7505`: `OUT 127,15: OUT 127,27: OUT 127,87: OUT 127,1`. ### Justification Algorithm The justification routine (lines `5000`–`5240`) iterates over each `w`-character line of `t$`. For lines that do not end at a word boundary (i.e., the last character is not a space or the next character is not a space), it attempts to expand spaces within the line by shifting characters rightward from a position `j` scanning left from the line end. The variable `d` acts as a spacing increment that increases each pass, distributing extra spaces somewhat evenly. Lines are printed as they are justified. The use of `PEEK 23689` to detect scroll condition and issue `CLS` is a notable screen-management technique. ### Notable Bugs and Anomalies - Line `185`: `LET a=b+1` references `b` (end of current display window) rather than the current value of `a`; this is likely intentional to advance to the next page, but since `b` is always set as `a+703`, this is equivalent to `a=a+704`. - Line `325`: `LET a=b+1` is used again for page-down, consistent with the above. - Line `8590`: references `VAL a$` for `BORDER` but the ink color prompt only sets `b$`; the variable `a$` for ink/border is never collected. This means `BORDER VAL a$` uses whatever `a$` held from a previous operation — a latent bug. - Line `8550` is referenced as a `GO TO` target from line `8590` but does not exist in the listing; the intent was presumably to loop back to a missing ink-color prompt. - Line `3010` and `4010`: `GO SUB 20` targets line `20`, which only contains a `LET d1=0` assignment — this is used as a shared initialization step before editor selection routines that require a marked region. - Line `5720`: `LET t$(d1+s TO d1+s+LEN b$)=b$` assigns `LEN b$+1` characters from a string of length `LEN b$`, which will pad with a space at the end — a minor off-by-one. - Line `9400`: the loop variable `i` is initialized with `FOR i=i TO LEN v$`, reusing the terminal value of `i` from the preceding subroutine `9300` rather than starting at 1. This is intentional: after writing the prefix, the loop for the inserted block starts where the prefix copy left off in terms of the loop counter, though the index semantics differ between the two subroutines. ### Miscellaneous Techniques - `POKE 23609,5` at line `9890` sets the keyboard repeat speed (REPPER system variable) to 5 frames, giving faster key repeat during editing. - The status bar is implemented using stream `#1` (the lower display), keeping editor output and status messages visually separated without requiring `AT` coordinates in the main display area. - The self-save option (S key) at line `9940` issues `CLEAR` then `SAVE "Textype" LINE 9830`, saving the program with an auto-run start line. - The column width variable `w` (default 32) is used throughout justification, centering, and printer output, allowing the editor to target narrower column formats via option W. ## Source Code ``` 1 REM TEXT EDITOR 2000 version 2.2 by C.Nystrom 1985 with SETYPE by RRRuegg all public domain. 2 REM Meld by M Quintero 1985 10 REM \''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\'' EDITOR 20 LET d1=0 25 LET a=1 30 GO SUB 9600 35 LET x1=0 40 LET x2=0 45 LET s=1 50 PRINT AT x1,x2;t$(s) 55 LET a$=INKEY$ 60 IF a$="" THEN GO TO 55 65 IF a$=CHR$ 4 THEN GO TO 320 70 IF a$=CHR$ 5 THEN GO TO 350 75 IF a$=CHR$ 8 THEN GO TO 125 80 IF a$=CHR$ 9 THEN GO TO 275 85 IF a$=CHR$ 10 THEN GO TO 170 90 IF a$=CHR$ 11 THEN GO TO 220 95 IF a$=CHR$ 13 THEN GO TO 380 100 IF a$=CHR$ 226 THEN GO TO 720 105 IF s$<>"b" AND s$<>"B" THEN GO TO 55 110 LET t$(s)=a$ 115 GO TO 275 120 REM \''\''\''\''\''\''\''\''\''\''\''\'' Cursor Left 125 PRINT AT x1,x2;t$(s) 130 IF s=1 THEN GO TO 50 135 IF x2>0 THEN GO TO 150 140 LET s=s+32 145 LET x2=32 150 LET x2=x2-1 155 LET s=s-1 160 GO TO 50 165 REM \''\''\''\''\''\''\''\''\''\''\'' Cursor Down 170 PRINT AT x1,x2;t$(s) 175 IF s+32>LEN t$ THEN GO TO 50 180 IF x1<21 THEN GO TO 200 185 LET a=b+1 190 GO SUB 9600 195 LET x1=-1 200 LET x1=x1+1 205 LET s=s+32 210 GO TO 50 215 REM \''\''\''\''\''\''\''\''\''\'' Cursor Up 220 PRINT AT x1,x2;t$(s) 225 IF s<32 THEN GO TO 50 230 IF x1>0 THEN GO TO 255 235 LET a=a-704 240 IF a<1 THEN LET a=1 245 GO SUB 9600 250 LET x1=22 255 LET x1=x1-1 260 LET s=s-32 265 GO TO 50 270 REM \''\''\''\''\''\''\''\''\''\'' Cursor Right 275 PRINT AT x1,x2;t$(s) 280 IF s=LEN t$ THEN GO TO 50 285 IF x2<31 THEN GO TO 300 290 LET s=s-32 295 LET x2=x2-32 300 LET x2=x2+1 305 LET s=s+1 310 GO TO 50 315 REM \''\''\''\''\''\''\''\''\''\''\''\'' Page Down 320 IF s+704>LEN t$ THEN GO TO 50 325 LET a=b+1 330 GO SUB 9600 335 LET s=s+704 340 GO TO 50 345 REM \''\''\''\''\''\''\''\''\''\''\''\'' Page Up 350 IF s-704<1 THEN GO TO 50 355 LET a=a-704 360 GO SUB 9600 365 LET s=s-704 370 GO TO 50 375 REM \''\''\''\''\''\''\''\''\''\''\''\''\''\'' Enter 380 IF s$="B" OR s$="b" THEN GO TO 720 385 PRINT AT x1,x2; INVERSE 1; "*" 390 IF d1>0 THEN GO TO 410 395 LET d1=s 400 IF s$<>"4" THEN RETURN 405 GO TO 280 410 IF sCHR$ 58 THEN GO TO 720 870 BEEP .08,5 880 IF s$="0" THEN GO TO 900 890 GO TO VAL s$*1000 895 REM \''\''\''\''\''\''\''\''\''\''\''\'' INPUT TEXT 900 IF LEN t$>11040 THEN GO TO 1500 905 LET b$="" 910 IF LEN t$<64 THEN GO TO 920 915 LET b$=t$(LEN t$-63 TO LEN t$) 920 INPUT AT 21,0;"------------------------------- INPUT TEXT";AT 0,0;(b$); LINE a$ 925 IF a$="" THEN GO TO 800 930 IF t$=" " THEN GO TO 965 935 GO SUB 9200 940 LET d1=LEN u$+1 945 GO SUB 9300 950 LET t$(d1 TO d1+LEN a$-1)=a$ 955 DIM u$(1) 960 GO TO 985 965 LET d=INT (LEN a$/32-.01)+1 970 DIM t$(d*32) 975 LET t$=a$ 985 BEEP .1,7 990 GO TO 900 995 REM \''\''\''\''\''\''\''\''\''\''\''\''\'' SAVE TEXT 1000 INPUT "-------------------------------- Name of Text: ";n$ 1010 IF n$=CHR$ 226 OR n$="" THEN GO TO 800 1020 IF LEN n$>10 THEN LET n$=n$( TO 10) 1030 GO SUB 9100 1040 PRINT #1;AT 1,5;"SAVING AS: ";n$ 1050 SAVE n$ DATA t$() 1060 BEEP .1,10 1070 GO SUB 9100 1080 PRINT #1;AT 1,7;"VERIFY SAVE Y/N)"; FLASH 1;"?" 1090 PAUSE 0 1100 LET a$=INKEY$ 1110 IF a$="N" OR a$="n" THEN GO TO 1150 1120 GO SUB 9100 1130 PRINT #1;AT 1,5;"VERIFYING : ";n$ 1140 VERIFY n$ DATA t$() 1150 BEEP .1,7 1160 GO TO 800 1490 REM \''\''\''\''\''\''\''\''\''\''\''\''\''\'' Full File 1500 PRINT AT 7,9;"TEXT FILE FULL" 1510 PRINT AT 9,10;"SAVE TO TAPE" 1520 GO TO 800 1990 REM \''\''\''\''\''\''\''\''\''\''\''\''\'' LOAD TEXT 2000 INPUT "------------------------------ Name of Text; ";n$ 2010 IF n$=CHR$ 226 THEN GO TO 800 2020 IF LEN n$>10 THEN LET n$=n$( TO 10) 2030 GO SUB 9100 2040 PRINT #1;AT 1,0;" LOADING: ";n$ 2050 DIM t$(1) 2060 LOAD n$ DATA t$() 2070 BEEP .1,7 2080 GO TO 800 2990 REM \''\''\''\''\''\''\''\''\''\''\'' INSERT TEXT 3000 LET b$="INSERT TEXT" 3010 GO SUB 20 3020 CLS 3030 GO SUB 9100 3040 PRINT #1;AT 1,2;"TEXT NEED TO BE LOADED (Y/N)";"?" 3050 PAUSE 0 3060 LET a$=INKEY$ 3070 IF a$="Y" OR a$="y" THEN GO TO 3200 3080 INPUT AT 21,0;"------------------------------ INSERT TEXT";AT 0,0; LINE a$ 3100 IF a$="" THEN GO TO 800 3110 GO SUB 9200 3120 GO SUB 9300 3130 LET t$(d1 TO d1+LEN a$-1)=a$ 3140 GO SUB 9500 3150 GO TO 7030 3190 REM \''\''\''\''\''\''\''\''\''\''\''\'' Load Insert 3200 INPUT "------------------------------- Name of Text: ";n$ 3210 IF n$=CHR$ 226 THEN GO TO 800 3220 IF LEN n$>10 THEN LET n$=n$( TO 10) 3230 GO SUB 9100 3240 PRINT #1;AT 1,6;"LOADING: ";n$ 3250 LOAD n$ DATA v$() 3260 BEEP .1,10 3270 LET d=INT (LEN v$/32-.01)+1 3280 GO SUB 9210 3290 GO SUB 9300 3300 GO SUB 9400 3310 LET n=d1-1+LEN v$ 3320 GO SUB 9510 3330 GO TO 7030 3490 REM \''\''\''\''\''\''\''\''\''\''\''\''\'' TYPE OVER 3500 LET b$="TYPE OVER" 3510 GO TO 25 3990 REM \''\''\''\''\''\''\''\''\''\'' DELETE TEXT 4000 LET b$="DELETE TEXT" 4010 GO SUB 20 4020 CLS 4030 IF d1=1 AND d2=LEN t$ THEN GO TO 8050 4040 LET d=-(INT ((d2-d1+1)/32)) 4050 GO SUB 9210 4060 GO SUB 9300 4070 LET n=d1-1 4075 LET d=d1 4080 LET d1=d2+1 4090 GO SUB 9510 4100 GO SUB 9100 4105 LET d1=d 4110 PRINT #1;AT 1,0;" INSERT AT SAME PLACE (Y/N) ";"?" 4120 PAUSE 0 4130 LET a$=INKEY$ 4140 CLS 4150 IF a$="Y" OR a$="y" THEN GO TO 3030 4160 DIM u$(1) 4170 GO TO 7030 4490 REM \''\''\''\''\''\''\''\''\''\''\'' Change Width 4500 INPUT "------------------------------- NUMBER OF COLUMNS:";w 4510 GO TO 800 4990 REM \''\''\''\''\''\''\''\''\''\''\'' JUSTIFICATION 5000 IF t$="" THEN RETURN 5010 FOR i=1 TO INT (LEN t$/w-.01) 5020 IF t$(i*w)<>" " THEN GO TO 5190 5030 IF t$(i*w+1)=" " THEN GO TO 5190 5040 FOR j=0 TO 10 5050 IF t$(i*w-j)<>" " THEN GO TO 5080 5060 NEXT j 5070 GO TO 5190 5080 LET d=2 5090 FOR j=3 TO w 5100 IF t$((i-1)*w+j)<>" " THEN GO TO 5160 5110 FOR k=0 TO w-j-1 5120 LET t$(i*w-k)=t$(i*w-k-1) 5130 NEXT k 5140 IF t$(i*w)<>" " THEN GO TO 5190 5150 LET j=j+d 5160 NEXT j 5170 LET d=d+1 5180 GO TO 5090 5190 IF PEEK 23689=2 THEN CLS 5200 PRINT t$((i-1)*w+1 TO i*w) 5210 NEXT i 5220 IF PEEK 23689=2 THEN CLS 5230 PRINT t$((i-1)*w+1 TO ) 5240 BEEP .1,7 5250 GO TO 800 5490 REM \''\''\''\''\''\''\''\''\''CENTER TEXT 5500 LET b$="CENTER TEXT" 5510 GO SUB 20 5520 CLS 5530 LET s1=0 5540 FOR i=d1 TO d1+w-1 5550 IF t$(i)<>" " THEN GO TO 5590 5560 LET s1=s1+1 5570 NEXT i 5590 IF s1=w THEN GO TO 800 5600 LET s2=0 5610 FOR i=d1+w-1 TO d1 STEP -1 5620 IF t$(i)<>" " THEN GO TO 5650 5630 LET s2=s2+1 5640 NEXT i 5650 IF s1=s2 THEN GO TO 800 5660 LET s2=w-s2-1 5670 LET b$=t$(d1+s1 TO d1+s2) 5680 FOR i=d1 TO d1+w-1 5690 LET t$(i)=" " 5700 NEXT i 5710 LET s=(w/2)-(LEN b$/2) 5720 LET t$(d1+s TO d1+s+LEN b$)=b$ 5730 GO TO 7030 5990 REM \''\''\''\''\'' SEARCH AND REPLACE 6000 INPUT AT 21,0;"-------------------------------- INPUT FIRST STRING";AT 0,0; LINE b$ 6010 IF b$="" THEN GO TO 800 6020 INPUT AT 21,0;"-------------------------------- INPUT SECOND STRING";AT 0,0; LINE a$ 6030 LET d=0 6040 LET s2=0 6050 GO SUB 6500 6060 IF d=1 THEN GO TO 6200 6070 LET d=INT ((LEN a$-LEN b$)/32-.01)+1 6080 GO SUB 9210 6090 LET d1=s2 6100 GO SUB 9300 6110 LET t$(d1 TO d1+LEN a$-1)=a$ 6120 LET n=d1-1+LEN a$ 6130 LET d1=d1+LEN b$ 6140 GO SUB 9510 6150 GO TO 6050 6200 IF PEEK 23688=2 AND PEEK 23689=3 THEN CLS 6210 PRINT t$(s2 TO ) 6220 BEEP .1,7 6230 GO TO 800 6490 REM \''\''\''\''\''\''\''\''\''\''\''\''\''\'' SEARCH 6500 LET s2=s2+1 6510 IF s2=1 THEN GO TO 6540 6520 IF PEEK 23688=2 AND PEEK 23689=3 THEN CLS 6530 PRINT t$(s2-1); 6540 IF s2+LEN b$-1>LEN t$ THEN GO TO 6570 6550 IF t$(s2 TO s2+LEN b$-1)=b$ THEN RETURN 6560 GO TO 6500 6570 LET d=1 6580 RETURN 6990 REM \''\''\''\''\''\''\''\''\''\''\'' TEXT OUTPUT 7000 GO SUB 9100 7005 PRINT #1;AT 1,5;"TO THE PRINTER Y/N)";"?" 7010 PAUSE 0 7015 LET a$=INKEY$ 7020 CLS 7025 IF a$="Y" OR a$="y" THEN GO TO 7100 7030 FOR i=1 TO LEN t$ STEP 704 7035 CLS 7040 IF i+703<=LEN t$ THEN GO TO 7055 7045 PRINT t$(i TO ) 7050 GO TO 800 7055 PRINT t$(i TO i+703) 7060 GO SUB 9100 7065 PRINT #1;AT 1,8;"NEXT PAGE (Y/N)";"?" 7070 PAUSE 0 7075 LET a$=INKEY$ 7080 BEEP .1,7 7085 IF a$="N" OR a$="n" THEN GO TO 800 7090 NEXT i 7095 GO TO 800 7100 GO SUB 9100 7110 PRINT #1;AT 1,7;"DOUBLE SPACE (Y/N)";"?" 7120 LET ds=0 7130 PAUSE 0 7140 LET a$=INKEY$ 7150 IF a$="Y" OR a$="y" THEN LET ds=1 7160 GO SUB 9100 7170 PRINT #1;AT 1,7;"DOUBLE WIDTH (Y/N)";"?" 7180 PAUSE 0 7190 LET a$=INKEY$ 7195 CLS 7200 IF a$="Y" OR a$="y" THEN GO TO 7600 7210 GO SUB 9100 7220 PRINT #1;AT 1,4;"ARE THERE SCREENS (Y/N)";"?" 7230 PAUSE 0 7240 LET a$=INKEY$ 7245 CLS 7250 IF a$="Y" OR a$="y" THEN GO TO 7330 7260 IF w<>32 OR ds=1 THEN GO TO 7290 7270 PRINT #3;t$ 7275 BEEP .1,7 7280 GO TO 800 7290 LET s1=1 7300 LET s2=LEN t$ 7305 GO SUB 7500 7310 BEEP .1,7 7315 GO TO 800 7320 REM \''\''\''\''\''\''\''\''\'' SCREEN$ Output 7330 LET b$="SCR$" 7340 LET s2=0 7350 LET d=0 7355 LET s1=s2 7360 IF s1=0 THEN LET s1=1 7365 GO SUB 6500 7370 IF d=1 THEN LET s2=LEN t$ 7375 IF d<>1 THEN LET s2=s2-1 7377 IF s2<=0 THEN GO TO 7400 7380 IF w=32 AND ds=0 THEN LPRINT t$(s1 TO s2) 7390 IF w<>32 OR ds=1 THEN GO SUB 7500 7400 IF d=1 THEN GO TO 7310 7405 GO SUB 9100 7410 PRINT #1;AT 1,8;"START THE TAPE" 7430 LOAD ""SCREEN$ 7450 PRINT #1;AT 1,7;"STOP THE TAPE" 7460 COPY 7470 CLS 7480 LET s2=s2+5 7490 GO TO 7355 7495 REM \''\''\''\''\''\''\''\''\'' Measured Output 7500 IF s1+w-1>=s2 THEN GO TO 7550 7505 OUT 127,15: OUT 127,27: OUT 127,87: OUT 127,1 7510 LPRINT t$(s1 TO s1+w-1) 7520 IF ds=1 THEN LPRINT 7530 LET s1=s1+w 7540 GO TO 7500 7550 LPRINT t$(s1 TO s2) 7560 IF ds=1 THEN LPRINT 7570 RETURN 7590 REM \''\''\''\''\''\''\''\''\''\'' Double Width 7600 LET f=0 7610 LET s1=1 7620 IF s1+w-1=LEN t$ THEN GO TO 7680 7630 LPRINT t$(s1 TO s1+w-1) 7640 IF ds=1 THEN LPRINT 7650 LET s1=s1+(w*2) 7660 IF s1>LEN t$ THEN GO TO 7700 7670 GO TO 7620 7680 LPRINT t$(s1 TO LEN t$) 7690 IF ds=1 THEN LPRINT 7700 IF f=1 THEN GO TO 7310 7710 LET f=1 7720 LPRINT 7730 LPRINT 7740 LET s1=w+1 7750 GO TO 7620 7990 REM \''\''\''\''\''\''\''\''\''\''\''\'' CLEAR TEXT 8000 PRINT #1;AT 0,0;"--------------------------------" 8010 PRINT #1;AT 1,6;"ARE YOU SURE (Y/N)"; "?" 8020 PAUSE 0 8030 LET a$=INKEY$ 8040 IF a$<>"Y" AND a$<>"y" THEN GO TO 800 8050 DIM t$(1) 8060 PRINT AT 9,10;"TEXT CLEARED" 8070 GO TO 800 8490 REM \''\''\''\''\''\''\''\''\'' CHANGE COLORS 8500 GO SUB 9100 8560 PRINT #1;AT 1,5;"PAPER COLOR (0-7)";"?" 8570 PAUSE 0 8580 LET b$=INKEY$ 8590 IF b$CHR$ 56 THEN GO TO 8550 8600 BORDER VAL a$: PAPER VAL b$: INK 9: CLS 8610 BEEP .1,7 8620 GO TO 800 8990 REM \''\''\''\''\''\''\''\''\''\''\''\'' QUICK NOTE 9000 INPUT AT 21,0;"-------------------------------- QUICK NOTE";AT 0,0; LINE a$ 9010 IF a$="" THEN GO TO 800 9020 PRINT #3;a$ 9030 BEEP .1,7 9040 GO TO 9000 9090 REM \''\''\''\''\''\''\''\''\''\''\''\''\''\'' CLS BOTTOM 9100 PRINT #1;AT 0,0;"--------------------------------" 9110 PRINT #1;AT 1,0;" " 9120 RETURN 9190 REM \''\''\''\''\''\''\''\''\''\''\''\''\''\'' CLEAR t$ 9200 LET d=INT (LEN a$/32-.01)+1 9210 DIM u$(LEN t$) 9220 FOR i=1 TO LEN u$ STEP 704 9230 IF i+703>LEN u$ THEN GO TO 9260 9240 LET u$(i TO i+703)=t$(i TO i+703) 9250 GO TO 9270 9260 LET u$(i TO )=t$(i TO ) 9270 NEXT i 9280 DIM t$(LEN u$+d*32) 9290 RETURN 9295 REM \''\''\''\''\''\''\''\''\''\''\'' ADD TEXT #1 9300 FOR i=1 TO d1-1 STEP 704 9310 IF i+703>d1-1 THEN GO TO 9340 9320 LET t$(i TO i+703)=u$(i TO i+703) 9330 GO TO 9350 9340 LET t$(i TO d1-1)=u$(i TO d1-1) 9350 NEXT i 9360 RETURN 9390 REM \''\''\''\''\''\''\''\'' ADD TEXT #2 9400 FOR i=i TO LEN v$ STEP 704 9410 IF i+703>LEN v$ THEN GO TO 9440 9420 LET t$(i+d1-1 TO i+d1+702)=v$(i TO i+703) 9430 GO TO 9450 9440 LET t$(i+d1-1 TO d1-1+LEN v$)=v$(i TO ) 9450 NEXT i 9460 RETURN 9490 REM \''\''\''\''\''\''\''\''\''\'' ADD TEXT #3 9500 LET n=d1-1+LEN a$ 9510 FOR i=1 TO LEN u$-d1 STEP 704 9520 IF i+703>LEN u$-d1 THEN GO TO 9550 9530 LET t$(i+n TO i+n+703)=u$(i+d1-1 TO i+d1-1+703) 9540 GO TO 9560 9550 LET t$(i+n TO )=u$(i+d1-1 TO ) 9560 NEXT i 9570 DIM u$(1) 9580 RETURN 9590 REM \''\''\''\''\''\''\''\''\''PRINT SCREEN 9600 CLS 9605 GO SUB 9100 9610 PRINT #1;AT 1,16-(LEN b$/2) ;b$ 9620 LET b=a+703 9630 IF b>LEN t$ THEN LET b=LEN t$ 9640 PRINT t$(a TO b) 9650 RETURN 9820 REM \''\''\''\''\''\''\''\''\''\''\''\'' START HERE 9830 BEEP .5,10 9840 BORDER 0: PAPER 0: INK 9: CLS 9850 PRINT AT 3,12;"Textype" 9875 DIM t$(1) 9880 LET w=32 9890 POKE 23609,5 9920 GO TO 735 9930 REM \''\''\''\''\''\''\''\''\'' SAVE PROGRAM 9940 CLEAR 9950 SAVE "Textype" LINE 9830 9960 BEEP .1,7 9970 VERIFY "Textype" 9980 BEEP .1,7 9990 STOP ```