--- title: "Word Sinc II.3" id: 51819 type: "computer_media" slug: "word-sinc-ii-3" url: "http://localhost/computer_media/word-sinc-ii-3/" markdown_url: "http://localhost/computer_media/word-sinc-ii-3.md" published_at: "2023-08-13T23:14:33+00:00" modified_at: "2026-04-04T20:17:57+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2019/02/20230809-041332.jpg" excerpt: "A nine-function word processor with search, replace, move, delete, and paginated printing, all driven by a BASIC menu shell over a machine code engine." 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: "Powell Hargrave" slug: "p-hargrave" taxonomy: "post_tag" url: "http://localhost/tag/p-hargrave/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Word Processor" slug: "word-processor" taxonomy: "genre" url: "http://localhost/type/word-processor/" media_type: "Cassette" download_url: "https://archive.org/download/timex-sinclair-software-archive/Word Sinc II.3 (1983)(P. Hargrave)(US)(TS1000)(Cassette).zip" mediadate: "1983" producer_company: - id: 11158 title: "Powell Hargrave" type: "company" url: "http://localhost/company/p-hargrave/" related_products: - id: 14615 title: "Word Sinc II.3" type: "product" url: "http://localhost/product/word-sinc-ii/" media_type_tags: "Word Processor" --- # Word Sinc II.3 Word Sinc II.3 is a full-featured word processor for the ZX81/TS1000, storing its text and editor engine in machine code routines called via RAND USR at addresses such as 18160, 18432, 18451, 19506, 19833, and 19965. The BASIC shell (lines 0–9110) provides a nine-option menu covering starting a new document, continuing editing, listing, deleting, moving, searching, replacing, printing with optional pagination, and saving. Search and replace support two simultaneous string pairs, with matched strings of up to 90 characters stored by POKEing character codes directly into fixed RAM locations (around addresses 17149–17379) and their lengths into system variables near 16575–16579. The printer routine at line 8000 handles paginated output by computing BCD-style digit POKEs for page numbers and line counts, then jumping to USR 16691 for the actual print pass. The program runs mostly in SLOW mode for display but switches to FAST for machine-code-intensive operations. *** ## Program Analysis ### Program Structure The program is organized as a BASIC menu shell around a machine code engine. Line 0 is a REM statement that encodes the machine code (and possibly data tables) as tokenized BASIC content — a standard technique for embedding binary data in ZX81/TS1000 programs. The main flow is: 1. Line 2: `GOTO M` — jumps forward; `M` is initialized later at line 125 to `VAL "100"`, so this is effectively `GOTO 100` after setup. 2. Lines 10–70: Initialization — sets RAMTOP via POKEs to 16568/16569, launches machine code at USR 18160 (likely installs the editor), sets sentinel variables, and calls USR 18432. 3. Lines 100–160: Main menu display and dispatch loop. 4. Lines 1000–9110: Nine option handlers, one per menu item (at line offsets 1000–9000). ### Initialization and Machine Code Loading Lines 20–50 set the BASIC variable `N=8000` (decimal), then POKE the low and high bytes of this value into addresses 16568 and 16569, which are the ZX81 system variables `RAMTOP`. This reserves the top of RAM for the machine code. `RAND USR 18160` then executes the first machine code routine, presumably initializing the word processor engine. A second call, `RAND USR 18432` at line 70, is made after the string variables `B$` and `C$` are set to `"?"`, likely initializing internal state that depends on those variables. ### Menu Dispatch The menu at line 120 lists nine options (1–9). After a keypress is collected via `GOSUB K` (where `K=2520`, the `INKEY$` polling routine), line 170 dispatches with: ``` GOTO VAL I$*1000 ``` This maps key “1” → line 1000, “2” → 2000, and so on. Line 160 guards against invalid input or an empty text buffer by checking `PEEK 16405` against 95, which probes a system variable related to text length or display state. ### Subroutine Address Variables Rather than hardcoded line numbers in `GOSUB` calls, the program uses variables for the three internal subroutine targets: | Variable | Value | Target | | --- | --- | --- | | `I` | 2500 | Prints “PRESS C TO CONT” prompt | | `J` | 2510 | Prints “ANY OTHER KEY FOR MENU” prompt | | `K` | 2520 | `INKEY$` polling loop | This saves a few bytes versus literal line numbers in each `GOSUB` statement, since the variable reference is shorter than a multi-digit literal. ### INKEY$ Polling Loop Lines 2520–2540 implement the standard ZX81 keypress idiom: - Line 2520: `LET I$=INKEY$` - Line 2530: `IF I$="" THEN GOTO K` — loops until a key is pressed - Line 2540: `RETURN` The use of `GOTO K` (a variable) rather than `GOTO 2520` is consistent with the memory-saving variable strategy throughout. ### Search and Replace The search/replace subsystem (lines 6000–7960) is the most complex BASIC section. Key design points: - Search strings are stored by POKEing individual character codes into RAM starting at address 17149 (variable `B` set to that value before calling the string-entry subroutine at 7810). - String lengths are stored at fixed system-adjacent addresses: 16576 (`L` for search string 1), 16577 (replacement string 1), 16578 (search string 2), 16579 (replacement string 2). - The subroutine at line 7850 (for the second string pair) uses address 17341 or 17373 depending on context. - The actual search is performed by `Y=USR 19833`; the return value (non-zero = found) controls whether the “CONT SEARCH” prompt is shown. - Two-string replace is controlled by `POKE 16575,O` or `POKE 16575,W`, where `O=0` and `W=1` (NOT 0), acting as a flag byte. ### String Entry Subroutine Lines 7800–7960 handle user string input. The maximum length `E` defaults to 90 characters (set at line 7810) but can be overridden to 30 by the caller (line 7435). The routine: 1. Switches to `FAST` mode for `INPUT` 2. Truncates `K$` to `E` characters if necessary 3. POKEs each character code into memory starting at address `B+S` for `S` from 1 to `L=LEN K$` 4. Switches back to `SLOW` before returning Note that the FOR loop runs `FOR S=W TO L`, i.e., from 1 (since `W=NOT 0=1` on ZX81), correctly handling 1-based string indexing. ### Pagination in the Print Option Lines 8100–8140 compute BCD-style digit decomposition for the starting page number `S`: - Ones digit: `VAL "28" + S - VAL "10" * INT (S/VAL "10")` (i.e., 28 + S mod 10), POKEd to 17139 - Tens digit: `VAL "28" + INT (S/VAL "10")`, POKEd to 17140 - Lines per page: POKEd to both 17137 and 17138 The addition of 28 converts a digit (0–9) to its ZX81 character code (characters “0”–”9″ are codes 28–37). The use of `VAL "28"` and `VAL "10"` instead of bare literals is a minor memory optimization. After POKEing, `RAND USR 16691` invokes the machine code print routine. ### FAST/SLOW Mode Management The program operates in `SLOW` mode by default for display quality, switching to `FAST` before machine code calls and `INPUT` statements, then returning to `SLOW` afterward. Line 155 shows a nuance: options 1–3 and 6 (via `I$<"4" OR I$="6"`) switch to `SLOW` at dispatch time, while others remain in whatever mode they entered. ### Save Routine Line 9100 uses the unusual construction `PRINT USR 8192;"SAVE:P:WSI:"`. The `USR 8192` call returns a value (likely 0) that is printed as part of a `PRINT` statement, with the save filename string appended — an unconventional but functional approach to triggering a machine code save routine while also printing a label. ### VAL String Constants Throughout the program, numeric literals appear as `VAL "number"` (e.g., `VAL "100"`, `VAL "17137"`). On the ZX81/TS1000, this saves memory because BASIC stores floating-point numbers inline in the program line; using `VAL` with a string avoids storing the 5-byte float, at the cost of runtime evaluation. This is a well-known size optimization used systematically here. ### Notable Anomalies - Line 3040 is referenced by `GOTO 3040` at lines 3090 and 3130, but it does not appear as an explicit line in the listing — this is consistent with the technique of jumping into the middle of a routine or relying on fall-through; the machine code call at 3030 likely handles the display loop, making 3040 effectively an entry point after return. - Line 125 sets `M=VAL "100"` after the menu has already been displayed at line 120, which is fine since `M` is used as the menu return target for subsequent `GOTO M` calls, not for the initial entry. - The variable `O=VAL "0"` (i.e., 0) and `W=NOT O` (i.e., 1) are used pervasively as named constants, reducing the number of floating-point literals embedded in program lines. ## Source Code ``` 0 REM ###ULES #[U]NTIL NEXT, ALL THE BEST#OARD LIKE#▄ASN #ASN #ASN #ASN #""#[O]#[G]#▝ ▌▌▀▀5▜RNDLN SCROLL▝ FAST[J]#-▘PEEK CLS LPRINT LN #?S▌3PEEK CLSINT £<= CLS▗ IF FINKEY$ K INPUT FASTSTR$ # RETURN▝[3][7]▛[7]###7 RETURN#C7 FASTACS BA)ACS =▗▗ACS =▄###▞▞#ACS ▘3#<= CLS3K CLS#PEEK CLS( LET LPRINT /CHR$ <= CLS3K CLS#?PEEK CLSSGN +4[E]0ACS #C[7]AT Y▖PEEK CLSLN ▛▝TAN LN CODE #Y[0] GOSUB [L]LN LOAD INKEY$ GOSUB # SAVE PIY[0][Y]COS LN ▗PI GOSUB # IF PI GOSUB # UNPLOT PIY[0][Y]C/Y[£][Y]C>Y[+][Y]C/Y[>][Y]ASN ;PI GOSUB [4]( SCROLLLN HPI7Y#> FASTLN CODE RND LPRINT /ASN #CHR$ FC$7[J][Y]4▛7LN LOAD INKEY$ ##INKEY$ F▞▀7# RETURN C£ RETURN0S▞ RETURNAK▝( LIST INT 0Y▝[S]C#S#FF[J]LN ▞PILEN ~~( UNPLOT 7LN ▞PI█C NEWCHR$ BK LLIST LEN B77 FAST▘ F5▜RNDQ 7▌XTAB CODE INKEY$ ## GOSUB # IF PI GOSUB # UNPLOT PI GOSUB # SAVE PI▌▌▌▌ GOSUB # PLOT PI GOSUB # SAVE PI LPRINT ##INKEY$ [J]F#[J]INKEY$ ▘ B GOSUB # PLOT PI▖▖▖▖ GOSUB # UNPLOT PI)▜RND GOSUB # IF PITAN PRINT Y SLOW▚# LET TAN 7 FASTU RAND PI#YF[(]#[Y]INKEY$ 7UEXP RND RETURN▘4▖Y▝/▝Y▘MEXP RND##INKEY$ [J][Y]COS #U RUN PI#▖[J]F£[Y]ASN #PI( SAVE GOSUB # RUN PI,,TAN #M PRINT PI FASTSTR$ LPRINT FAST▞ [B] GOSUB PIINKEY$ [J]F▖[Y]C,,U RUN PI[S]S,##PISGN STR$ VAL FAST##F:# GOSUB [C]( UNPLOT LPRINT AT ▖F$4 STOPSGN LPRINT TAN U PRINT PI[T]4ATN LPRINT SGN ▞ GOSUB PI FOR TAN U LET PI RETURN COS PRINT U PAUSE PI# LET [T]C▞£#M PAUSE PITAN FASTLN STEP PILN STEP PILN STEP PI)▜RND▞AY▘M PAUSE PIX><( UNPLOT 5 NEXT PIOYA[Y]ATN CONT PI7Y0[Y]4▖[J]>/▝#>F<#>LN CODE RNDY#M[E]RNDLN CODE RND LPRINT TAN Y#M▜RND#CODE RNDQ07OFTAN 00▘ B F▜RND FXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX222222XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX222222456FFFFFFFFFFFFFFFFFFFFFFFFFFF**456FFFFFFFFFFFFFFFFFFFFFFFFFFF**** ((( 4#▒4#▒ (S#((( ((( ( (4#4( ##(G# S4444S S####RNDS UNPLOT UNPLOT ## /84#4# (###=#( 4 4 S#▒( ( ▒((((▒ 4((((4 4(▒(4 ▒(4(▒ # # ((#(( # C(#(C ▖▒(4RND 4 44RND ((4 KK S####S K#(((# S#▖SRND# S#/▖#S ▒/C##▒ #RND#▖#S SRND###S #▖▒(44 S#S##S S##W▖S K▒S## RNDRND#### SRNDRND#S ▖▖W##O S##RNDW /84#44 O##W▖S RNDRND#### ( (((S ▒ ▒▒▒#K RND##### K((((S ##### #8888 S##[6]S ####RNDRND O##W▖▖ ##RNDRNDRND SRNDK▒# 4#448/ ####O ##CC( ####C #C(C# ###W▖S #▒(4# ▖▖▖▖▖▖▖ ███████ (((#S( S▒▒▒▒S (▒#▒( RND4(▒▖ ( # ( C#C#C 4#4##O RND#CCC GOSUB #[S]RND▀▀▀LN VAL :E(RNDQLEN 7#7#7Q▘"""7#7# GOSUB [5]Q REM $#7LN [1]=TAN S##### ###### S#RNDRND#S ###### #RND#RNDRND# #RND#RNDRNDRND S#RND##S ###### #((((# ▖▖▖##S ###### RNDRNDRNDRNDRND# ###### ###### S####S ####RNDRND S####S ###### SRNDS▖#S #((((( #####S ####C( #####C #C((C# ##C((( #▒(4RND# E(RND▘▞ ,,6[K]RND6[M]RND6[O]RND6[Q]RND[J]M[Y]RNDM6RNDLN GOSUB #LN ▀#LN [6]#LN [V]▝#LEN ▝SUU[Y]RNDACS #4RNDACS INT M[Y]RND##LN [X]▛U[Y]RNDACS #4-Y#[Y]C▖##SGN #U[Y]RNDACS SIN M[Y]RNDLN GOSUB #/ASN ACS ▗M[Y]RND#LN GOSUB ## FAST#U[Y]RNDACS [?]M[Y]RNDLN ;#/[L]▞#VAL LN ;#LN [V]▝#LEN ▝AT S SLOW( LET / STEP [B]E[S]RND▘▘ GOSUB PIASN PEEK :6[S]RND GOSUB #[O]RNDSTR$ E[Q]RND GOSUB #48 LPRINT #76[O]RND FASTE[M]RND▘[Z]▝,,AT GOSUB PI>=[0]#LN [6]#LN ▀#E[Q]RND76[Q]RND#7#7##SGN ;##F GOSUB [S]7/SQR RETURN ASN ▐# RETURN.S▖ RETURNRNDS[B] RETURN#ASN ## RETURN#ASN [X]# RETURN#ASN LPRINT # RETURN#ASN $# RETURN#ASN <# RETURN#COS LN COPY#/▚ RETURN,COS RETURN STOPC# RETURN*C# RETURN?C# RETURN SLOWC# RETURN STEP C# RETURN FASTC# RETURN LLIST C# RETURN**C# RETURN(C# RETURN-C# RETURN+C# RETURN=C# RETURN>C# RETURNC# RETURN$C# RETURN/C# RETURN OR C# RETURN;C# RETURN>=C# RETURN:C# RETURN#C# RETURN£C# RETURN THENC# RETURN TO C# RETURN#C# RETURN AND C####Y[A]TAN Y[B]TAN Y[C]TAN Y[D]TAN Y[E]TAN Y[F]TAN Y[G]TAN Y[H]TAN Y[I]TAN Y[J]TAN Y[K]TAN Y[L]TAN Y[M]TAN Y[N]TAN Y[O]TAN Y[P]TAN Y[Q]TAN Y[R]TAN Y[S]TAN Y[T]TAN Y[U]TAN Y[V]TAN Y[W]TAN Y[X]TAN Y[Y]TAN Y[Z]TAN Y[£]TAN Y[$]TAN Y[+]TAN Y[*]TAN Y[0]TAN Y TAN RETURN ASN [A]▀ RETURNZASN [<]# RETURN" AND 7# RETURN. AND ▐#LN COPY##▐# RETURN#C# RETURN#C# RETURN#C# RETURN#C# RETURN#C# RETURN""C# RETURN**C# RETURN OR C# RETURN AND C# RETURN<=C# RETURN>=C# RETURN<>C# RETURN THENC# RETURN TO C# RETURN STEP C# RETURN LPRINT C# RETURN LLIST C# RETURN STOPC# RETURN SLOWCPI RETURN FASTCINKEY$ RETURN#C# LPRINT #7#Y▀TAN Y▄TAN Y▌TAN Y▐TAN Y▘TAN Y▟TAN Y[▒]TAN Y▙TAN Y▝TAN Y▜TAN Y▚TAN Y▞TAN Y▗TAN Y▖TAN Y▛TAN Y~~TAN Y[,,]TAN Y▒TAN Y,,TAN Y[~~]TAN LN SCROLL▝LN #▒LN ▛▝#7#Y[>]TAN U[Y]RNDACS [3]M[Y]RNDE[M]RND GOSUB #£RND<▞-VAL ▘4 U[O]RND[X]C7# RETURN#U[Y]RNDC:ACS #4? GOSUB [4] REM [S]#< GOSUB [5]#ATN #U[P]RND[W]4NOT GOSUB #[W]RND/SGN PRINT E£RND▘-▀,,YL[Y]4▌Q[F]#▘#QL LET TAN E£RND▘▖▀,,6[U]RNDE[S]RND2 ▘ LIST **LN I#▘/ UNPLOT LN I#▘[0] COPYLN I#: PLOT LN I##LN S#TAN [J],,WS UNPLOT GOSUB PIXC:20▄ FASTE[U]RND#76[U]RND LPRINT TAN #/ PAUSE E[O]RNDF GOSUB #[K]RND[B] GOSUB # AND 7#; GOSUB #[M]RND GOSUB #>=[B]#E[S]RND76[S]RNDE[Q]RND GOSUB #[O]RND[B] GOSUB #4< FOR F6[Q]RND6[O]RNDQ LN [6]#LN ▀##7###▀##. GOSUB #[O]RND GOSUB [K]E[Q]RNDF6[Q]RND/ LLIST E[M]RND▘4 ,,6[M]RNDTAN E[M]RND▘4 [B] GOSUB PI FAST GOSUB #[K]RND GOSUB PI LPRINT **6[M]RNDTAN E[O]RND)4 [B] GOSUB # FAST GOSUB #[M]RND GOSUB #K▒LN [B]# LPRINT AND 7# FAST LPRINT 6[O]RNDLN [6]##7#E[O]RND)4 ; FAST GOSUB #[Q]RND FOR [B] GOSUB #AT AND 7#VAL GOSUB #[M]RND5[Z]▝; GOSUB PI>=[0]# LPRINT 6[O]RNDLN [6]##7#E[O]RNDF/[N]E[O]RND7/INT E[W]RND#LEN █#TAN [N]E[O]RND7/INT E[W]RND#LEN █#TAN TAN TAN E[M]RND6[U]RNDE[K]RND6[M]RNDLN [6]#TAN E[M]RND▘""▝,, FAST GOSUB #[Q]RND FOR GOSUB # LPRINT **6[M]RNDLN [6]#TAN E[U]RND6[M]RNDLN ##TAN E[M]RND6[O]RNDLN ###<#E£RND7[J]:/▞4#7( UNPLOT 7$COS / PRINT LN CODE #- Y[*] GOSUB [5]C▖ REM [,,]#TAN PRINT ACS PI4▌ACS TAB LET / PAUSE LET ▀##.[J]/▀.F,VAL STR$ FAST GOSUB [K]E[Q]RNDF6[Q]RNDE[S]RND76[S]RND LPRINT SGN AT RETURN[*]ATN STEP #COS / TO GOSUB #[K]RNDE[Q]RND[B] GOSUB ### FOR TAN LN CODE #Y[$] GOSUB [L]C▘TAN F6[U]RNDLN CODE #Y[*] GOSUB [L]C▘TAN FAST GOSUB #[U]RND[B] GOSUB #S###STR$ <> LPRINT LPRINT ##FY[*]<># /▖7<<>7 FASTSTR$ VAL , GOSUB [S]AT SGN LPRINT RETURN[*]C▌<># / REM LN CODE #Y[*] GOSUB [5]ATN F# REM 3#LN STEP #TAN PRINT VAL FAST GOSUB #[Q]RND< FOR [B] GOSUB ### LPRINT FAST##. GOSUB [K]. GOSUB #[Q]RNDE[S]RND76[S]RND LPRINT FAT LET TAN LPRINT GOSUB #[U]RNDSTR$ <> LPRINT FOR [B] GOSUB #####7Y[*]<># , FASTSTR$ VAL GOSUB [K]AT SGN LPRINT RETURN[*]<># C[7]/ INPUT [J]M[Z]RNDLN CODE #U RETURNPI GOSUB [5] PRINT ATN [(]#CD LET REM ▄#TAN VAL FASTU[Z]RND RETURN▝C▒U""RND) RETURNPI/▞UTAB RND)[Y]#F#,[Y]4▖7<( SAVE LPRINT AT TAN VAL F GOSUB #[M]RND GOSUB #[U]RND6[M]RNDLN [6]#5[▒]<▘▘ GOSUB PIK UNPLOT LN [V]▝#LEN ▝S SAVE # RETURN CLSC< RETURN RETURN4 LOAD E[M]RND GOSUB #[U]RND GOSUB #[M]RND7AT /[1]E[M]RND6[O]RNDAT AT AT LN ###<#U""RND#UAT RND[)]M[W]RNDU RETURNPI PRINT LET LN CODE # GOSUB [5] PRINT ATN [(]#C# LET REM (#U[Z]RND RETURN▘4+Y▝M[Z]RNDUTAB RND#U#RND[)]M[X]RNDU[Y]#/PEEK 5##) RETURNPI▘# GOSUB [K]UAT RNDM""RNDU[Z]RND RETURN▝4)5 THEN#)[Y]#▘4 GOSUB [K]U#RNDMTAB RNDLN STEP #TAN U[Z]RND RETURN▝C▒U[W]RNDLN [-]#/,U[X]RNDLN [-]#) THEN#U#RND FASTVAL F FOR ▞ # GOSUB [K]AT LPRINT #£#)##UAT RND/ REM FASTVAL RETURN#K2E[S]RND- #[B] GOSUB #SM6[S]RNDE[Q]RND FAST;6[Q]RNDSGN ▀ FOR GOSUB [S]AT LPRINT TAN #[J]#[<]#STR$ F▀ FOR ; GOSUB [K]SGN E[S]RND;6[S]RNDE[Q]RND GOSUB #6[Q]RNDAT LPRINT TAN AT AT AT AT #PEEK :E[K]RND6[M]RND6[O]RNDTAN P.HARGRAVE 2 GOTO M 10 CLEAR 20 LET N=8000 30 POKE 16568,N-256*INT (N/256) 40 POKE 16569,INT (N/256) 50 RAND USR 18160 55 LET O=VAL "0" 57 LET W=NOT O 60 LET B$="?" 65 LET C$=B$ 70 RAND USR 18432 100 CLS 110 SLOW 120 PRINT "[W][S][I][I][.][3]█[M][E][N][U]",,,,,,"1 START NEW",,"2 CONTINUE",,"3 LIST ",,"4 DELETE",,"5 MOVE",,"6 SEARCH",,"7 REPLACE",,"8 PRINT ",,"9 SAVE ",,,," PRESS A KEY" 125 LET M=VAL "100" 126 LET I=VAL "2500" 127 LET J=VAL "2510" 128 LET K=VAL "2520" 140 GOSUB K 150 CLS 155 IF I$<"4" OR I$="6" THEN SLOW 160 IF (I$<>"1" AND I$<>"9") AND (PEEK 16405<95 OR I$<"1" OR I$>"9") THEN GOTO M 170 GOTO VAL I$*1000 1000 PRINT " TO CLEARTEXT AND START NEW" 1010 GOSUB I 1020 IF I$<>"C" THEN GOTO M 1030 GOTO 10 2000 RAND USR 18451 2010 GOTO M 2500 PRINT ,,"PRESS C TO CONT " 2510 PRINT ,,"ANY OTHER KEY FOR MENU" 2520 LET I$=INKEY$ 2530 IF I$="" THEN GOTO K 2540 RETURN 3000 POKE 16418,O 3010 PRINT AT 23,O;"M MENU C CONT LIST W WORK ON" 3030 RAND USR 19506 3050 GOSUB K 3060 IF I$="M" THEN GOTO 3100 3070 IF I$="C" THEN GOTO 3120 3080 IF I$="W" THEN GOTO 3140 3090 GOTO 3040 3100 RAND USR 19546 3110 GOTO M 3120 RAND USR 19522 3130 GOTO 3040 3140 RAND USR 19556 3150 GOTO M 4000 PRINT "BE SURE TO HAVE ENTERED 2 REMOVEMARKERS ""[*]"" SHIFT-9" 4010 GOSUB I 4020 IF I$<>"C" THEN GOTO M 4025 FAST 4030 RAND USR 19586 4040 GOTO M 5000 PRINT "BE SURE TO HAVE ENTERED 2 REMOVEMARKERS ""[*]"" SHIFT-9 AND 1 MOVE TO MARKER ""[$]"" SHIFT-3" 5010 GOSUB I 5020 IF I$<>"C" THEN GOTO M 5025 FAST 5030 RAND USR 19666 5040 GOTO M 6000 CLS 6010 PRINT "SEARCH FOR :" 6040 GOSUB 7800 6050 LET B$=K$ 6060 PRINT ,,"SEARCHING FOR - ";B$ 6070 LET X=6110 6080 LET Y=6000 6090 GOTO 7700 6110 POKE 16575,O 6120 POKE 16418,O 6125 POKE 16576,L 6130 PRINT AT 23,O;" C CONT SEARCH W WORK ON" 6140 LET Y=USR 19833 6150 CLS 6154 IF Y THEN GOSUB I 6156 IF Y AND I$="C" THEN GOTO X 6158 IF Y THEN GOTO M 6160 PRINT "END OF TEXT. SEARCHED FOR :",,,B$," CONT SEARCH?" 6180 GOSUB I 6190 IF I$<>"C" THEN GOTO M 6200 GOTO 6000 7000 CLS 7010 PRINT "STRING TO BE REPLACED:",B$ 7020 LET X=7200 7030 LET Y=7100 7040 GOTO 7700 7100 CLS 7110 GOSUB 7800 7120 LET B$=K$ 7125 POKE 16576,L 7130 GOTO 7000 7200 PRINT ,,,,"REPLACEMENT STRING:" 7210 LET B=17245 7220 GOSUB 7810 7225 POKE 16577,L 7230 PRINT K$ 7240 LET X=7300 7250 LET Y=7000 7260 GOTO 7700 7300 CLS 7305 LET B$=K$ 7310 PRINT "2 REPLACE STRINGS? -(Y OR N)" 7315 POKE 16575,O 7320 LET X=7400 7330 LET Y=7600 7340 GOTO 7710 7400 POKE 16575,W 7405 CLS 7410 PRINT "STRING TO BE REPLACED:",C$ 7420 LET X=7500 7430 LET Y=7444 7435 LET E=30 7440 GOTO 7700 7444 LET B=17341 7450 GOSUB 7850 7460 LET C$=K$ 7465 POKE 16578,L 7470 GOTO 7405 7500 PRINT ,,,,"REPLACEMENT STRING:" 7510 LET B=17373 7520 GOSUB 7850 7525 POKE 16579,L 7530 PRINT K$ 7540 LET X=7580 7550 LET Y=7405 7560 GOTO 7700 7580 LET C$=K$ 7600 FAST 7605 RAND USR 19965 7610 GOTO M 7700 PRINT ,,"OK? - (Y OR N)" 7710 GOSUB J 7720 IF I$="Y" THEN GOTO X 7730 IF I$<>"N" THEN GOTO M 7740 GOTO Y 7800 LET B=17149 7810 LET E=90 7850 PRINT ,,"ENTER STRING. - MAX. ";E 7860 POKE 16418,2 7900 FAST 7902 LET K$="" 7905 INPUT K$ 7910 IF LEN K$>E THEN LET K$=K$( TO E) 7920 LET L=LEN K$ 7930 FOR S=W TO L 7940 POKE B+S,CODE K$(S) 7950 NEXT S 7955 SLOW 7960 RETURN 8000 PRINT "PROCEED ONLY IF YOU HAVE ENTEREDSTART AND END MARKS [0] (SHIFT 2)",,,,,"DO YOU WANT PAGES - - (Y OR N)" 8010 LET S=O 8015 GOSUB J 8020 IF I$="N" THEN GOTO 8200 8030 IF I$<>"Y" THEN GOTO M 8040 POKE 16418,2 8060 PRINT ,,"ENTER STARTING PAGE NO. "; 8070 INPUT S 8080 IF S"C" THEN GOTO M 9030 CLS 9100 PRINT USR 8192;"SAVE:P:WSI:" 9110 GOTO VAL "110" ```