Appendix 7
VDU codes
The output of text and graphics is controlled by a complex set of MOS routines
referred to as the VDU driver. The VDU driver is active unless the display
screen has been disabled using *FX3 (see page App4. I) or VDU 21 (see below).
The codes described below alter the the behaviour of the VDU driver and may
be used to produce a variety of effects. The most common implementation is
through the BASIC language's VDU statement although commands to the
VDU driver may also be issued directly from the keyboard by means of control
key depressions (i.e. simultaneous depression of [CTRL] with another key).
Some VDU codes consist of a sequence of values. Where necessary, these extra
values must be specified for the code to take effect.
Code | [CTRL] | Extra | Effect |
key | values | ||
VDU 0 | @ | 0 | Does nothing. |
VDU 1 | A | 1 | Send the next character to the printer only. |
For example: | |||
VDU 1,65 prints but does not display the | |||
character A. | |||
VDU 2 | B | 0 | Enable the printer. |
VDU 3 | C | 0 | Disable the printer. |
VDU 4 | D | 0 | Write text at text cursor (i.e. restore the text |
cursor and display subsequent text in normal | |||
character positions). | |||
VDU 5 | E | 0 | Write text at graphics cursor (i.e. remove the |
text cursor and display subsequent text at | |||
graphics co-ordinates). The position of the | |||
text cursor remains unaltered. | |||
VDU 6 | F | 0 | Re-enable screen output (i.e. enable the VDU |
driver). | |||
VDU 7 | G | 0 | Emit a bleep from the speaker. |
App 7.1 |