The following article was printed in August 1988 of the magazine „8000 PLUS".
A simple BASIC tool for plotting functions

PLOT ROUTINE

by Lawrence Simons
One major drawback in Mallard BASIC is the absence of a PLOT command - a command that allows you to switch a pixel on or off at a specific place on the screen. But now there is thanks to the sterling work of Mr Simons of London. What he has produced is a bit of machine code that works the same as the PLOT command in a Sinclair Spectrum (if anyone admits to remembering such things).
The idea is that once you have typed in the machine code routine (the really complicated looking bit from line 50000) you can run this using a GOSUB routine (see line 10). You have three variables to set. For the x axis (how far across the screen) you use x%, and for the y axis you set y%. As the screen is 720 pixels wide by 256 pixels high. x% has to be between 0 and 719 and y% has to be between 0 and 255. The program will ignore anything beyond these limits.
The final variable is f% which decides whether to switch the pixel on or off. If f%=1 you switch on; 0 switches off. Any other number and it will reverse the situation - if it finds a pixel on it switches it off and vice versa.
GOSUB to the machine code once and then every time thereafter you put CALL PLOT (x%,y%,f%) it will switch the pixel at x% across and y% down on or off.
Now, switching individual pixels on and off by itself may not seem too impressive - but if you use it with a formula (as in the examples) you can produce impressive graphics in boring old Mallard. Perhaps not the fastest way of producing circles or ellipses but it saves you having to take a crash course in GSX and it is more fun than learning LOGO.
No doubt we will see some ingenious uses appearing in listings over the next few months.
[BASIC listing with corrected line 50070] and [assembler listing]

HTML customization by Werner Cirsovius
December 2014
© 8000 PLUS