--- title: "Forth Graphics Demo" id: 77411 type: "computer_media" slug: "forth-graphics-demo" url: "http://localhost/computer_media/forth-graphics-demo/" markdown_url: "http://localhost/computer_media/forth-graphics-demo.md" published_at: "2026-11-15T18:38:31+00:00" modified_at: "2026-11-15T18:38:31+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "A ZX FORTH word set that draws a border and prints a message, to compare FORTH's speed with BASIC." post_tag: - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - 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: "Juan Jose Castillos" slug: "juan-jose-castillos" taxonomy: "indiv" url: "http://localhost/indiv/juan-jose-castillos/" genre: - name: "Forth (programming language)" slug: "forth-programming-language" taxonomy: "genre" url: "http://localhost/type/forth-programming-language/" media_type: "Program" programmers: - name: "Juan Jose Castillos" slug: "juan-jose-castillos" taxonomy: "indiv" url: "http://localhost/indiv/juan-jose-castillos/" mediadate: "1983" article_media: - id: 40042 title: "A Short Program in Forth (ZX Forth)" type: "article" url: "http://localhost/article/a-short-program-in-forth-zx-forth/" - id: 40080 title: "A Short Program in Forth (ZX Forth)" type: "article" url: "http://localhost/article/a-short-program-in-forth-zx-forth-2/" media_type_tags: "Forth (programming language)" license: false --- # Forth Graphics Demo A short ZX FORTH program that draws a black border round the screen and prints THIS IS A DEMONSTRATION OF FORTH GRAPHICS… inside it, to compare FORTH’s speed with a BASIC program doing the same. It defines six words (G, A, M, E, S and X) and runs them with the line TASK G A HOME A M E S X. It needs the ZX FORTH language cassette for the ZX81; it is not BASIC, so there is no download. In the listing each # stands for one space. Sinc-Link printed it again in September 1984 for new members. Published in Sinc-Link 1983 (Vol. 1 No. 2) ([A Short Program in Forth (ZX Forth)](https://timexsinclair.com/article/a-short-program-in-forth-zx-forth/)). ## Source Code ``` (30 spaces) : G 24 1 DO CR ."##" 128 EMIT ."##############################" 128 EMIT LOOP ; Newline : A ."##" 31 0 DO 128 EMIT LOOP ; Newline : M 10 1 DO CR LOOP ; Newline : E ."##" 128 EMIT ."####THIS IS A DEMONSTRATION" CR CR ; Newline : S ."##" 128 EMIT ."#####OF FORTH GRAPHICS..." CR CR ; Newline (14 spaces) : X ."##" 128 EMIT ."##############" ; Newline TASK G A HOME A M E S X Newline ```