--- title: "A Machine Code Graphics Line Drawing Subroutine" type: "article" slug: "a-machine-code-graphics-line-drawing-subroutine" url: "http://localhost/article/a-machine-code-graphics-line-drawing-subroutine/" markdown_url: "http://localhost/article/a-machine-code-graphics-line-drawing-subroutine.md" published_at: "2020-10-27T21:19:18+00:00" modified_at: "2024-06-23T01:04:26+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "In the pages of the ZX81 manual, we find a Basic subroutine to draw a line between any two specified points (see Listing 1). However, I found this routine to be exceedingly slow, especially when I wanted to draw several lines on the screen and had to wait several agonizing minutes to get them. The…" category: - name: "SYNC" slug: "sync" taxonomy: "category" url: "http://localhost/category/periodicals/sync/" post_tag: - name: "1982" slug: "year-1982" taxonomy: "post_tag" url: "http://localhost/tag/year-1982/" - 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/" - 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/" indiv: - name: "Daniel Kopyc" slug: "daniel-kopyc" taxonomy: "indiv" url: "http://localhost/indiv/daniel-kopyc/" publication: "Sync" publication_r: id: 10243 title: "SYNC" type: "periodical" url: "http://localhost/periodical/sync-magazine/" authors: "Daniel Kopyc" volume: "2" issue: "6" issues_articles: - id: 26646 title: "SYNC v2 n6" type: "issue" url: "http://localhost/issue/sync-v2-n6/" pages: "41-46" pubdate: "November/December 1982" archive_link: false volumeissue: "v2n6" --- # A Machine Code Graphics Line Drawing Subroutine In the pages of the ZX81 manual, we find a Basic subroutine to draw a line between any two specified points (see Listing 1). However, I found this routine to be exceedingly slow, especially when I wanted to draw several lines on the screen and had to wait several agonizing minutes to get them. The only solution was to translate the Basic subroutine into Z80 machine language.