--- title: "TASORT (Tasword Sort)" id: 77527 type: "computer_media" slug: "tasort-tasword-sort" url: "http://localhost/computer_media/tasort-tasword-sort/" markdown_url: "http://localhost/computer_media/tasort-tasword-sort.md" published_at: "2026-11-15T18:38:07+00:00" modified_at: "2026-11-15T18:38:07+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Sorts Tasword II lists of up to 240 lines on any column; compiled with Timachine, loaded from a Larken disk." post_tag: - name: "LKDOS" slug: "lkdos" taxonomy: "post_tag" url: "http://localhost/tag/lkdos/" - 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: "Bob Mitchell" slug: "bob-mitchell" taxonomy: "indiv" url: "http://localhost/indiv/bob-mitchell/" genre: - name: "Word Processor" slug: "word-processor" taxonomy: "genre" url: "http://localhost/type/word-processor/" media_type: "Program" programmers: - name: "Bob Mitchell" slug: "bob-mitchell" taxonomy: "indiv" url: "http://localhost/indiv/bob-mitchell/" mediadate: "1989" article_media: - id: 23260 title: "Bob’s Notebook: Renumber to 10000+, TASWORD utils" type: "article" url: "http://localhost/article/bobs-notebook-6/" related_content: - id: 77528 title: "Tasort" type: "computer_media" url: "http://localhost/computer_media/tasort/" media_type_tags: "Word Processor" license: false --- # TASORT (Tasword Sort) Sorts a Tasword II list of up to 240 one-line records (15360 bytes) on any column, using a Shell sort, and puts the sorted text back so it can be saved and loaded into Tasword. You need the text length, the first and last lines of the list and the column to sort on. Listing 1 is meant to be compiled with Timachine (REM ! directives) and displays the list in 64 columns with Taswide; the one-line alternative for line 230 is for users without Taswide. Listing 2 is the loader, which loads Taswide, the compiled code and the Tasword file from a Larken disk and saves the result back with ON ERR. It needs Tasword II (and Taswide), the Timachine compiler and the Larken disk system, so there is no download. Published in Sinc-Link January-February 1989 ([Bob’s Notebook: Renumber to 10000+, TASWORD utils](https://timexsinclair.com/article/bobs-notebook-6/)). ## Source Code ``` Listing 1. Tasort 40 REM !USR 28000 50 REM ! LPRINT 60 REM ! LIST 70 REM !LEN h$<=64 80 REM !INT +oa,ob,sf,a,b,c,e,s,n,i,j,t 90 REM ! OPEN # 100 CLS 110 LET oa=SGN PI: LET ob=2: LET sf=64: LET a=47615: DIM d$(240 ,64) 120 INPUT "length of text? <=15360"'b: IF b>15360 THEN GO TO 120 130 LET c=INT (b/sf) 150 INPUT "start line? ";s 152 INPUT "end line? (0=last)";e 153 IF e=NOT PI THEN LET e=c 154 LET e1=a+((e-1)*sf) 157 CLS : PRINT "loading text from"'"line ";s;" to line ";e;".. ." 160 LET n=s 170 FOR i=a+((s-1)*sf) TO e1 STEP sf 180 FOR j=NOT PI TO 63 190 LET d$(s,j+oa)=CHR$ PEEK (i+j) 200 NEXT j 210 LET s=s+oa: IF s>e THEN GO TO 230 220 NEXT i: STOP 230 CLS : RANDOMIZE USR 64300:FOR i=n TO e: PRINT CHR$3;d$(i): NEXT i 240 BEEP oa,10: INPUT "1=sort 0=save? ";ss: IF NOT ss THEN GO TO 440 255 INPUT "sort on which col.? (1-63) ";t 260 CLS : PRINT "sorting on col. ";t: GO SUB 300: GO TO 230 290 REM shell-faulk sort 300 LET sn=e 310 LET sn=INT (sn/ob) 320 IF sn0 THEN GO TO 360 420 NEXT i 430 GO TO 310 440 CLS : PRINT "storing sorted file for SAVE...": LET s=n: FOR i=a+((s-oa)*sf) TO e1 STEP sf 450 FOR j=NOT PI TO 63 460 POKE (i+j),CODE d$(s,j+oa) 470 NEXT j 480 LET s=s+oa: IF s>e THEN GO TO 492 490 NEXT i 492 STOP 495 REM ! CLOSE # 550 CLEAR : RANDOMIZE USR 100: SAVE "tasort.Bp" LINE 100 Line 230 without Taswide CLS: FOR i=n TO e: PRINT d$(i): NEXT i Listing 2. The loader 5 CLS : PRINT INVERSE 1;"TASWORD SORT"; INVERSE 0;" by Bob Mitchell."''"This utility will sort Tasword lists of up to 240 lines (15360 bytes)." 6 PRINT '"Have the following parameters ready from SAVED list:"''"1. text length"'"2. start line number"'"3. end line number if not last"'"4. column # to sort on (1-63)." 7 PRINT '"Install disk containing list to be sorted; then, press a key.": PAUSE 0 8 RANDOMIZE USR 100: LOAD "taswi.Cx"CODE : RANDOMIZE USR 100: LOAD "tasort.Cc"CODE 28000 10 INPUT " TASWORD SORT "'"list name? max 6 "; LINE n$: RANDOMIZE USR 100: LOAD n$+".CT"CODE 47615 20 ON ERR GO TO 25: RANDOMIZE USR 28000: GO TO 30 25 ON ERR RESET: POKE 23607,60: GO TO 55 30 LET b=PEEK 30078+256*PEEK 30079: REM see note 1. 40 INPUT "list name? max 6 "; LINE n$: RANDOMIZE USR 100: SAVE n$+".CT"CODE 47615,b 50 CLS : PRINT "Sorted file has been saved and is ready for loading into Tasword" 55 INPUT "1=more 0=quit ";m 56 IF m THEN GO TO 5 57 IF NOT m THEN STOP 60 CLEAR : RANDOMIZE USR 100: SAVE "tasort.Bb" LINE 5 ```