80-Bus News

  

May–June 1984, Volume 3, Issue 3

Page 20 of 51

general performance of the SVC. Thus the NMI software is written for speed, and tries to avoid specialised checks for unlikely occurences. (See below for the ramifications.)

The Soft­ware Clock

The SVC supports supports a software clock that works on the basis that NMIs are occuring at the rate of one every 20ms. (This assumes that the CRT controller’s registers have been set up correctly.) A software counter repeatedly counts down from 50, and every time it reaches zero (once a second) an internal ASCII digital clock display is updated. After updating the clock the software checks a flag to see if it is to be displayed. If the flag is set, the clock is copied to a predetermined position on the screen. The default display position for the clock is at the top right of the display, but, by sending the appropriate escape sequence, it may be positioned anywhere on the screen.

Note that the clock software in the NMI routine only spends time updating the screen once per second when the internal ASCII clock is advanced. For the other 49 ‘ticks’ of the clock no time is wasted updating a (probably) unchanged display. One other ‘feature’ that resulted from the basic NMI philosophy of minimum overhead is that the SVC supports a 60 hour clock rather than the more usual 24 hour clock! The updating software does not include a check for the special case of the hours. This fact will only be noticed by those who burn the candle at both ends. (It would have been interesting to have kept quiet about this, and seen if it was ever reported as a bug. My feeling is that it would have been a year or two before anyone noticed it, and then it would probably have been by accident.)

Graphics Soft­ware

My intention with the initial graphics software was to provide the fundamental routines on-board where the graetest speed advantage could be obtained, and to leave the neat user interface and extended features to an intermediate interface program. (e.g. The Gemini/​CCSOFT GRAPHPAC package.) Thus for example there are no Escape sequences for ‘pen-up’ and ‘pen-down’, or for relative plotting. The basic escape sequences deal with absolute coordinates, and include the pen-up-down command within them.

The routines included offer: Pixel set, reset, and test. Line drawing. Circle drawing. Flood fill.

The algorithms I used were simple and orientated towards speed. They only use addition, subtraction. There is no multiplication or division involved other than by a simple shift for division by 2. In this first release of the SVC-MON I concentrated on simplicity, and so certain possibly desirable features have not been included. (e.g. All the line drawing is done with a single line type – a solid line. There is as yet no option for dotted lines, dashed lines, or whatever.) The circle routine draws a true circle, there is as yet no support for drawing ellipses. (Depending on how your monitor is adjusted you might have to draw an ellipse in order to get a circle displayed!)

Internally the SVC graphics routines use 16-bit arithmetic. Although this does have a small impact on performance it also has two advantages. i) It offers a possible upgrade path sometime in the future if Gemini should ever produce a card with higher resolution.

Page 20 of 51