--- title: "Keyboard Scanning from Machine Code" type: "article" slug: "keyboard-scanning-from-machine-code" url: "http://localhost/article/keyboard-scanning-from-machine-code/" markdown_url: "http://localhost/article/keyboard-scanning-from-machine-code.md" published_at: "2026-03-13T00:25:47+00:00" modified_at: "2026-03-13T00:25:48+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Explains how to scan the ZX80/81 keyboard from machine code in SLOW mode using the LAST K system variable (16421-16422). Covers key-value demonstration, FAST/SLOW mode selection from machine code using ROM addresses, and presents a complete machine code keyboard scanning routine that mirrors Sinclair's own BASIC keyboard feel." category: - name: "Syntax" slug: "syntax" taxonomy: "category" url: "http://localhost/category/periodicals/syntax/" post_tag: - 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: "ZX80" slug: "zx80" taxonomy: "post_tag" url: "http://localhost/tag/zx80/" model: - name: "Sinclair ZX80" slug: "zx80" taxonomy: "model" url: "http://localhost/model/zx80/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Ian Logan" slug: "ian-logan" taxonomy: "indiv" url: "http://localhost/indiv/ian-logan/" publication_r: id: 10246 title: "Syntax" type: "periodical" url: "http://localhost/periodical/syntax/" authors_r: - name: "Ian Logan" slug: "ian-logan" taxonomy: "indiv" url: "http://localhost/indiv/ian-logan/" volume: "3" issue: "7" issues_articles: - id: 52481 title: "Syntax/Syntax ZX80 v3 n7" type: "issue" url: "http://localhost/issue/syntax-syntax-zx80-v3-n7/" pages: "6" pubdate: "July 1982" archive_link: false --- # Keyboard Scanning from Machine Code Explains how to scan the ZX80/81 keyboard from machine code in SLOW mode using the LAST K system variable (16421-16422). Covers key-value demonstration, FAST/SLOW mode selection from machine code using ROM addresses, and presents a complete machine code keyboard scanning routine that mirrors Sinclair’s own BASIC keyboard feel.