Nascom Newsletter |
Volume 3 · Number 2 · May 1983 |
Page 25 of 36 |
---|
conflict with the normal program memory of the Nascom computer. They are only paged into the computer’s memory map when it is necessary to read or write data to the display.
To determine which bits of which memory location of which memory plane to turn on and off in order to produce the required visual effect is quite complicated. Fortunately extensive software support is provided with the AVC which does the hard work for you. This software is accessible using ROM BASIC and Extended BASIC (XBASIC), and provides simple commands to control the graphics operations. The support software occupies around 6K of main memory. In CP/M machines it also provides an 80 column by 25 line character display as standard.
Suppose, for example, we want to plot a red circle near the top right hand corner of the display. We need only issue commands to select the colour, shape and size of the object to be drawn. In this case the command/program statements would be a follows:
COLOUR 1
APOLY 250,150,100
The instruction Colour indicates the colour to be used, and the subsequent number indicates which of the available colours are to be used. The colours available are as follows:
Black | ..... | 0 | Blue | ..... | 4 | |
Red | ..... | 1 | Magenta | ..... | 5 | |
Green | ..... | 2 | Cyan | ..... | 6 | |
Yellow | ..... | 3 | White | ..... | 7 |
The command APOLY specifies that we wish to draw a polygon (a circle is a polygon with an infinite number of sides!). The position to draw the circle is given by the X, Y co-ordintates (250, 150 in this case) and the size of the circle is specified by its radius, 100 in this case. The POLY command was chosen since it gives much more generality in the shapes that can be drawn than would a more specific command such as ‘circle’.
Some of the commands available from XBASIC and ROM BASIC are summarised below. In ROM BASIC each command is prefixed by the word SET. Most commands are followed by one or more numeric parameters (they can be variables in BASIC). In many cases there are default values for these parameters, so that not all of them need to be specified.
This command specifies the type of display required and which combinations of primary colours which are to be displayed.
There are five types of display available –
Text display (Nascom 2 video RAM output)
Page 25 of 36 |
---|