Skip to main content

Blinking

Some terminals have the ability to blink objects on the screen. The command %GOBNK meaning make the current set blink. All objects in it already begin blinking, and any new objects also blink. %GOVIS or %TOINV cancels the effect of a %GOBNK, making the objects of the set permanently visible or invisible. %TQBNK indicates that the terminal supports blinking on the screen.

However, there is a problem: some intelligent bit matrix terminals may be able to implement blinking a few objects, if they are told in advance, before the objects are drawn. They will be unable to support arbitrary use of %GOBNK, however.

The solution to the problem is a convention for the use of %TOBNK which, together with degenerate definitions for set operations, makes it possible to give commands which reliably work on any terminal which supports blinking.

On a terminal which sets %TQBNK but not %TQSET, %GOBNK is defined to cause objects which are drawn after it to be drawn blinking. %GOSET cancels this, so following objects will be drawn unblinking. This is regardless of the argument to the %GOSET.

Thus, the way for a program to work on all terminals with %TQBNK, whether they know about sets or not, is: to write a bliniking picture, select some set other than your normal one (set 1 will do), do %GOBNK, output the picture, and reselect set 0. The picture will blink, while you draw things in set 0. To draw more blinking objects, you must reselect set 1 and do another %GOBNK. Simply reselecting set 1 will not work on terminals which don't really support sets, since they don't remember that the blinking objects are "in set 1" and not "in set 0".

Erasing a blinking object should make it disappear, on any terminal which implements blinking. On bit matrix terminals, blinking MUST always be done by XORing, so that the non-blinking background is not destroyed.

%GOCLS, on a terminal which supports blinking but not sets, should delete all blinking objects. Then, the convention for deleting all blinking objects is to select set 1, do a %GOCLS, and reselect set 0. This has the desired effect on all terminals. This definition of %GOCLS causes no trouble on non-set terminals, since %GOCLS would otherwise be meaningless to them.

To make blinking objects stop blinking but remain visible is possible with a %GOVIS on a terminal which supports sets. But in general the only way to do it is to delete them and redraw them as permanent.