Gdos Opcodes - NEC CP/M-86 System Reference Manual

Advanced personal computer
Table of Contents

Advertisement

GSX-86: Graphics for the
APe
The full scale NDC space is always mapped to the full dimensions of the graphics
device in each axis. This assures that all graphics information will appear on the
display surface regardless of the dimensions of the device.
Both input and output coordinates are converted by GSX-86. Therefore, both the
calling routine and the device driver must ensure that the input vertex count
(contrl(2)) and output vertex count (contrl(3)) are set. The calling routine must set
contrl(2) to 0 if no X,Y coordinates are being passed to GSX-86. Similarly, the
device driver must set contrl(3) to 0 if no X,Y coordinates are being returned
through GSX-86.
Since 0-32767 maps to the full extent on each axis, coordinate values are scaled
differently on the X and Y axes of devices that do not have a square display.
Each time an application program opens a workstation, GDOS determines
whether the required device driver is resident in memory. If not, G DOS loads
the driver from disk and then services the graphics request.
Device driver I/O (i.e., communication between the device driver and the device via
the system hardware ports) is done through CP/M-86 BDOS calls. CRT devices are
assumed to be the console device. Plotters are assumed to be connected as the
Auxiliary Input/Output device. Printers are assumed to be connected as the list
device.
GDOS Opcodes
Table 9-2 lists the GSX-86 opcodes and indicates whether each is required for CRT
devices and plotters/printers. Each operation is described in detail in the following
sections of this chapter. These opcodes must be present and perform as specified.
When creating device drivers, you should implement all opcodes. Full implementa-
tion of opcodes results in better quality graphics.
In addition to required opcodes, you may be able to use other, non-required
opcodes with a particular device. To determine if a non-required opcode is available
in a particular driver, you may use one of two methods. You can check the
information about available features returned from the OPEN WORKSTATION
opcode, or you can check the selected value returned from an opcode against the
requested value. If the two values do n9t match, then either opcode is not available
or the requested value is not available and a best fit value was selected.
9-11

Advertisement

Table of Contents
loading

Table of Contents