--- title: "CK Type 1000" id: 77952 type: "computer_media" slug: "ck-type-1000" url: "http://localhost/computer_media/ck-type-1000/" markdown_url: "http://localhost/computer_media/ck-type-1000.md" published_at: "2026-11-19T17:01:30+00:00" modified_at: "2026-11-19T17:01:30+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/ck-type-1000-1.png" excerpt: "A ZX81/TS1000 version of Stan Lemke's CK TYPE, in BASIC and machine code: prints the line number, byte count and a checksum for every line of the BASIC program in memory, to check typed-in listings." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "TS 1500" slug: "ts1500" taxonomy: "post_tag" url: "http://localhost/tag/ts1500/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" - name: "Timex/Sinclair 1500" slug: "ts-1500" taxonomy: "model" url: "http://localhost/model/ts-1500/" indiv: - name: "Earl Dunnington" slug: "earl-dunnington" taxonomy: "indiv" url: "http://localhost/indiv/earl-dunnington/" - name: "Stan Lemke" slug: "stan-lemke" taxonomy: "indiv" url: "http://localhost/indiv/stan-lemke/" genre: - name: "Utility" slug: "utility" taxonomy: "genre" url: "http://localhost/type/utility/" media_type: "Program" programmers: - name: "Earl Dunnington" slug: "earl-dunnington" taxonomy: "indiv" url: "http://localhost/indiv/earl-dunnington/" - name: "Stan Lemke" slug: "stan-lemke" taxonomy: "indiv" url: "http://localhost/indiv/stan-lemke/" download_url: "https://archive.org/download/timex-sinclair-software-archive/CK%20Type%201000%20%281988%29%28Dunnington%2C%20Earl%3B%20Lemke%2C%20Stan%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1988" images: - url: "http://localhost/wp-content/uploads/2026/11/ck-type-1000-1.png" - url: "http://localhost/wp-content/uploads/2026/11/ck-type-1000-2.png" article_media: - id: 15389 title: "CK Type 1000" type: "article" url: "http://localhost/article/ck-type-1000/" - id: 15482 title: "CKTYPE 1000 (Machine Code Version)" type: "article" url: "http://localhost/article/cktype-1000-machine-code-version/" - id: 6266 title: "CK Type" type: "article" url: "http://localhost/article/ck-type/" related_content: - id: 77807 title: "CK Type" type: "computer_media" url: "http://localhost/computer_media/ck-type/" media_type_tags: "Utility" license: false --- # CK Type 1000 A type-in checker for the TS1000, TS1500 and ZX81: Earl V. Dunnington’s adaptation, with Stan Lemke’s permission, of Lemke’s TS2068 program CK TYPE. It goes through the BASIC program in memory and prints, for each line, the line number, the number of bytes in the line and a checksum, on the screen and with LPRINT on the TS2040 printer. If a listing is published with its CK TYPE printout, you can run CK TYPE 1000 on your typed copy and see which lines differ. This version’s checksum adds each byte plus 2, 1, 2, 1 in turn (line 9992 is LET SM=(SM+OD+1)+PEEK BT), where the TS2068 original multiplies alternate bytes by 2. Its figures are therefore different from the TS2068 program’s, and it does not notice two characters swapped within a line. The article’s own printouts were made with it. The main file is the final CK TYPE 1000, at line numbers 10000 to 10018 so that it does not clash with the program you type in. LOAD it, type in the program, then enter GOTO 1000 as the article prints it. That works as long as your program has no line 1000 or above; GOTO 10000 always works. When the screen fills you get report 5; press CONT (the C key) and ENTER for the rest, and the line it stopped on is printed again. Do not use line 9999 in your program. On the ZX81, lines numbered above 9999 cannot be edited or deleted, so the article gives a way to remove them. Enter PRINT (PEEK 16396+256*PEEK 16397)-358, POKE the address it gives with 15 and delete line 9999. Do that 19 times, once for each line. The second file, marked Listing E, is the plain BASIC version at lines 9980 to 9999, as printed. Line 9999 RETURN is there for The ZX Compiler, and the article says to delete it if you do not have the compiler. As printed, RUN lists the 20 lines and then stops with report 7/9999. The article builds the final version from a second listing, Listing G: a shortened copy of the program (VAL “256”, NOT PI and SGN PI in place of numbers) plus a short routine at lines 10 to 100 that POKEs the new line numbers into place. The main file was made by following those steps exactly. Both BASIC versions run in 2K. The third file, marked Machine Code, is the machine code version from Time Designs July/August 1988 ([CKTYPE 1000 (Machine Code Version)](https://timexsinclair.com/article/cktype-1000-machine-code-version/)). It was compiled from the BASIC version with The ZX Compiler, keeping only the parts of the compiler’s run-time package that the program uses. It needs 16K. LOAD it and it runs itself. It sets RAMTOP to 32085 and shows its instructions. Press a letter key and it moves the 682 bytes of machine code above RAMTOP, then clears the BASIC area. Then type in a program, or load one from tape with RAND USR 32394. That loader stops the loaded program from running itself, so it cannot overwrite the code. RAND USR 32086 prints the CK TYPE listing on the printer only, not on the screen. Its figures are the same as the BASIC version’s. The machine code file was made by following that article’s steps. Listing L enters the 682 values of Listing K into A$ and prints them back for checking. The program is then edited into Listing N, GOTO 2 puts a short routine into the REM in line 1, lines 2 to 6 are deleted, and GOTO 20 saves it. Listing L has a slip: its check printout prints six values a row, and 682 is not a multiple of six. After the last row it stops with report 3/204, so the correction instructions in line 206 never appear. The data in A$ is not affected. Published in Time Designs Magazine January/February 1988 ([CK Type 1000](https://timexsinclair.com/article/ck-type-1000/)) and July/August 1988 ([CKTYPE 1000 (Machine Code Version)](https://timexsinclair.com/article/cktype-1000-machine-code-version/)). ## Source Code ``` Listing E (BASIC version, lines 9980-9999) 9980 LET ST=16509 9981 LET SP=256*PEEK 16397+PEEK 16396 9982 LET BT=ST 9983 LET LE=0 9984 LET LH=0 9985 LET SM=0 9986 LET LE=256*PEEK BT+PEEK (BT+1) 9987 LET BT=BT+2 9988 LET LH=256*PEEK (BT+1)+PEEK BT 9989 LET BT=BT+2 9990 LET OD=1 9991 FOR I=1 TO LH 9992 LET SM=(SM+OD+1)+PEEK BT 9993 LET OD=NOT OD 9994 LET BT=BT+1 9995 NEXT I 9996 PRINT LE;TAB 6;": ";LH;TAB 13;": ";SM 9997 LPRINT LE;TAB 6;": ";LH;TAB 13;": ";SM 9998 IF BT118 THEN GOTO 90 60 POKE N+1,HIGHBYTE 70 POKE N+2,LOWBYTE 80 LET LOWBYTE=LOWBYTE-1 90 NEXT N 100 STOP 9980 LET ST=VAL "16509" 9981 LET SP=VAL "256"*PEEK VAL "16397"+PEEK VAL "16396" 9982 LET BT=ST 9983 LET LE=NOT PI 9984 LET LH=NOT PI 9985 LET SM=NOT PI 9986 LET LE=VAL "256"*PEEK BT+PEEK (BT+SGN PI) 9987 LET BT=BT+VAL "2" 9988 LET LH=VAL "256"*PEEK (BT+SGN PI)+PEEK BT 9989 LET BT=BT+VAL "2" 9990 LET OD=SGN PI 9991 FOR I=SGN PI TO LH 9992 LET SM=(SM+OD+SGN PI)+PEEK BT 9993 LET OD=NOT OD 9994 LET BT=BT+SGN PI 9995 NEXT I 9996 PRINT LE;TAB VAL "6";": ";LH;TAB VAL "13";": ";SM 9997 LPRINT LE;TAB VAL "6";": ";LH;TAB VAL "13";": ";SM 9998 IF BT