SCREEN ARTIST (1K ZX81)
By T M Humphries, Sutton Coldfield, West Midlands
from Your Computer, December 1981, Page 79

Page 12 of the ZX-81 manual lists a program which draws a line from pixel
(A,B) to pixel (C,D) but its 25 lines take nearly 1K of memory so it is
little use as a subroutine for unexpanded machines.

My eight-line program does not only the same job, but leaves the initial
values A, B, C and D unaltered and uses only four new variables. As this
listing is intended as a subroutine you will first need to Input (A,B) and
(C,D).

The program works on the principle that the distance between the "x"
co-ordinates, X, and the "y" co-ordinates, Y, can be covered in M steps
where M is the greater of the absolute values of X and Y. The distance to be
travelled in each step is, therefore, X/M and Y/M respectively.

The appearance of very steep or very shallow lines can be improved by adding
Step 2 to line 1040 and plotting every other point.
