--- title: "CHECK SUM (13 bytes)" type: "article" slug: "check-sum-13-bytes" url: "http://localhost/article/check-sum-13-bytes/" markdown_url: "http://localhost/article/check-sum-13-bytes.md" published_at: "2026-11-23T19:00:46+00:00" modified_at: "2026-11-23T19:00:46+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "This routine when use with LET Z=USR XXXX will return with a number in z that will be the one number if the program loaded correctly. The following statement could be used to check the program: IF Z<>xx THEN STOP where xx=the correct loading number. NN=hex length of MC to be checked PP=hex address where…" post_tag: - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "Machine language programming" slug: "machine-language" taxonomy: "post_tag" url: "http://localhost/tag/machine-language/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Brian Little" slug: "brian-little" taxonomy: "indiv" url: "http://localhost/indiv/brian-little/" publication_r: id: 35941 title: "CATS Newsletter" type: "periodical" url: "http://localhost/periodical/cats-newsletter/" authors: "Brian Little" volume: "3" issue: "8" issues_articles: - id: 39607 title: "CATS v3 n8" type: "issue" url: "http://localhost/issue/cats-v3-n8/" pages: "12" pubdate: "December 1985" archive_link: false --- # CHECK SUM (13 bytes) This routine when use with LET Z=USR XXXX will return with a number in z that will be the one number if the program loaded correctly. The following statement could be used to check the program: ``` IF Z<>xx THEN STOP ``` where xx=the correct loading number. NN=hex length of MC to be checked PP=hex address where MC starts (NN & PP are Low High order) ``` 21 PP PP LD HL,address 97 SUB A 06 NN LD B,length 86 ADD A,(HL) 23 INC HL 05 DEC B 20 FB JR NZ FB 4F LD C,A C9 RET ``` Brian Little