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)).
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 NewlineNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.