User Defined Graphics, Revisited

Author(s): Cedric Bastiaans
Publication: LISTing Newsletter
Date: January 1988
Pages: 7

My article “USER DEFINED GRAPHICS MADE EASY” (LISTing of September ’87 and HATS of October ’87) requires a few further observations…

(1) When the program has been loaded and it runs, one of the first messages on screen is that the UDG’s cannot get lost by such commands as NEW, CLEAR, SAVE or LOAD. Even though this is true, it might suggest that the UDG’s can be SAVEd! The only way to SAVE UDG’s is by the method shown in the second page of my article, by DATA, READ and RESTORE commands.

(2) Then, Basil Wentworth brought to my attention that it is possible for the program to run into a snag. That happens when the BLACK SQUARES occuring in program lines 120, 210 and 230 are constructed by:

INVERSE or INVERSE VIDEO “space”

Should you have done this, you will have noticed that you can’t progress beyond line 120, since you will get the error message:

K Invalid color, 120:3

I would never have thought of using any of the above commands to make a black square, so I never ran into this problem. Two correct ways of making a black square are:

(a) GRAPHICS shifted 8 (then undo the graphics mode)
or
(b) CHR$143

Method (a) is by far the easiest.

I hope that you have not been discouraged by any such problem; try the program and you will find that it is the easiest way yet to make UDG’s!