5074 2023_GEM_Virtual_Device_Interface_Reference_Guide_2.0_Jun86 2023 GEM Virtual Device Interface Reference Guide 2.0 Jun86

5074-2023_GEM_Virtual_Device_Interface_Reference_Guide_2.0_Jun86 5074-2023_GEM_Virtual_Device_Interface_Reference_Guide_2.0_Jun86

User Manual: 5074-2023_GEM_Virtual_Device_Interface_Reference_Guide_2.0_Jun86

Open the PDF directly: View PDF PDF.
Page Count: 329

Download5074-2023_GEM_Virtual_Device_Interface_Reference_Guide_2.0_Jun86 5074-2023 GEM Virtual Device Interface Reference Guide 2.0 Jun86
Open PDF In BrowserView PDF
GEM™ Virtual Device
Interface Reference Guide

GEM™
Virtual Device Interface
Reference Guide

Software Version: 2.0

5074-2023-101

COPYRIGHT

©

Copyright
1986 Digital Research Inc. All rights reserved. No part of this publication
may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated
into any language or computer language, in any form or by any means, electronic,
mechanical, magnetic, optical, chemical, manual, or otherwise, without the prior written
permission of Digital Research Inc., 60 Garden Court, P.O. Box DRI, Monterey, California
93942.

DISCLAIMER
DIGITAL RESEARCH INC. MAKES NO REPRESENTATIONS OR WARRANTIES WITH
RESPECT TO THE CONTENTS HEREOF AND SPECIFICALLY DISCLAIMS ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE.
Further, Digital Research Inc. reserves the right to revise this publication and to make
changes from time to time in the content hereof without obligation of Digital Research
Inc. to notify any person of such revision or changes.

NOTICE TO USER
This manual should not be construed as any represe·ntation or warranty with respect to
the software named herein. Occasionally changes or variations exist in the software
that are not reflected in the manual. Generally, if such changes or variations are known
to exist and to affect the product significantly, a release note or READ.ME file
accompanies the manual and distribution disk(s). In that event, be sure to read the
release note or READ.ME file before using the product.

TRADEMARKS
Digital Research and its logo are registered trademarks of Digital Research Inc. GEM,
Desktop, Graphics Environment Manager, the GEM logo, GEM Draw, GEM Output,
CP/M-68K. and Concurrent are trademarks of Digital Research Inc. IBM is a registered
trademark of International Business Machines, Corp. Intel is a registered trademark of
Intel Corporation. Motorola is a registered trademark of Motorola Inc. Polaroid is a
registered trademark of Polaroid Corporation.
First Edition: June 1986

Foreword

This guide is intended for microcomputer application programmers
with operating system and graphics programming experience.
It
describes the GEM™ Virtual Device Interface (VOl) features, operation,
and applications interface.
The GEM VOl provides a deviceindependent environment in which to write graphics applications that
can run under the most widely used operating systems.
GEM VOl provides a device-independent software interface for your
application programs. You do not need to rewrite applications for use
with different output devices such as screens, printers, and plotters.
GEM VOl handles device differences, making it possible for you to send
information to the devices through the application program as if the
devices were the same.
GEM VOl handles graphics requests and
supplies the right driver to run the specific device. The GEM VOl
specifies the calling sequence to access device driver functions as
well as the necessary calling parameters.
The GEM VOl package contains drivers for many of the most popular
microcomputer-related graphics devices.
You can write application programs in assembly language or in a
high-level language that supports the GEM VOl calling conventions.
You can compile or assemble and link programs containing GEM VOl
calls in the normal manner.
This guide contains nine sections, seven appendices, and an index.
• Section 1 introduces the GEM VOL
• Section 2 describes GEM VOl operating procedu res, lists the
functions that the VDI requires for each device, and details the
VOl calling conventions.
• Sections 3 through 9 describe the various GEM VOl functions.
• Appendix A lists and describes the GEM VOl error messages.
• Appendix B describes the format of a metafile.

iii

• Appendix C describes the reserved metafile sub-opcodes.
• Appendix D defines the GEM VDI standard keyboard.
• Appendix E describes
operating
systems
procedures.

entry
and

into the GEM VDI for
microprocessor-specific

specific
calling

• Appendix F describes the system font character sets and the font
file format.
• Appendix G describes the format of a bit image file.
The function reference table at the end of this guide lists the GEM VOl
functions according to their opcode number and gives their respective
C binding procedure names.
Note that throughout the remainder of this guide the term "VDI" is
used to refer to the GEM Virtual Device Interface.

iv

Contents

1 Overview
Graphics Device Operating System. . . . . . . . .
Device Drivers. . . . . . . . . . . . . . . . . . . . . . . .
Opcodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Metafiles . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Device Handles. . . . . . . . . . . . . . . . . . . . . . . .
The Assignment File, ASSIGN.SYS . . . . . . . ..
The VOl Entry Point .................. '. .
Coordinate Systems. . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

1-2
1-2
1-3
1-3
1-3
1-4
1-5
1-6

2 Function Summary and Calling Conventions
Required Functions. . . . . . . . . . . . . . . . .
Function Parameters. . . . . . . . . . . . . . . .
Running Applications Under the VOl. . . .
Sample C Language Graphics Program. .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

..
..
..
..

2-2
2-11
2-14
2-17

3 Control Functions
V_OPNWK (1H) . . . . . . . . . .
V_CLSWK (2H). . . . . . . . . . .
V_CLRWK (3H). . . . . . . . . . .
V_UPDWK (4H) . . . . . . . . . .
V_OPNVWK (64H) . . . . . . . .
V_CLSVWK (65H). . . . . . . . .
VST_LOAD_FONTS (77H) . . .
VST_UNLOAD_FONTS (78H).
VS_CLlP (81H). . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

..
..
..
..
..
..
..
..
..

3-2
3-12
3-13
3-14
3-15
3-17
3-18
3-19
3-20

4 Output Functions
V_PLlNE (6H). . . . . .
V_PMARKER (7H). . .
V_GTEXT (8H) . . . . .
V_FILLAREA (9H) . . .
V_CELLARRAY (AH).

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

..
..
..
..
..

4-4
4-6
4-8
4-10
4-12

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

v

Contents
Generalized Drawing Primitives
V_BAR (B-1H) . . . . . . . . . . . . . .
V_ARC (B-2 H) . . . . . . . . . . . . . .
V_PIES LICE (B-3H). . . . . . . . . . .
V_CIRCLE (B-4H). . . . . . . . . . . .
V_ELLIPSE (B-5H) . . . . . . . . . . .
V_ElLARC (B-SH) . . . . . . . . . . .
V_EllPIE (B-7H) . . . . . . . . . . . .
V_RBOX (B-8H). . . . . . . . . . . . .
V_RFBOX (B-9H) . . . . . . . . . . . .
V_JUSTIFIED (B-AH) . . . . . . . . .
V_CONTOURFlll (S7H). . . . . . . .
VR_RECFl (72H) . . . . . . . . . . . .
~

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

Attribute Functions
VSWR_MODE (20H) . . . . . . . . . . . .
VS_COlOR (EH). . . . . . . . . . . . . . .
VSl_TYPE (FH) . . . . . . . . . . . . . . .
VSl_UDSTY (71H) . . . . . . . . . . . . .
VSl_WIDTH (10H) . . . . . . . . . . . . .
VSl_COlOR (11 H) . . . . . . . . . . . . .
VSl_ENDS (6CH). . . . . . . . . . . . . .
VSM_TYPE (12H). . . . . . . . . . . . . .
VSM_HEIGHT (13H) . . . . . . . . . . . .
VSM_COlOR (14H) . . . . . . . . . . . .
VST_HEIGHT (CH) . . . . . . . . . . . . .
VST_POINT (6BH) . . . . . . . . . . . . .
VST_ROTATION (DH). . . . . . . . . . .
VST_FONT (15H) . . . . . . . . . . . . . .
VST_COLOR (16H). . . . . . . . . . . . .
VST_EFFECTS (6AH) . . . . . . . . . . .
VST_ALIGNMENT (27H) . . . . . . . . .
VSF _INTERIOR (17H) . . . . . . . . . . .
VSF_STYLE (18H) . . . . . . . . . . . . .
VSF _COLOR (19H) . . . . . . . . . . . . .
VSF_PERIMETER (S8H) ..........
VSF _UDPAT (70H) . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

..
..
..
..
..
..
..
..
..
..
..
..
..

4-14
4-16
4-17
4-19
4-21
4-22
4-23
4-24
4-25
4-26
4-27
4-29
4-30

. .
. .
. .
. .
. .
. .
. .
..
. .
. .
..
. .
. .
..
. .
. .
..
. .
. .
. .
'.'
. .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

. .
. .
. .
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..

5-3
5-6
5-8
5-10
5-11
5-12
5-13
5-15
5-17
5-18
5-19
5-21
5-23
5-25
5-27
5-28
5-31
5-33
5-35
5-38
5-39
5-40

vi

Contents

6 Raster Operations
Memory Form Definition Block.
Raster Area Formats. . . . . . . . .
Coordinate Systems. . . . . . . . .
Logic Operations . . . . . . . . . . .
V_GET_PIXEL (69H) . . . . . . . . . .
VRO_CPYFM (6DH) . . . . . . . . . .
VR_TRNFM (6EH). . . . . . . . . . . .
VRT_CPYFM (79H). . . . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

..
..
..
. .
..
..
..
..

7 Input Functions
VSIN_MODE (21 H) . . . . . . . . . . . . .
VRO_LOCATOR (lCH) . . . . . . . . . .
VSM_LOCATOR (lCH) . . . . . . . . . .
VRO_VALUATOR (lDH) . . . . . . . . .
VSM_VALUATOR (lDH) . . . . . . . . .
VRO_CHOICE (lEH) . . . . . . . . . . . .
VSM_CHOICE (lE) . . . . . . . . . . . . .
VRO_STRING (lFH) . . . . . . . . . . . .
VSM_STRING (lFH) ........... .'
VSC_FORM (6FH). .. . . . . . . . . . . .
VEX_TIMV (76H) . . . . . . . . . . . . . .
V_SHOW_C (7AH) . . . . . . . . . . . . .
V_HIDE_C (7BH). . . . . . . . . . . . . . .
VO_MOUSE (7CH) . . . . . . . . . . . . .
VEX_BUTV (7DH). . . . . . . . . . . . . .
VEX_MOTV (7EH). . . . . . . . . . . . . .
VEX_CURV (7FH) . . . . . . . . . . . . . .
VO_KEY _S (80H) . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

..
7-3
..
7-5
..
7-7
..
7-9
.. 7-11
.. 7-13
.. 7-14
.. 7-16
.. 7-18
.. 7-20
.. 7-22
.. 7-24
.. 7-26
.. 7-27
.. 7-28
.. 7-30
.. . 7-32
.. 7-34

8 Inquire Functions
VO_COLOR (1 AH) . . . . .
VQ_CELLARRA Y (1 BH) . .
VQL-ATTRIBUTES (23H).
VQM-ATTRIBUTES (24H)
VOF-ATTRIBUTES (25H).
VQT-ATTRIBUTES (26H).

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

..
..
. .
..
..
..

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.

vii

.
.
.
.
.
.

6-2
6-4
6-6
6-7
6-9
6-10
6-12
6-13

8-2
8-4
8-6
8-8
8-10
8-12

Contents
va_EXTND (66H). . . . .
VaiN_MODE (73H). . . .
vaT_EXTENT (74H) . . .
vaT_WIDTH (75H). . . .
vaT_NAME (82H) . . . .
vaT_FONTJNFO (83H).
VaT_JUSTIFIED (84H) .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

..
..
..
..
..
..
..

8-14
8-18
8-19
8-22
8-24
8-26
8-29

9 Escape Functions
Va_CHCELLS (5-1H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V_EXIT_CUR (S-2H). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V_ENTER_CUR (S-3H) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V_CURUP (S-4H). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V_CURDOWN (S-5H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V_CURRIGHT (S-6H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V_CURLEFT (S-7H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V_CURHOME (S-8H) ............... '. . . . . . . . . . . . ..
V_EEOS (S-9H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
V_EEOL (S-AH) . . . . . . . . . . . . . . . . . . . . . " . . . . . . . . . ..
VS_CURADDRESS (5-BH). . . . . . . . . . . . . . . . . . . . . . . . ..
V_CURTEXT (5-CH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
V_RVON (S-DH). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
V_RVOFF (S-EH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Va_CURADDRESS (5-FH). . . . . . . . . . . . . . . . . . . . . . . . ..
Va_TABSTATUS (5-10H) . . . . . . . . . . . . . . . . . . . . . . . . ..
V_HARDCOPY (S-11 H). . . . . . . . . . . . . . . . . . . . . . . . . . ..
V_DSPCUR (5-12H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
V_RMCUR (5-13H). . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
V_FORM.ADV (S-14H) . . . . . . . . . . . . . . . . . . . . . . . . . . ..
V_OUTPUT_WINDOW (S-lSH) . . . . . . . . . . . . . . . . . . . . ..
V_CLEAR_DISP _LIST (5-16H) . . . . . . . . . . . . . . . . . . . . . ..
V_BITJMAGE (S-17H) . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Va_SCAN (5-18H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . '.
V-ALPHA_TEXT (S-19H). . . . . . . . . . . . . . . . . . . . . . . . . ..
VS_PALETTE (S-3CH). . . . . . . . . . . . . . . . . . . . . . . . . . . ..
V_SOUND (S-3DH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
VS_MUTE (S-3EH). . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..

9-3
9-4
9-S
9-6
9-7
9-8
9-9
9-10
9-11
9-12
9-13
9-14
9-1S
9-16
9-17
9-18
9-19
9-20
9-21
9-22
9-23
9-2S
9-26
9-29
9-31
9-33
9-34
9-35

viii

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

Contents
VT_RESOLUTION (5-51H)o
VT~XIS (5-52H)
VT_ORGIN (5-53H) . . . . . . . . . . . . . . . . . . . . . . . .
VO_TDIMENSIONS (5-54H) ..............
VT~lIGNMENT (5-55H)
VSP _FILM (5-5BH) .....
VOP _FILMNAME (5-5CH)
VSC_EXPOSE (5-5DH) ..
V_META_EXTENTS (5-62H) .....
V_WRITE_META (5-63H).................
VM_FILENAME (5-64H) .......
0

0

••••

0

0

•

••

0

0

0

•

0

0

0

••

•

0

••

0

0

•

0

••••••

0

0

•

•

0

•

0

••

••••••••••••••

0

•

•

•

0

0

•••

0

0

•

•

•

••

•

0

0

•

••

0

••••

0

•

•

•

••••••

0

••

o.

0

••••••

0

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

0

••••••

0

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

••

0

•••

0

•••••

0

••

0

••

0

••

0

••••••••••••

0

•

•

••

0.'

0

•••

0

••••••••

0

•

••

0

••

0

•

•

•

•

••

•

0

•

•

•

•

•

••

0

9-36
9-37
9-38
9-39
9-40
9-41
9-42
9-44
9-45
9-46
9-47

A GEM VOl Error Messages. . . . . . . • . . . . . . . . . . • . . . . . . . .

A-1

B GEM VOl Metafile Format. . . . . . . • . . . . . . . . . . . . . . . . . . .
Standard Metafile Item Format.
Nonstandard Metafile Items ............
Special Metafile Escapes ..
Inquire Functions . . . . . . . . . . . . . . . . . . . . . . . . .

8-1
8-1
8-4
B-6
8-7

0

•••

0

•

0

•••

0

••••••••

0

0

••••••••

0

••

0

•

•

•••

0

0

••••

0

0

0

•

•

•

•

•

•

•

••

0

C Reserved Metafile Sub-opcodes. . • . . . . . . . . . . . .
Metafile Sub-opcodes for GEM Output ........
Physical Page Size. . . . . . . . . . . . . . . . . . . . . . .
Coordinate Window ...
Metafile Sub-opcodes for GEM Draw. . . . . . . . .
Group .......
Set No line Style ..
Set Attribute Shadow On ...
Set Attribute Shadow Off ..
Start Draw Area Type Primitive. . . . . . . . . . . . . .
End Draw Area Type Primitive . . . . . . . . . . . . . .

•

•

•

•

. . . . . ..
. . . . . ..

C-1
C-1
C-2
C-3
C-4
C-5
C-6
C-7
C-8
C-9
C-10

. . . . . . . . . . . . . . . . . ..

D-1

E Processor-Specific Data . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BOB6-Specific Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6BOOO-Specific Data ...

E-1
E-l
E-3

0

0

••••••

0

0

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

. . . . . ..
0

•

0

•

•

. . . . . ..
•

•

•

•

•

0

•

•

0

• • • • • • • • • • • • •

0

•••

D Standard Keyboard ............

•

~

•

0

•

•

•

•••

•

0

•

•

•

•

••••

•

0

•

0

•

•

. . . . . ..

• • • • • • • • • • • • • • • • • • • • • • •

•••••

••

•

•

•

0.

•

•

•

•

•

0

•

•

•

•

•

•

•

0

•

0

•

0

•

•

•

0

0

•

•

•

•

•

•

•

•

•

ix

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

•

Contents
F Character Sets and Font Files.
Character Sets. . . . . . . . . .
Font Format. . . . . . . . . . . .
Font Data. . . . . . . . . . . . . .
Font Header. . . . . . . . . . . .
Character Offset. . . . . . . . .
Horizontal Offset Table. . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

F-1
F-l
F-4
F-4
F-4
F-6
F-7

G Bit Image File Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bit Image File Header. . . . . . . . . . . . . . . . . . . . . . . . . . ..
Bit Image File Data Format. . . . . . . . . . . . . . . . . . . . . . . .

G-1
0-1
0-2

Tables
1-1
2-1
3-1
3-2
3-3
4-1
4-2
4-3
4-4
4-5
5-1
5-2
5-3
5-4
5-5
5-6
5-7
6-1
6-2
6-3
6-4
7-1
7-2
8-1

Device Identification Numbers. . . . . . . . . . . . . . . . . . . . .
Required VOl Functions. . . . . . . . . . . . . . . . . . . . . . . . . .
VOl Control Functions . . . . . . . . . . . . . . . . . . . . . . . . . . .
Workstation Default Attribute Values. . . . . . . . . . . . . . . .
Default Color Table Index Values. . . . . . . . . . . . . . . . . . .
VOl Output Functions .. '.' . . . . . . . . . . . . . . . . . . . . . . . .
Output Functions and line Attributes. . . . . . . . . . . . . . . .
Marker Attributes Used by v_pmarker . . . . . . . . . . . . . . .
Output Functions and Fill Area Attributes. . . . . . . . . . . . .
Output Functions and Text Attributes. . . . . . . . . . . . . . . .
VOl Attribute Functions. . . . . . . . . . . . . . . . . . . . . . . . . .
Writing Mode Operands. . . . . . . . . . . . . . . . . . . . . . . . . .
line Type Index Values and Pattern Words. . . . . . . . . . . .
Polyline End Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Polymarker Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Face Values and Names. . . . . . . . . . . . . . . . . . . . . . . . ..
Text Attribute Bit Mapping. . . . . . . . . . . . . . . . . . . . . . ..
Raster Operation Functions. . . . . . . . . . . . . . . . . . . . . . .
Pixel Value to Color Index Mapping for 8-color Screens.
Pixel Value to Color Index Mapping for 16-color Screens.
Raster Operation logic Operations. . . . . . . . . . . . . . . . . .
VOl Input Functions. . . . . . . . . . . . . . . . . . . . . . .. . . . . .
Sample Mode Status Returned. . . . . . . . . . . . . . . . . . . . .
VOl Inquire Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . .

x

1-4
2-4
3-1
3-3
3-4
4-1
4-2
4-2
4-3
4-3
5-2
5-3
5-8
5-13
5-15
5-25
5-28
6-1
6-5
6-6
6-8
7-2
7-8
8-1

Contents
8-2
9-1
B-1
0-1
F-1
G-1

Face Names and Styles. . . . . . . . . . . . . . .
Escape Function Identifiers . . . . . . . . . . . .
Control, Integer and Vertex Parameters. . .
GEM VOl Standard Keyboard Assignments.
Font Header Format. . . . . . . . . . . . . . . . . .
Bit Image File Header Format . . . . . . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

..
..
..
..
..
..

8-24
9-1
B-1
0-1
F-5
G-1

Figures

1-1
2-1
2-2
4-1
5-1
5-2

5-3
5-4

5-5
5-6
6-1
6-2
6-3
8-1
8-2

8-3
F-1
F-2

Normalized Device Versus Raster Coordinates ........ .
Parameter Block Format ......................... .
Output from the Polyline Sample Program ........... .
GOP Angle Specification ........................ .
Points for Polyline End Styles .................... .
Character Size Definition ........................ .
Angle Specification ............................ .
Graphic Text Special Effects ..................... .
Graphic Text Alignment ......................... .
Fill Styles and Indices ........................... .
Memory Form Definition Block .................... .
Standard Forms ............................... .
Sample Single Plane Memory Form ................ .
Inquire Text Extent Function ... ' .................. .
Character Cell Definition ........................ .
Skewed Character Offsets ....................... .
GEM VOl USASCII Character Set................... .
GEM VOl International Character Set Extension

1-7
2-12
2-17
4-15

5-13
5-19
5-23
5-29

5-31
5-36
6-3
6-5

6-7
8-19
8-22
8-26
F-2
F-3

Listings

1-1 Sample ASSIGN SYS . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-1 Sample C Language Program, Polyline. . . . . . . . . . . . . ..

xi

1-5
2-18

SECTION 1
Overview

The GEM VOl provides graphics primitives for implementing graphics
applications with reduced programming effort. Application programs
interface to the VOl through a standard calling sequence. Drivers for
specific graphics devices translate the standard VOl calls into the
unique characteristics of each device. In this way, the VOl provides
device independence.
the Graphics Device
The GEM VOl consists of two components:
Operating System (GO~S) and the device drivers and their associated
font files.
The GODS contains the device-independent graphics functions, while
the device drivers and font files contain the device-dependent code.

1-1

Graphics Device Operating System

GEM VOl Reference Guide

Graphics Device Operating System
The GODS contains the basic host and device-independent graphics
Your
functions that can be called by your application program.
application program accesses the GODS in much the same way that it
accesses the operating system.
The GODS performs coordinate scaling so that your application can
specify points in a normalized space.
It uses device-specific
information to transform coordinates into the corresponding values for
a particular graphics device.
An application can also specify points in raster coordinate space, in
which case no transformation occurs.
Device Drivers
The graphics device drivers are similar to the drivers in any liD
system. They contain the device-specific code required to interface
particular graphics devices to the GODS.
The device drivers
communicate directly with the graphics devices. The VOl requires a
unique device driver for each graphics device in the system.
The GEM VOl package contains drivers for the most popular
microcomputer graphics devices, including screens, printers, plotters,
and special cameras.
A single program can use several graphics devices; the ODDS loads
only the appropriate device driver file into memory. By referring to
devices with a device identification number, an application program
can send graphics information to anyone of several memory-resident
device drivers.
A device driver produces graphics primitives according to the inherent
capabilities of a p~rticular graphics device. In some cases, a device
driver emulates standard capabilities not provided by the graphics
device hardware. For example, some devices require that dashed lines
be simulated by a series of short vectors generated in the device
driver.
See "Required Functions" in Section 2 for a list of the functions that
the VOl requires each driver to support.

1-2

GEM VOl Reference Guide

Metafiles

Opcodes
Each VOl function is associated with an operation code (opcode). A
calling routine indicates the graphics function to be performed by a
device driver by specifying the function's opcode.
References to VOl functions in this document include the function's
opcode in hexadecimal notation; for example, "v_opnwk (1 H)" refers to
the Open Workstation function, whose opcode is one.
Metafiles
A metafile is the stored generic form of a picture file.
Any VOl
application can create a GEM VOl metafile that can later be called into
another graphics application. The metafile driver stores a description
of a picture in a data file. These files can later be sent to any device
or used to exchange a picture between two compatible applications.
When the VOl creates a metafile, it provides the ideal device (one with
square pixels). Although their origins are different, Normalized Device
Coordinates (NOC) and Raster Coordinates (RC) have the same range (0
to 32767).
No coordinate transformation is applied.
"Coordinate
Systems," later in this section, offers more information on the
coordinate spaces.
Refer to Appendix B for information about the metafile format.
Device Handles
Because the VOl allows multiple workstations to be open at the same
time, each VOl function must be provided with a unique reference to
the desired device.
This identification is an signed WORD value
referred to as the device handle.
The GOOS returns the device handle when an application calls
v_opnwk (lH), the Open Workstation function, or v_opnwvk (64H), the
Open Virtual Workstation function.
Routines that make subsequent
calls to select a previously opened device must supply the device
handle as an input argument.

1-3

GEM VOl Reference Guide

Device Handles
The Assignment File, ASSIGN.SYS

The ASSIGN.SYS file lists the device driver filenames, their associated
font filenames, device identification numbers, and any device-specific
information. ASSIGN.SYS is a text file that can be created or edited
using any text editor. Device 10 numbers are assigned according to
their type; Table 1-1 lists the device 10 numbers.
The GDOS parses ASSIGN.SYS to create the assignment table, which it
stores in memory to reference whenever an open workstation function
is called.
You can include the R command in ASSIGN.SYS to make a driver
memory resident. To do so, place "R" after the device identification
number of the driver you want resident. See the example that follows
listing 1-1. The opening comments in listing 2-1 also include an
example.
Table 1-1.

Device Identification Numbers

Device Type
Screen
Plotter
Printer
Metafile
Camera
Tablet

Device 10 Number

01-10
11-20
21-30
31-40
41-50
51-60

Device Driver Filename
A device driver filename contained in ASSIGN.SYS must follow specific
naming conventions:
• It must have eight or fewer characters
• Its first character must be alphabetic
• The file's extension must be SYS

1-4

GEM VOl Reference Guide

The Assignment File, ASSIGN.SYS

Sample ASSIGN.SYS
Listing 1-1 shows the format of ASSIGN.SYS.
Listing 1-1.

Sample ASSIGN.SYS

21 printer.sys
;comments, if desired
font1.fnt
;font1 description
font2.fnt
;font2 description
font3.fnt
;font3 description
01 screen.sys
;comments, if desired
font4.fnt
;font4 description
fontS.fnt
;fontS description
11 p1otter.sys
;comments, if desired
font6.fnt
:font6 description
font7.fnt
:font7 description

If included in the ASSIGN.SYS file, the following command would, make
the screen driver memory resident:
01 R screen.sys

The VOl Entry Point
The VOl specifies the calling sequence and required parameters for
access to the device driver functions.
The main entry point into the VOl is a single subroutine with five
arguments, in the form of five arrays:
•
•
•
•
•

the
the
the
the
the

control array
array of integer input parameters
array of input point coordinates
array of integer output parameters'
array of output point coord inates

All array elements are WORD integers (two bytes). All arrays are zerobased.
The content of the input and output parameter arrays is
function dependent, and is included in the description of each function.
"Function Parameters" in Section 2 contains more complete
information about the format of the VOl function parameters.

1-5

The VOl Entry Point

GEM VOl Reference Guide

See Appendix E for more detailed information about the
microprocessor- and operating system-specific entry points into the
VOl.
Coordinate Systems
All computer graphics are displayed using a coordinate system. The
VOl verifies that the coordinate system of one device matches the
coordinate system of another.
You can address the display surface using one of two coordinate
systems:
• Normalized Device Coordinates (NDC)
• Raster Coordinates (RC)
The transformation mode, which the calling routine specifies when it
opens a workstation, determines which coordinate system the
application is to use.
Normalized Device Coordinates· --Transformation Mode··O
In the NOC system, coordinates range from 0,0 (lower left corner) to
32767,32767 (xmax,ymax In the .upper right corner). The NOC system
addresses the graphics display in units that are independent of the
device coordinate size. These units are then transformed to Raster
Coordinates by the GOOS when an application specifies transformation
. mode o.
The full scale of NDC space (0-32767) is mapped to the full
dimensions of the device on both axes. On a nonsquare display with
square pixels, a different scale factor is applied to each axis with this
transformation mode.
When transforming from NDC to RC,· the GOOS assumes a raster
coordinate at the lower left edge of a pixel. You should compensate
for a boundary condition created at the top edge of NDC space.
For example, suppose that the NDC point (32767, 32767) maps to the
RC point (0, 200). Because pixels are addressed at their lower left
corner, the NDC point (32766, 32766) would map to the RC point (1,
199). You should correct for this boundary error by adding half of the
NDC height and width Into the coordinate transform to ensure that any
roundoff error in the appllcation-world-to-NDC transform does not
cause the wrong pixel to be addressed.

1-6

Coordinate Systems

GEM VOl Reference Guide
Raster Coordinates -- Transformation Mode 2

Raster Coordinates (RC) are actual device units (for example, pixels for
screens and steps for plotters and printers). Unlike the NOC system,
RC system coordinates begin in the upper left corner; the lower right
corner (xmax,ymax) addresses the bottom right pixel of the space.
Figure 1-1 shows a comparison of the NOC and RC systems.
The GOOS does not transform coordinates when the RC system is in
effect. The application needs to adjust its coordinate transformation
based on the aspect ratio of the device.
The RC system eliminates the overhead involved when the GOOS
transforms every point.
See the Introduction to GEM Programming for more information on
coordinate system transformations.

0,32767

x-1, .0

0,0

x

= Total number of pixels
on x axis

y = Total number of pixels
on y axis

32767,0

0,0

0, y-1

Normalized Device

Raster Coordinates

Coordinates

Figure 1-1.

Normalized Device Versus Raster Coordinates

End of Section 1

1-7

SECTION 2
Function Summary and Calling Conventions

This section explains how to use VOl functions in your graphics
applications.
The VOl allows you to write graphics applications in assembly
language or a high-level language (C language bindings are provided).
Assembly language routines address VOl functions by opcode numbers.
C language routines address VOl functions by procedure name.
The VOl functions, described in sections 3 through 9, are grouped Into
the following categories:
Control

These functions open and close the graphics
workstation, set default values for device
attributes, load and unload fonts, clear and update
the display surface, and enable or disable
rectangle clipping.

Output

The output functions write text strings and draw
output items such as lines between two or more
points, a marker at one or more points, and filled
areas. The output functions also provide graphics
drawing primitives to produce bars, arcs, circles,
ellipses
and
elliptical
segments,
rounded
rectangles, and justified text.

Attribute

The attribute functions control the writing mode
(how items are Imposed over existing pixel
values) and determine the characteristics of the
output
functions.
The
output
function
characteristics
determined
by the
attribute
functions include color, line type, marker type, fill
pattern and stvle, and character height.

2-1

Required Functions

GEM VOl Reference Guide

Raster Operation

These functions operate on bit blocks in memory
and on pixel blocks on physical devices. Raster
operation functions copy blocks, determine the
copy mode (how blocks are imposed over existing
pixel values), transform block formats, and set
color values for specified pixels.

Input

The Input functions set the input mode to either
request (wait for an input event) or sample (return
Input device status or location) and control the
input devices. Input functions also set, show, or
hide the cursor; sample the mouse button and
keyboard states; and exchange the timer interrupt,
button change, mouse movement, and cursor
change vectors.

Inquire

The inquire functions return the current attribute
settings for the output items, information about
the text faces, cell definitions, and input mode.

Escape

These are device dependent control functions.
For example, they can be used to control the
cursor on an alpha screen, set the film type on a
camera, and change the name of a metafile.

Required Functions
Each device type requires certain functions. Table 2-1, below, lists all
of the VOl functions and indicates which devices are required to
support them. Each device driver recognizes all opcodes, whether or
not the driver supports the function. If an opcode is out of range, the
driver performs no action.
Because metafiles are transportable to any device, they are required to
support all those functions common to any device you may use. See
Appendix B for descriptions of the metafile format, metafile support of
the inquiry functions, and metafile sub-opcodes.

2-2

GEM VOl Reference Guide

Required Functions

You can determine if a function is available in a specific driver in one
of the following ways:
• Check the Information about available features returned from
Open Workstation, v_opnwk (lH), or Extended Inquire, vq_exntd
(66H).
• Check the values that a function returns for the length of the
integer output and output point coordinate arrays.
If zero is
returned where non-zero values are indicated, the driver does not
support the function.
• Check the values returned from a function against the values
specified in the call. If the two values are not the same, then
either the driver does not support the function or the requested
value is not available and the VDI selected a best fit value.

2-3

Required Functions
Table 2-1.

GEM VOl Reference Guide
Required VOl Functions

Function (Opcode)

Camera

Screen

Printer

Plotter

Metafile

Open Workstation, v_opnwk (1 H)

X

X

X

X

X

Close Workstation, v_clswk (2H)

X

X

X

X

X

Clear Workstation, v_clrwk (3H)

X

X

X

X

X

Update Workstation, v_updwk (4H)

X

X

X

X

X

Inquire Addressable Character Cells,
vq_chcells (5-1 H)

X

X

X

X

X

Exit Alpha Mode, v_exitcur (5-2H)

X

Enter Alpha Mode, v_entercur (5-3H)

X

Cursor Up, v_curup (5-4H)

X

Cursor Down, v_curdown (5-5H)

X

Cursor Right, v_curright (5-6H)

X

Cursor Left, v_curle't (5-7H)

X

Home Cursor, -v_curhome (5-8H)

X

Erase to End of Screen, v_eeas (5-9H)

X

Erase to End of Line, v_eeol (5-AH)

X

Direct Cursor Address,
v_curaddress (5-BH)

X

Output Cursor Addressable Text,
v_curtext (5-CH)

X

Reverse Video On, v_rvon (5-DH)
Reverse Video Off, v_rvoff (5-EH)
Inquire Current Alpha Cursor Address,
vq_curaddress (5-FH)

2-4

X

Required Functions

GEM VOl Reference Guide

Table 2-1. Required VOl Functions (Cont'd)
Function (Opcode)

Screen

Printer

Plotter

Metafile

Camera

Inquire Tablet Status,
vq_tabstatus (5-10H)
Hard Copy, v_hardcopy (5-11H)
Place Graphic Cursor, v_dspcur (5-12H)

X

Remove Last Graphic Cursor,
v_rmcur (5-13H)

X

Form Advance, v_form_adv (5-14H)

X

X

Output Window,
v_outpuLwindow (5-15H)

X

X

Clear Display List,
v_cleacdisp_list (5-16H)

X

X

Output Bit Image File,
v_biLimage (5-17H)

X

X

Inquire Printer Scan Heights,
vq_scan (5-18H)

X

Output Printer Alpha Text,
v_alpha_text (5-19H)

X

X

X

Select Palette, vs_palette (5-3CH)
Generate Tone, v_sound (5-3DH)

X

Set/clear Muting Flag, vs_mute (5-3EH)

X

Select Camera Film Type and Exposure,
vsp_film (5-5BH)

X

Inquire Camera Film Name,
vqp_filmname (5-5CH)

X

Disable/Enable Film Exposure,
vsc_expose (5-5DH)

2-5

GEM VOl Reference Guide

Required Functions

Table 2-1. Required VOl Functions (Cont'd)
Function (Opcode)

Screen

Printer

Plotter

Metafile

Update Metafile Extents,
v_meta_extents (5-62H)

X

Write Metafile Item, v_write_meta (5-63H)

X

Change GEM VOl Filename,
vm_filename (5-64H)

X

Camera

X

Polyline, .v_line (6H)

X

X

X

X

Polymarker, v_pmarker (7H)

X

X

X

X

Text, v-9text (SH)

X

X

X

X

Filled Area, v_fillarea (9H)

X

X

X

X

Bar GOP, v_bar (B-1 H)

X

X

X

X

X

Arc GOP, v_arc (B-2 H)

X

X

X

X

X

Pie Slice GOP, v_pieslice (B-3H)

X

X

X

X

X

Circle GOP, v_circle (B-4H)

X

X

X

X

X

Ellipse GOP, v_ellipse (B-5H)

X

X

X

X

X

Elliptical Arc GOP, v_ellarc (B-6H)

X

X

X

X

X

Elliptical Pie Slice GOP, v_ellpie (B-7H)

X

X

X

X

X

Rounded Rectangle GOP, v_rbox (B-SH)

X

X

X

X

X

Filled, Rounded Rectangle GOP,
v_rfbox (B-9H)

X

X

X

X

X

Justified Graphics Text GOP,
v..,justified (B-AH)

X

X

X

X

X

Cell Array, v_cellarrav (AH)

2-6

Required Functions

GEM VOl Reference Guide

Table 2-1. Required VOl Functions (Cont'd)
Function (Opcode)

Screen

Printer

Plotter

Metafile

Camera

Set Character Height Absolute Mode,
vsLheight (CH)

X

X

X

X

X

Set Character Baseline Vector,
vsLrotation (DH)

X

X

X

X

X

Set Color Representation, vs_color (EH)

X

X

X

Set Polyline Line Type, vsLtype (FH)

X

X

X

X

X

Set Polyline Width, vsLwidth (1 OH)

X

X

X

X

X

Set Polyline Color Index, vsLcolor (11 H)

X

X

X

X

X

Set Polymarker Type, vsm_type (12H)

X

X

X

X

X

Set Polymarker Height, vsm_height (13H)

X

X

X

X

X

Set Polymarker Color Index,
vsm_color (14H)

X

X

X

X

X

Set Text Font, vSLfont (15H)

X

X

X

X

X

Set Text Color Index, vSLcolor (16H)

X

X

X

X

X

Set Fill Interior Style, vsLinterior (17H)

X

X

X

X

X

Set Fill Style Index, vsLstyle (18H)

X

X

X

X

X

Set Fill Color Index, vsLcolor (19H)

X

X

X

X

X

Inquire Color Representation,
vq_color (lAH)

X

X

X

Inquire Cell Array, vq_cellarray (1 BH)
Input Locator - Request Mode,
vrq_locator (1 CH)
Input Locator - Sample Mode,
vsm_locator (lCH)

2-7

Required Functions

GEM VOl Reference Guide

Table 2-1. Required VOl Functions (Cont'd)
Function (Opcode)

Screen

Printer

Plotter

Metafile

Camera

Input Valuator - Request Mode,
vrq_valuator 11 DH)
Input Valuator - Sample Mode.
vsm_valator (lDH)
Input Choice - Request Mode,
vrq_choice (1 EH)
Input Choice - Sample Mode,
vsm_choice (1 EH)
Input String - Request Mode.
vrq_string (1 FH)
Input String - Sample Mode.
vsm_string (lFH)

X
X
X

X

X

X

X

X

X

X

X

X

X

X

X

X

Inquire Current Graphic Text Attributes,
vqLattributes (26H)

X

X

X

X

X

Set Graphic Text Alignment,
vsLalignment (27H)

X

X

X

X

X

Open Virtual Workstation,
v_opnvwk (64H)

X

Close Virtual Workstation,
v_clsvwk (65H)

X

Set Writing Mode, vswcmode (20H)

X

Set Input Mode, vsin_mode (21 H)

X

Inquire Current Polyline Attributes,
vqLattributes (23H)

X

X

Inquire Current Polymarker Attributes,
vqm_attributes (24H)

X

Inquire Current Fill Area Attributes,
vqLattributes (25H)

2-8

X

Required Functions

GEM VOl Reference Guide

Table 2-1. Required VOl Functions (Cont'd)
Function (Opcode)
Extended Inquire, vq_extnd (66H)

Screen

Printer

Plotter

Metafile

X

X

X

X

X

X

Contour Fill, v_contourfill (67H)
Set Fill Perimeter Visibility,
vsLperimeter (6SH)

Camera

X

X

X

X

X

Set Graphic Text Special Effects,.
vSLeffects, (6AH)

X

X

X

X

X

Set Character Cell Height, Points Mode,
vsLpoint (6BH)

X

X

X

X

X

Set Polyline End Styles, vsLends (6CH)

X

X

X

X

X

Copy Raster, Opaque, vro_cpyfm (60H)

X

Transform Form, vLtrn_fm (6EH)

X

Set Mouse Form, vsc_form (6FH)

X

Set User-defined Fill Pattern,
vsLudpat (70H)

X

X

X

X

Set User-defined line Style,
vsLudsty (71 H)

X

X

X

X

Fill Rectangle, vr_recfl (72H)

X

Inquire Input Mode, vqin_mode (73H)

X

Inquire Text Extent, vqLextent (74H)

X

X

X

X

Inquire Character Cell Width,
vqLwidth (75H)

X

X

X

X

Exchange Timer Interrupt Vector,
vex-timv (76H)

X

load Fonts, vSLload_fonts (77H)

X

X

X

Get Pixel, v_geLpixel (69H)

X

X

X

2-9

Required Functions

GEM VOl Reference Guide

Table 2-1. Required VOl Functions (Cont'd)
Function (Opcode)

Screen

Printer

Plotter

Metafile

Unload Fonts, vSLunload_fonts (78H)

X

X

X

X

X

Copy Raster, Transparent,
vrLcpyfm (79H)

X

Show Cursor, v_show_c (7AH)

X

Hide Cursor, v_hide_c (7BH)

X

Sample mouse button state (7CH)

X

Exchange Button Change Vector,
ve)Lbutv (7DH)

X

Exchange Mouse Movement Vector,
ve)Lmotv (7EH)

X

Exchange Cursor Change Vector,
ve)Lcurv (7FH)

X

Sample Keyboard State Information,
vq_key_s (80H)

X

Set Clipping Rectangle, vs_clip (81 H)

X

X

X

X

X

Inquire Font Name and Index,
vqLname (82H)

X

X

X

X

Inquire Current Font Information,
vqLfonLinfo (83H)

X

X

X

X

Inquire Justified Graphics Text.
vqt..justified (84H)

X

2-10

Camera

GEM VDI Reference Guide

Required Functions

Function Parameters
Calling routines pass arguments to the VOl functions In the form of
. input arrays. The VDI returns values from the functions in output
arrays. All arrays are zero-based and all array elements are WORD
integers. The following names are used to refer to the arrays in the
descriptions of the VDI functions:
•
•
•
•
•

control -- the control array
intin -- the array of integer input parameters
ptsin -- the array of input point coordinates
intout -- the array of integer output parameters
ptsout -- the array of output point coordinates

The format that the VDI functions use for parameters is shown below
under "Input Parameters" and "Output Parameters."
VDI function calls can be made from applications written in assembly
language or a high-level language. C language bindings are provided
with GEM VDI and are shown in the description of each function.
Assembly language routines address VDI functions according to their
opcodes and place the lONGWORD address of the five parameter
arrays in a ten-word data structure called a Parameter Block (PB).
Figure 2-1 shows the format qf the PB.

2-11

Function Parameters

GEM VDI Reference Guide

Contents
OFFSET

o

Address of the
. control array
(control)

4

Address of the
integer input array
(intin)

8

Address of the
input point coordinate array
(ptsin)

12

Address of the
integer output array
(into~t)

16

Figure 2-1.

Address of the
output point coordinate array
(ptsout)

Parameter Block Format

Prior to a VDI function call, the assembly language application:
• Loads the address of the PB and the VDI ID number in the
appropriate registers
• Invokes the processor-specific interrupt or TRAP
See Appendix E, "Processor-Specific Data," for the registers and
interrupts to be used for your system.

2-12

GEM VOl Reference Guide

Function Parameters

In the C language bindings, WORD declares a lS-bit integer type; BYTE
declares an a-bit integer type.

Input Parameters:
control(O)

Opcode number for the VOl function

control(l)

Number of vertices In the ptsin array
.Each vertex consists of an x,y coordinate pair, so the
length of the ptsin array is twice the number of
specified vertices.

control(3)

Length of integer array intin

control(S)

Subfunction identification number for a Generalized
Drawing Primitive (GOP) or Escape

control(S)

Device handle

control(7-n)

Function dependent information

intin

Array of integer input parameters

ptsin

Array of input point coordinates
Refer to the Extended Inquire function, vq_extnd
(SSH), in Section a for information on how to
determine the maximum size of the ptsin array.

Because coordinates may be converted by the GDOS, the calling
routine must ensure that control(l), the number of vertices, is correctly
set. If no x,y coordinates are being passed to the VOl by the calling
routine, control( 1) must be set to O. In addition, control(3), the input
integer count, must always be s~t.
The calling routine must set
control(3) to 0 if it is not passing integers to the VOl.

2-13

Function Parameters

GEM VOl Reference Guide

Output Parameters:

control(2)

Number of vertices in the ptsout array
Each vertex consists of an x,y coordinate pair, so the
length of the ptsout array is twice the number of
specified vertices.

control(4)

Length of integer array intout

control(6)

Device handle

control(7-n)

Function dependent information

intout

Array of integer output point parameters

ptsout

Array of output point coordinate data

The VOl always sets control(2), the output vertex count, and control(4),
the output integer count, correctly.
If it is not passing back
information in ptsout and intout, the VOl sets control(2) and control(4)
to O.
Running Applications Under the VOl

To use the graphics features provided by the VOl, you must ensure
that the following conditions are met:
1. Your program must conform to the VOl calling conventions to
access graphics primitives. This process involves making a call to
the GOOS and using the interrupt for your operating system.
Refer to Appendix E for the specific interrupts.
The parameter list provides information to the VOl and returns
information to the calling program.

2. Adequate stack space must be made available for VOl operations.
This space includes a buffer area for transforming points passed
to the VOl and some fixed overhead space.
"Memory
Requirements," below, describes how to determine the required
stack space.

2-14

GEM VOl Reference Guide

Running Applications Under the VOl

3. When your program is executed, the required device drivers must
be located in the current directory at the time the VOl was
invoked (typically IGEMSYS). The ASSIGN.SYS file must contain
the names of your device drivers and a device 10 number for each
device driver; refer to "The Assignment File, ASSIGN.SYS" in
Section 1.

4. After successfully compiling or assembling and linking your
program, you can run it like any other application, once the VOl is
active. You can enable VOl graphics with the GEMVOI command,
described below.
Enabling Graphics
Special commands let you enable graphics functions from the
command level of the operating system. Each command loads the
GOOS and any drivers declared resident in the ASSIGN.SYS file.
ASSIGN.SYS and the driver files must be located in the current
directory.
Note that any application to be invoked by a GEM command must be
located in the search path.
To load the VOl and start a non-GEM application that uses the VOl
(like a test program or debugger), enter the following command:

GEMVDI /FILENAME
Enter the following command to load the VOl and start a GEM
application:

GEMVDI FILENAME
To load the VOl and start the GEM Desktop .. application, enter:

GEMVDI

2-15

Running Applications Under the VOl

GEM VOl Reference Guide

Memory Requirements
To determine the amount of stack space required to run a given
graphics application, make the following calculation:
Open Workstation call = approximately 128 bytes
All other calls = ptsin size + 128 bytes + the overhead
requirements of the operating system
ptsin is the array of input point coordinates passed to the device
driver from the application program (two words for each point).
The stack requirement is the larger of the two resulting values. This
stack space must be available in the application program stack area.

2-16

GEM VOl Reference Guide

Running Applications Under the VOl

Sample C Language Graphics Program
Figure 2-2 depicts the output of the sample C language graphics
program contained in listing 2-1, below. To load the VOl and start
such a program use the
GEMVOI IFILENAME
command.

Figure 2-2.

Output from the Polyline Sample Program

2-17

Sample C Language Graphics Program

Listing 2-1.

GEM VOl Reference Guide

Sample C Language Program, Polyline

1* This program, sample.c, uses the VOl to draw
1* a simple picture and then wait for a single
1* key to be pressed before terminating.
1*
1* To compile sample.c:
1*
lcl sample
1*
Ic2 sample -v
1*
1*
To link sample.c:
1*
link tcs+sample+vdibind+vdiasm,sample,
1*
sample/map"
1*
1*
Note: Modify ASSIGN.SYS so that the screen
1*
driver is resident (Olr XXXXXXXX.SYS)
1*
1*
To run sample.c:
1*
gemvdi Isample.exe
1*

int
int
int
int
int

VOl Global Arrays

contrl[ll];
intin[80];'
ptsin[256];
intout[45];
ptsout[12];

int
int
int
int

Local Data Area
work in[ll];
work-out[57];
handle;
pxyarray[12];

int
int
int
char

max length;
echo mode;
echo-xy[2];
string[l];

1*

2-18

*/
*/
*/
*/
*/
*/
*/

*/
*/
*/
*/
*/
*/
*/
*/
*/

*/

*/

/* control inputs
/* max string length

1* polygon fill points
/* v opnwk output

1* Points out array
*1
1* Input for v opnwk

/* Return from-v opnwk
/* Returned handle
/* Points for Poly Line

*/
*/
*/
*/
*/
*/
*/
*/
*/

/* Maximum string length */
/* Mode for char echo
*/
1* String x,y
*/
/* String array
*/

GEM VOl Reference Guide

Sample C language Graphics Program

Listing 2-1. (Cont'd)

1* Called by TCS binding *1

MAIN( )
{

int

i-,

1* Loop variable

1* Clear work in array for the VDI
for (i;; 0; i < 11; i++)

work in[i] = 0;
work-in[O] = 1;
work-in[l] = 1;
work-in[2] = 1-,
work=in[lO] = 0;

1*
1*
1*
1*

Dev ID (01 = Screen)
Line type (Solid)
Line Color (Black)
Use NDe coordinates

*1
*1
*1
*1
*1
*1

v_opnwk(work_in, &handle, work_out);
pxyarray[O]
pxyarray[l]
pxyarray[2]
pxyarray[3]
pxyarray[4]
pxyarray[5]
pxyarray[6]
pxyarray[7]
pxyarray[8]
pxyarray[9]
pxyarray[10]
pxyarray[11]

=

12000;

= 12000;

1* v_pline vertices *1

12000;
20000;
14000;
24000;
16000;
= 20000;
= 16000;
= 12000;
= 12000;
= 12000;
=

=
=
=
=

1* Draw the polyline

*/

v_pline(handle, 6, pxyarray);

2-19

Sample C language Graphics Program

GEM VOl Reference Guide

Listing 2-1. (Cont'd)

1* Length of the input string
max_length

=

echo mode
echo-xy[O]
echo=xy[.l]

= 0;
= 12000;
= 12000;

*/

sizeof(string)i

1* Do not echo
1* x,y coordinates
1* for string input

*/
*/
*/

vrq string(handle, max length, echo mode,
echo_xy, &string);
}

v_clswk(handle);

1* Close workstation

End of Section 2

2-20

*/

SECTION 3
Control Functions

The VDI control functions initialize and close the graphics workstation,
set workstation defaults, load and unload fonts, and enable or disable
rectangle clipping.
Table 3-1 lists and briefly describes each of the VDI control functions.
Table 3-1.
Function
v_opnwk (lH)
v _clswk (2H)
v _clrwk (3H)
v_updwk (4H)
v_opnvwk (64H)
v _clsvwk (65H)
vst_load_fonts (77H)
vst_unload_fonts (78H)
vs_clip (81 H)

VDI Control Functions

Page

Purpose

3-2
3-12
3-13
3-14
3-15
3-17
3-18
3-19
3-20

Open a workstation
Close a workstation
Clear a workstation screen
Execute all pending commands
Open a virtual workstation
Close a virtual workstation
Load fonts named in ASSIGN.SYS
Remove device's external fonts
Enable/disable rectangle clipping

Workstation default attributes are listed in the description of v _opnwk
(lH).

3-1

V_OPNWK (1 H)

GEM VOl Reference Guide

V_OPNWK (1H)
The Open Workstation function loads a graphics device driver and
returns a device handle and information that describes the device's
general characteristics. v_opnwk initializes the device's line, color,
marker, text, and fill style attribute values as specified in the input
arguments.
See Section 5 for detailed information about attribute
values.
Workstation default values are listed below in Table 3-2.
Table 3-3 lists the default color table index values.
If the specified device cannot be opened, v_opnwk returns a device
handle value of zero. If the, specified device is a screen, v_opnwk
clears it and sets it to graphics mode; you do not need to call v_clrwrk
(3H).

When v opnwk is called to open a metafile, it initializes the file's
buffer, writes the metafile header to the buffer, and returns the
standard workstation information as described under "Output
Arguments," below. See Appendix B for a description of the metafile
and its header.
Use vq_extnd (66H) to obtain additional device-specific information.

3-2

V_OPNWK (1 H)

GEM VOl Reference Guide
Table 3-2.

Workstation Default Attribute Values
Default Value

VOl Function

Character height

Nominal character height

vst_height (CH)

Character baseline
rotation

o degrees

vst_rotation (DH)

Text alignment

Left baseline

vst_allgnment (27H)

Text effect

Normal intensity

vst_effects (6AH)

Line width

Nominal line width

vsl_width (10H)

Marker height

Nominal marker height

vsm_height (13H)

Polyline end style

Squared

vsLends (6CH)

Writing mode

Replace

vswr_mode (20H)

Input mode

Request for all devices

vsin_mode (21 H)

Fill perimeter
visibility

Visible

vsf_perimeter (68H)

User-defined
line style

Solid

vsl_udsty (71H)

User-defined
fill pattern

DRI Logo

vsf_udpat (70H)

Cursor

Hidden

v_show_c (7AH)
and v_hide_c (7BH)

Clipping

Disabled

vs_clip (81 H)

Attribute

rotation

Use the VDI functions referenced in Table 3-2 to change the attribute
values.

3-3

GEM VOl Reference Guide

Table 3-3.
Index

0'"
1

2
3
4
5
6

7

8
9
. 10

11
12
13

14
15
16 - n
...

Default Color Table Index Values
Color
White Default indices for monochrome
Black
screens and printer/plotters
Red
Green
Blue
Cyan
Yellow
Magenta
White
Black
Dark Red
Dark Green
Dark Blue
Dark Cyan
Dark Yellow
Dark Magenta
Device Dependent

Index 0 is defined as the current background color.

Note that devices with less than 16 colors use the first "n" index
entries, where "n" is the number of available colors.

3-4

GEM VOl Reference Guide
Input Arguments
workjn[O]

Device 10 number, defined as follows:
01
11
21
31
41
51

-

10
20
30
40
50
60

Screen
Plotter
Printer
Metafile
Camera
Tablet

workjn[l]

Une type value, see vsCtype (FH) in Section 5 for
information on line types.

workjn[2]

Polyline color index value; See Table 3-3 on page
3-4 for a list of the default color index values.
vsl_color (11H) may also be used to set the the
polyline color index (see Section 5, "Attribute
Functions").
Note: The VOl defaults to color index 1 if the index
values
you
specify
in
work_inl2],
workjn[4],
workjn[6], and workjn[9] are out of range.

workjn[3]

Polymarker' type, see vsm_type (12H) in Section 5 for
information on setting the polymarker type.

workjn[4]

Polymarker color index -- see Table 3-3 on page
3-4. Use vsm_color (14H), described in Section 5, to
set the polymarker color index.

workjn[5]

Text font, see vst_font (15H) in Section 5 and
vqt_name (82H) in Section 8 for information on face
selection.

workjn[6]

Text color index -- see Table 3-3. vst_color (16H),
described in Section 5, should be used to set the text
color index after the workstation has been opened.

workjn[7]

Fill interior style, see vsfjnterior (17H) and vsf_style
(18H) in Section 5 for information on fill interior style
selection.

3-5

V_OPNWK (lH)

GEM VDI Reference Guide

work_in[8]

Fill style index -- based on the fill interior style. For
the pattern style, an index of 1 maps to the lowest
intensity pattern on the device; if the fill interior style
is solid, any index value produces an opaque fill style.

workjn[9]

Fill color index -- see Table 3-3. vsf_color (19H),
described in Section 5, should be used to set the fill
color index after the workstation has been opened.

work_in[lO]

NDC to RC transformation flag:

o
1
2

Map full NDC space to full RC space
Reserved
Use RC system

Output Arguments
Note: See Table 3-2, above, for the default values of the attributes
not included in the input arguments.
handle

Device handle, used in all subsequent. VOl calls to
select this device

work_out[O]

Maximum addressable x-point on the display surface
in raster coordinates

work_out[l]

Maximum addressable y-point on the display surface
in raster raster coordinates

work_out[2]

Device Coordinate units flag:

o
1

3-6

Device produces precisely scaled image
Device does not produce a precisely scaled image

work_out[3]

Pixel width in microns

work_out[4]

Pixel height in microns

work_out[5]

Number of
character
continuous scaling

work_out[6]

Number of line types

heights;

zero

indicates

GEM VOl Reference Guide
work_out[7]

Number of line widths; zero indicates continuous
scaling

work_out[8]

Number of marker types

work_out[9]

Number of marker sizes; zero indicates continuous
scaling

work_out[10] Number of fonts; you must load a font before
sending output to devices that return zero, see
vst_load_fonts (77H) in this section
work_out[ll] Number of patterns
work_out[12] Number of hatch styles
work_out[13] Number of predefined colors (2 for monochrome)
work_out[14] Number of Gene"ralized Drawing Primitives (GOPs)

work_out[24] Sequential list of supported GOPs
primitive id numbers (-1 = end of list):
1
2
3
4
5
6
7
8
9
10

according

to

Bar -- v_bar (B-1H)
Arc -- v_arc (B-2H)
Pie slice -- v_pieslice (B-3H)
Circle -- v_circle (B-4H)
Ellipse -- v_ellipse (B-5H)
Elliptical arc -- v_ellarc (B-6H)
Elliptical pie -- v_ellpie (B-7H)
Rounded rectangle -- v_rbox (B-8H)
Filled rounded rectangle -- v_rfbox (B-9H)
Justified graphics text -- vJustified (B-AH)

3-7

GEM VOl Reference Guide
work_out[25]
to
work_out[34] SequentiQI list of GOP attributes:

o
1
2
3
4

Polyline
Polymarker
Text
Fill area
None

work_out[35] Set Color Representation, vs_color (EH), flag:

o
1

Unavailable
Available

work_out[36] Text Rotation, vst_rotation (OH), flag:

o
1

Unavailable
Available

work_out[37] Filled Area, v_fillarea (9H) flag:

o
1

Unavailable
Available

work_out[38] Cell Array, v_cellarray (AH), flag:

o
1

Unavailable
Available

work_out[39] Number of available colors; zero indicates continuous
color scaling, two indicates monochrome
work_out[40] Number of available locator devices:

o
1
2

3-8

None
Keyboard only
Kevboard and another locator

GEM VOl Reference Guide
work_out[41] Number of available valuator devices
work_out[42] Number of' available choice devices
work_out[43] Number Of available string devices:

o
1

None
Keyboard

work_out[44] Workstation device type:

o
1
2
3
4

Output only
Input only
Input/output
Reserved
Metafile-output

work_out[45] Minimum
character
coordinates

width

in

x-axis

NOC/RC

work_out[46] Minimum
character
coordinates

height

in

y-axis

NOC/RC

work_out[47] Maximum
character
coordinates

width

in

x-axis

NOC/RC

work_out[48] Maximum character height in y-axis coordinates
Note that minimum and maximum character height
values do not include the interline and intercharacter
spacing.

3-9

V_OPNWK (1 H)

GEM VDI Reference Guide

work_out[49] Minimum line width in x-axis NDC/RC coordinates
work_out[50] 0
work_out[51] Maximum line width in x-axis NDC/RC coordinates
work_out[52] 0
work_out[53] Minimum marker width in x-axis NDC/RC coordinates
work_out[54] Minimum marker height in device's v-axis NDC/RC
coordinates
work_out[55] Maximum marker width in x-axis NDC/RC coordinates
work_out[56] Maximum
marker
coordinates

3-10

height

in

v-axis

NDC/RC

GEM VOl Reference Guide
Sample Call to C Language Binding
WORD
WORD

v_opnwk();
work_in[ll], work_out[57], handle;

Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(5)
control(S)

Input

=

1
= 0
= S
11
::: 45
= 0
= handle

=

intin(O)
intin(ll
intin(2)
intin(3)
intin(4)
intin(5)
intin(S)
intin(7)

Output

= work in(O)

= work-in(l)
= work-in(2)
= work-in(3)
= work-in(4)
= work-in(5)
= work-in(S)
= work=in(7)

intin(10) = work....in(10]

intout(O)
intout( 1)
intout(2)
intout(3)
intout(4)
intout(5)
intout(S)
intout(7)

= work oudO]
= work- oudll
= work- oud2]
= work- oud3)
::: work- outl4)
= work- outl5]
= work-oudS]
= work=oud7]

intout(10) = worLoutl10]

intout(44) ::: work.....outl44]
ptsout(O) = work.....outl45]

ptsout(ll) = worLoutl5S)

3-11

GEM VOl Reference Guide
V _CLSWK (2H)
This function closes the workstation previously opened with v_opnwk
(1 H). All access to the device whose handle is specified in v_clswk is
denied following the call. v_clswk performs the following close events
for the indicated device type:
Screen
Plotter
Printer
Metafile

Selects the alpha device
Performs an update
Performs an update
Writes an end-of-file marker to the buffer, flushes it,
and 'closes the file
Performs an update

Camera

Note:
Use v_clsvwk (65H) to close all virtual workstations before
calling v_clswk.
Input Arguments
handle

Device handle returned from v_opnwk (lH)

Sample Call to C Language Binding
WORD
WORD

v _clswk();
handle;

v_clswk(handle);
Parameter Block Binding
Control
control(O) = 2
control(l) = 0
control(2) = 0
control(3) = 0
control(4) = 0
control(5) = 0
control(S) = handle

3-12

Input

Output

GEM VOl Reference Guide
V _CLRWK (3H)

This function clears the workstation by performing the following
events for each device type:
Screen

v_clrwk clears the screen and sets it to the
background color. The background color is defined
as index zero in the color table (see Section 5).

Plotter

v_clrwk clears the buffer.

Printer

v_clrwk clears the buffer and issues a form feed.
Use v_form_adv (5-14H) to issue a form feed without
clearing the buffer (see Section 9).

Metafile

v_clrwk writes a metafile item to the metafile buffer.

Camera

v_clrwk clears the device and sets it to the currently
selected background color.

Note: You do not need to call v_clrwk after calling v_opnwk (lH).
v_opnwk clears the device after opening the workstation.
Input Arguments
handle

Device handle

Sample Call to C Language Binding
WORD
WORD

v_clrwk();
handle;

v_clrwk(handle);
Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

Output

= 3
= 0
= 0
=0
= 0
=0
= handle

3-13

GEM VDI Reference Guide
V _UPDWK (4H)

The Update Workstation function immediately executes the graphics
commands currently stored in the specified device's buffer.
Note:
You must use v_updwk to initiate printer output; however,
v_updwk does not perform a form feed command. Use v_clrwk (3H) or
v_form_adv (5-14H) to perform a form feed. v_from_adv is described
in Section 9, "Escape Functions."
If the specified device is a metafile, v_updwk writes a metafile item to
the metafile buffer.
Because they execute graphics commands upon request, v_updwk does
not affect screens.
Input Arguments
handle

Device handle

Sample Call to C Language Binding
WORD
WORD

v_updwk();'
handle;

v_updwk(handle);
Parameter Block Binding
Input

Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(S)
control(6)

3-14

= 4
= 0
0
= 0
=0 •
= 0
= handle

=

Output

GEM VOl Reference Guide

V_OPNVWK (64H)

V_OPNVWK (64H)
Open Virtual Workstation opens and initializes multiple virtual screens
on a single physical workstation. The physical workstation, whose
device handle is specified in the v_opnvwk control array, must be a
screen device previously opened with v_opnwk (lH). v opnvwk returns
a device handle for the virtual workstation in the control array. If the
virtual workstation cannot be opened, v_opnvwk returns a device
handle value of zero.
v_opnvwk gives each virtual workstation access to to the entire
screen. The VOl maintains each workstation's attributes separately.
example,
each
virtual
workstation
may
have
different
For
transformation modes and clipping rectangles.
v_opvwk input and output arguments are the same as those for
v_opnwk (lH); v_opnwk is described on page 3-2.
Note: The VOl has no mechanism to control input device contention
between several virtual workstations.
It is the application's
responsibility to manage its use of the VOl input functions.
Applications with multiple virtual workstations should not access input
devices in sample mode. See Section 7, "Input Functions," for more
information.
Input Arguments
handle

Screen device handle returned from v_opnwk (lH),
specified in control array -- this is the root device
handle
See page 3-5 for the other input arguments.

Output Arguments
See page 3-6

3-15

V_OPNVWK (64H)

GEM VOl Reference Guide

Sample Call to C Languag!LBinding
WORO
WORO

v_opnvwk();
workjn[11], work_oudS7], handle;

Parameter Block Binding
Control

Input

control(O) = 100
control( 1) = 0
control(2) = 6
control(3) = 11
control(4) = 45
control(5) = 0
control(6) = handle

intin(O)
intin(1)
intin(2)
intin(3)
intin(4)
intin(5)
intin(6)
intin(])

Output
= work infO)
= work-in( 1)
= work-in(2)
= work-in(3)
= work-in(4)
work-in(5)
= work-in(6)
= work-in(7)

=

intin(10)

= work_in(10)

intout(O)
intout(1)
intout(2)
intout(3)
intout(4)
intout(5)
intout(6)
intout(7)

= work outlO)
= work-out[l)
work- outl2)
= work- outl3)
= work-out(4)
= work - outl5)
= work-outl6)
= work=out(7)

=

intout(10) = workoutll0)

intout(44)

= work_outl44)

ptsout(O) = work_outl451

ptsout(l1)

= work_outl56)

Important:
Control(6) is both an input and an output argument.
v_opnvwk returns the device handle for the virtual workstation in
control(6).

3-16

GEM VDI Reference Guide
V _CLSVWK (65H)

This function closes a virtual workstation prevlouslV opened with
v_opnvwk (64H).
The virtual workstation handle specified in the
v_clsvwk call is recvcled.
Input Arguments

handle

Device handle returned from v_opnvwk (64H)

Sample Call to C Language Binding

WORD
WORD

v_clsvwk();
handle;

v_clsvwk(handle);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

Output

= 101
= 0
= 0
= 0
= 0
= 0
= handle

3-17

GEM VDI Reference Guide
VST_LOAD_FONTS (77H)
The ASSIGN.SYS file associates external fonts with a particular device
driver. This function loads the driver's external fonts into memory,
making them available to the calling program, and returns the number
of additional font identifiers.
If the specified device's external fonts were previously loaded, or
ASSIGN.SYS does not associate any font files with the driver,
vstJoad_fonts returns zero.
Note: You do not need to call vstJoad_fonts if the driver's default
system fonts are sufficient.
Input Arguments
handle

Device handle

select

Reserved, must be zero

Output Arguments
additional

Number of additional font identifiers

Sample Call to C Language Bindil!!l
WORD
WORD

vstJoad_fonts();
.
additional, handle, select; ,

additional = vstJoad_fonts(handle, select);
Parameter Block Binding
Control
controllO)
controll 1)
control(2)
control(3)
control(4)
controllS)
control(6)

3-18

= 119
=
=

=
=
=
=

0
0
1
1
0
handle

Input

Output

intin(O) = select

intout(O) = additional

GEM VOl Reference Guide

I

This function dissociates the external fonts previously loaded by
vst_load_fonts from the specified device. If possible, vst_unload_fonts
frees up the memory occupied by the driver's external fonts.
When the external fonts are shared by virtual workstations with the
same root device handle, they are not unloaded from memory until
one of the following conditions is met:
• all workstations that share the fonts are closed, see v_clsvwk
(65H)
• this call has been made for all workstations that share the font
The driver's default system fonts remain loaded and available.
Input Arguments

handle

Device handle

select

Reserved for future use

Sample Call to C Language Binding

WORD
WORD

vst_unload_fonts();
handle, select;

v_unload_fonts(handle, select);
Parameter Block Binding
Control

Input

controllO) = 120
controll 1) = 0
control(2) = 0
control(3) = 1
control(4) = 0
controllS) = 0
control(6) = handle

intin(O)

Output

= select

3-19

GEM VDI Reference Guide
VS_CLlP (81 H)
vs_clip enables or disables the clipping of all output primitives by the
VDI. Clipping refers to confining output to a rectangle defined within
the device's display surface. Input arguments pxarray[O) to pxarray[3]
specify the clipping rectangle's coordinates according to the current
coordinate system (NDC or RC units). vq_extnd (66H), described in
Section 8, indicates if clipping is currently enabled on the device
(work_out[19l) and returns the coordinates of clipping rectangle in
work_out(45) to work_out[48].
By default, clipping is disabled when the workstation is opened.
If the specified device is a metafile, v_clip writes a metafile item to the
metafile buffer.
Input Arguments
handle

Device handle

clip_flag

Clipping flag:

o
1

Disable clipping
Enable clipping

pxyarray[O]

x-coordinate of corner of clipping rectangle

pxyarray[l1

y-coordinate of corner of clipping rectangle

pxyarray[2]

x-coordinate of corner diagonal to pxarray[O)

pxyarray[3]

y-coordinate of corner diagonal to pxarray[l]

Sample Call to C Language Binding
WORD
WORD

vs_clip();
handle, clip_flag, pxyarray[4);

vs_clip(handle, clip_flag, pxyarray);

3-20

GEM VOl Reference Guide
Parameter Block Binding
Control
control(O)
control( 1)
controJ(2)
control(3)
control(4)
control(5)
controJ(6)

Input

= 129
= 2
= 0
= 1
= 0
= 0
= handle

Output

intin(O) = clip_flag
ptsin(O) = pxarrav[O)
ptsin(l) = pxarrav[l)
ptsin(2) = pxarrav[2)
ptsin(3) = pxarrav(3)

End of Section 3

3-21

SECTION 4
Output Functions

The VOl output functions produce graphics
polylines, circles, and rounded rectangles.

primitives

such

as

Table 4-1 lists and briefly describes the output functions.
Output
functions use the current line, marker, fill area, or text attributes.
These attributes, the output functions that use them, and the attribute
functions that control them are listed in Tables 4-2 through 4-5.
Table 4-1.

VOl Output Functions

Function

Page

Purpose

v_pline (6H)
v_pmarker (7H)
v _gtext (8H)
v _fillarea (9H)
v_cella rray (AH)'"
v_bar (B-1H)
v_arc (B-2H)
v_pieslice (B-3H)
v_circle (B-4H)
v_ellipse (B-5H)
v_ellarc (B-6H)
v_ellpie (B-7H)
v_rbox (B-8H)
v_rlbox (B-9H)
vjustified (B-AH)
v_contourfill {67H)"
vr_recti (72H)

4-4
4-6
4-8
4-10
4-12
4-16
4-17
4-19
4-21
4-22
4-23
4-24
4-25
4-26
4-27
4-29
4-30

Draw a line between specified points
Draw markers at specified points
Write a text string
Fill a polygon specified by points
Draw a cell array
Draw 'a filled rectangle
Draw a circular arc
Draw a filled circular arc
Draw a filled circle
Draw a filled ellipse
Draw an elliptical arc
Draw a filled elliptical arc
Draw a rounded rectangle
Draw a filled, rounded rectangle
Display justified text
Seed fill a specified area
Fill a specified rectangle without perimeter

"These functions are either not required and may not be available on
all devices, or contain unrequired options; see "Required Functions" in
Section 2.

4-1

4.0

GEM VOl Reference Guide
Table 4-2.

Output Functions and Line Attributes

Output Functions That Use Line Attributes

v _ellarc (B-6H)
Line Attributes:
Line type
Line width
Line color
Line end style

Table 4-3.
Marker Attributes
Marker type
Marker height
Marker color

Attribute Functions:
vsLtype (FH)
vsl_width (10H)
vsl_color (11 H)
vsLends (6CH)

Marker Attributes Used by v_pmarker
Attribute Functions
vsm_type (12H)
vsm_height (13H)
vsm:..color (14H)

Note: The attribute functions are described in Section 5.

4-2

4.0

GEM VOl Reference Guide
Table 4-4.

Output Functions and Fill Area Attributes

Output Functions That Use Fill Area Attributes
v_fillarea (9H)
v_circle (B-4H)
v_rfbox (B-9H)

v_bar (B-1H)
v_ellipse (B-5H)
v_contourfill (67H)

Fill Area Attributes:
Fill interior style
Fill style index
Fill area color
Fill perimeter

v_pieslice (B-3H)
v_ellpie (B-71-1)
vr_recfl (72H)

Attribute Functions:
vsf_interior (17H)
vsf_style (18H)
vSf_color (19H)
vsf_perimeter (68H)

"vr_recfl always operates with the fill perimeter disabled.
Table 4-5.

Output Functions and Text Attributes

Output Functions That Use Text Attributes
v _gtext (8H)

vJustifled (B-AH)

Text Attributes:
Character height
Baseline vector
Text face
Text color
Text alignment
Text effect
Cell height, points

Attribute Functions:
vst_height (CH)
vst_rotation (OH)
vst_font (15H)
vst_color (16H)
vst_alignment (27H)
vst_effects (6AH)
vst_point (6BH)

Note: The output functions operate according to the current writing
mode as controlled by vswr_mode (20H). vswr _mode is described in
Section 5. vs_clip (81 H), described in Section 3, defines the area on
the screen where an output function is allowed to draw.

4-3

GEM VOl Reference Guide
V _PLlNE (6H)

This function displays a polyline on the graphics device. The line's
starting point is specified in the first coordinate pair (xy[O] and xy[ 1)).
v,Jlline draws the line between subsequent points as specified in the
remaining input arguments according to the current coordinate system
(NDC or RC units).
v,Jlline displays a zero length line (degenerate case) as a point and
does not display a single coordinate pair.
Use vq_extnd (66H),
described in Section 8, "Inquire Functions," to obtain the maximum
number of input vertices for the specified device.
v,Jlline produces lines according to the line attributes listed in Table
4-2, above, and the current writing mode. You can use vql_attributes
(23H) to obtain the current settings of the line attributes.

Input Arguments
handle

Device handle

count

Number of input vertices (n)

xy[O]

x-coordinate of first point

xy[l]

v-coordinate of first point

xy[2]

x-coordinate of second point

xy[3]

v-coordinate of second point

xy[2*count-2]

x-coordinate of last point

xy[2*count-l ]

v-coordinate of last point

4-4

GEM VDI Reference Guide
Sample Call to C Language Binding

WORD
WORD

v_pline();
handle, count, xV[2

'If

.
count];

v_pline(handle, count, XV);
Parameter Block Binding
Control
control(O)
control(1)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

= 6

= count

=

0
= 0
= 0
0
= handle

ptsin(O) = XV[O]
ptsin(l) = xV[l]
ptsin(2) = xV[2]
ptsin(3) = xV[3]

=

Ptsin(2"count-2) = xV[2"count-2]
ptsin(2"count-l) = xV[2"count-l]

4-5

GEM VOl Reference Guide
V _PMARKER (7H)

This function draws markers at the points specified in the input
argument coordinates (in NDC or RC units).
v_pmarker produces
markers according to the attributes listed in Table 4-3 and the current
writing mode. vqm_attributes (24H), described in Section 8, returns the
current settings of these attributes.
Use vq_extnd (66H), to obtain the maximum number of polvmarker
vertices for the specified device.
Input Arguments
handle

Device handle

count

Number of input vertices (n)

xv[O]

x-coordinate of first marker

xV[l]

v-coordinate of first marker

xV[2]

x-coordinate of second marker

xV[3]

v-coordinate of second marker

xV[2*count-2]

x-coordinate' of last marker

xV[2*count-l ]

v-coordinate of last marker

Sample Call to C Language Binding
WORD
WORD

v_marker();
handle, count, xV[2 * count]

v_pmarker(handle, count, XV);

4-6

GEM VDI Reference Guide
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

= 7
= count
= 0
= 0
=0
=0
= handle

ptsin(O)
ptsin(l)
ptsin(2)
ptsin(3)

= xvlO)
= xv(1)

= xvl2]
= xvl3]

ptsin(2"count-2)
ptsin(2"count-1)

= xV(2"count-2]
= xy(2"count-1]

4-7

GEM VOl Reference Guide
V_GTEXT (8H)

v-9text writes a text string to the display surface. The (x,y) position
specified by the calling routine is the alignment point of the text string
in units of the current coordinate system (NDC or RC).
The
vst_alignment function establishes the relationship between the string's
starting point and the specified x,y position (see in Section 5). See
Table 4-5, above, for other text attributes that affect the operation of
v-9text.
Note that vqt_attributes (26H) returns the current text attribute settings
(see Section 8, "Inquire Functions").
For the C language binding, the string input argument is byte-oriented
and must be null-terminated.
For the Parameter Block (assembly
language) binding, the string is word-oriented.
Any unsupported
character is mapped to a question mark (?), the symbol for an
undefined character.
work_out[15] of vq_extnd (66H) returns the
maximum number of characters (size of intin array) allowed in the text
string. vq_extnd is described in Section 8.
Be sure that the specified device has a font loaded before outputting
text. Printers and some other devices may not have a system font
available; if v_opnwk (1 H) returned zero in work_out[10] when the
device was opened, call vstJoad_fonts (77H) before v_gtext. v_opnwk
and vstJoad_fonts are described in Section 3, "Control Functions."
Input Arguments

4-8

handle

Device handle

x

x-coordinate of text string's alignment point

y

v-coordinate of text string's alignment point

string

ASCII character string

GEM VOl Reference Guide
Sample Call to C Lanm!!98 Binding
WORD
WORD
BYTE·

v_gtext();
handle, x, Y;
*string;

v_gtext(handle, x, Y, string);
Parameter Block Binding
Control

Input

Output

controllO) = 8
cantrall 1) = 1
control(2) = 0
control(3) = number of
chars in string
control(4) = 0
control(5) = 0
control(6) = handle

intin = string (in 16-bit
characters)
ptsin(O)

= x\

ptsin(1)

=y

4-9

V_FllLAREA (9H)

GEM VDI Reference Guide

V _FILLAREA (9H)

The v_fillarea function fills the polygon defined by the input argument
coordinates (in NDC or RC units) according to the fill area attributes
listed in Table 4-4 and the writing mode. Use vqf_attributes (25H) to
obtain the current settings of the attributes that affect the operation of
this function (see Section 8, "Inquire Functions").
When the fill perimeter attribute is enabled (visibile), v_fillarea outlines
.the polygon with a solid line of the current fill area color. If the
specified device does not have fill area capability, the polygon is
outlined with the current fill area color.

A polygon with zero area (degenerate case) is displayed as a dot only
when the fill perimeter attribute is enabled.
If the fill perimeter
attribute is disabled, a dot is not displayed for the degenerate case.
v_fillarea does not display a polygon with only one vertex. The device
driver ensures that the fill area is closed by connecting the first point
to the last point.
work_out[14] of vq_extnd (66H) returns the maximum number of input
vertices you may use to define a polygon.
Input Arguments

handle

Device handle

count

Number of input vertices (n)

xv[O]

x-coordinate of first point

xV[l]

v-coordinate of first point

xV[2]

x-coordinate of second point

xV[3]

v-coordinate of second point

xV[2*count-2]

x-coordinate of last point

4-10

V_FILLAREA (9H)

GEM VDI Reference Guide
xv[2*count-11

v-coordinate of last point

Sample Call to C Language Bindil'!9

WORD
WORD

v_fillarea();
handle, count, xV[2* count];

v_fillarea(handle, count, XV);
Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(S)
control(S)

Input

= 9
= count
= 0
=0
= 0
0
= handle

=

ptsin(O)
xylOl
ptsin(l) = xy[l)
ptsin(2) = xy(2)
ptsin(3) = xy(3)

=

ptsin(2"count-2) = xy[2"count-2)
ptsin(2"count-l) = xy[2"count-l)

4-11

GEM VOl Reference Guide
V_CELLARRAV (AH)

This function draws the rectangular array defined by the pxyarray input
coordinates (in NDC or RC units) and divides it into color cells of equal
size' and shape based on the length and number of each row in the
color index array. The color index array determines the color for each
cell; it is composed of indices selected from the color table (see
Section 5).
Each cell of the rectangle is mapped to pixels on the display surface.

A pixel takes the color of the cell that covers its center.
If the specified device does not support cell arrays, the rectangle is
outlined with a solid line in the current line color and line width.

Use the vq_cellarray (1 BH) function to obtain information about a
previously defined cell array -- see Section 8, "Inquire Functions."
Note:
v_cellarray may not be supported by all devices drivers.
work_out[38] of v_opnwk (lH) returns zero if the device does not
provide this function.
Input Arguments

handle

Device handle

row_length

Length of each row in color index array (size as
declared in a high-level language)

el_used

Number of elements used in each row (number of
columns) of color index array

num_rows

Number of rows in color index array

wrt_mode

Pixel operation (write mode) to be performed:
1

2
3
4

Replace
Transparent
XOR
Reverse transparent

See vswr_mode (20Hl in Section 5 for a description
of each mode.

4-12

GEM VDI Reference Guide
colarrav[O]

Color index array, stored bV row

colarrav[n]

last row of color index
The size of the array equals (num_rows * el_used).

pxvarrav[O]

x-coordinate of rectangle's lower left corner

pxvarrav[ 1]

v-coordinate of rectangle's lower left corner

pxvarrav[2]

x-coordinate of rectangle's upper right corner

pxvarrav[3]

v-coordinate of rectangle's upper right corner

Sample Call to C Language Binding

WORD
WORD

v cellarrav();
handle, pxvarrav[4], row length, el used, num rows, wrt mode,
colarrav[num_rows*el_used];
-

v_cellarrav(handle, pxvarrav, row length, el used, num rows,
wrt_mode, colarrav)
Parameter Block Binding
Control

Output

Input

control(O)
control( 1)
control(2)
control(3)
control(4)
control(S)
control(S)
control(7)
control(8)
control(9)
control( 10)

.

= 10
2
0
n
0
0
handle
= row_length
= eLused
= nurn_rows
= wrLrnode

=

intin(O) = colarray[O)

intin(n)

= colarray[n)

ptsin(O) = pxyarray(O)
ptsin(1) = pxyarray[lI
ptsin(2) = pxyarray(2)
ptsin(3) = pxyarray(3)

4-13

V_CEllARRA Y (AH)

GEM VOl Reference Guide

Generalized Drawing Primitives
The Generalized Drawing Primitives (GDPs) produce special graphics
elements such as arcs, circles, and ellipses.
All GDPs share the same opcode; however, input and output
arguments and the arrays are primitive-dependent. The calling routine
specifies the function to be performed according to the primitive's 10
number, which is contained in control(5). The primitive 10 numbers are
listed below:

1
2
3

4
5
6
7
8
9

10

4-14

Bar -- v_bar
Arc -- v_arc
Pie slice -- v_pieslice
Circle -- v_circle
Ellipse -- v_ellipse
Elliptical arc -- v_ellarc
Elliptical pie -- v _ellpie
Rounded rectangle -- v_rbox
Filled rounded rectangle -- v_rfbox
Justified graphics text -- vjustified

GEM VOl Reference Guide

Generalized Drawing Primitives

GOP Angle Specifications
All GOP input angle specifications must be in tenths of degrees. 0
degrees is 90 degrees to the right of vertical. As shown in Figure 4-1,
values increase in the counterclockwise direction. Arcs are drawn
counterclockwise.
All radius arguments, except for v_ellipse (B-5H) and v_ellarc (B-6H),
specify an extent (distance) In x-axis units. The v_ellipse and v_ellarc
functions use both x and y axis units.

90

180+0
270

Figure 4-1.

GOP Angle Specification

Note that all GOP coordinates are specified in units of the current
coordinate system (NOC or RC).
Descriptions of the individual GOP functions follow.

4-15

GEM VOl Reference Guide
V_BAR (B-1H)

This function draws a rectangle using the current writing mode and fill
area attributes. These attributes are listed in Table 4-4, above; use
the vqf_attributes function (25H) to obtain their current settings.
Input Arguments

pxyarray[O]

x-coordinate of corner of bar

pxyarray[l]

v-coordinate of corner of bar

pxyarray[2]

x-coordinate of corner diagonal to pxyarray[O]

pxyarray[3]

v-coordinate of corner diagonal to pxyarray[l]

Sample Call to C Language Binding

WORD
WORD

v_bar();
handle, pxyarray[4];

v_bar(handle, pxyarray);
Parameter Block Binding
Control
control(O)
control(1)
control(2)
control(3)
control(4)
control(S)
control(6)

4-16

Input

= 11
2
= 0
= 0
= 0
= 1
= handle

=

ptsin(O) = pxyarray[O)
ptsin(1) = pxyarray( 1 )
ptsin(2) = pxyarray(2)
ptsin(3) = pxyarray(3)

Output

GEM VOl Reference Guide

V...ARC (B-2 H)

V_ARC (B-2H)

v_arc draws an arc using the .current writing mode and polyline
attributes.
These attributes are listed in Table 4-2, above; use
vqCattributes (23H) to obtain their current settings.
Arcs are defined for v_arc bV the beginning and ending angles, center
point (x- and v-coordinates), and the length of the radius as measured
on the x axis.
Input Arguments
handle

Device handle

begang

Beginning angle in tenths of degrees, (0-3600)

endang

Ending angle in tenths of degrees, (0-3600)

x

x-coordinate of arc's center point

v

v-coordinate of arc's center point

radius

length of arc's radius in x-axis units

Sample Call to C Language Binding
WORD
WORD

v_arc();
handle, x, V, radius, begang, endang;

v_arc(handle, x, v, radius, begang, endang);

4-17

GEM VOl Reference Guide

V -ARC (B- 2H)

Parameter Block Bindinll
Control

Input

control(O) = 11
control( 1) = 4
control(2) = 0
control(3) = 2
control(4) = 0
contrailS) = 2
contrailS) = handle

intin(O) = begang
intin(1) = endang

4-18

ptsin(O)
ptsin(1)
ptsin(2)
ptsin(3)
ptsin(4)
ptsin(S)
ptsin(S)
ptsin(7)

Output

= )(

=y
= 0
=0
=0
= 0
radius
= 0

=

GEM VDI Reference Guide
V _PIES LICE (B-3H)

This function draws a pie slice using the current writing mode and fill
area attributes. Table 4-4, above, lists the fill area attributes. Use the
vqf_attributes function (25H) to obtain the current attribute settings.
Specifv the pie slice bV its beginning and ending angles, center point
(x- and v-coordinates), and the length of its radius, measured on the x
axis.
v_pieslice draws the pieslice counter-clockwise from the
beginning angle to the end angle.
Input Arguments

handle

Device handle

begang

Beginning angle in tenths of degrees, (0-3600)

endang

Ending angle in tenths of degrees, (0-3600)

x'

x-coordinate of center point of pie slice

v

v-coordinate of center point of pie slice

radius

length of radius of pie slice in x-axis units

Sample Call to C Language Binding .

WORD
WORD

v_pieslice();
handle, x, V, radius, begang, endang;

v_pieslice(handle, x, V, radius, begang, endang);

4-19

GEM VOl Reference Guide

Parameter Block Binding
Control
control(O)
control(1)
control(2)
control(3)
control(4)
control(5)
control(6)

4-20

Input

= 11
= 4
= 0
= 2
= 0
= 3
= handle

Output

intin(O)
intin(l)

= begang

ptsin(O)
ptsin(1)
ptsin(2)
ptsin(3)
ptsin(4)
ptsin(5)
ptsin(6)
ptsin(7)

= x
= V
=0
=0
= 0
= 0
= radius
= 0

= endang

V_CIRCLE (B-4H)

GEM VDI Reference Guide
V_CIRCLE (B-4H)

This function draws a circle using the current writing mode and fill
area attributes. These attributes are listed in Table 4-4, above; use
vqf_attributes (25H) to obtain their current settings.
Specify the circle bV the x- and v-coordinates of its center point and
the length of its radius as measured on the x-axis.
Input Arguments
handle

Device handle

x

x-coordinate of circle's center point

y

y-coordina!e of circle's center point

radius

Length circle's of radius in x-axis units

Sample Call to C Language Binding
WORD
WORD

v_circle();
handle, x, V, radius;

v_circle(handle, x, V, radius);
Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

= 11
3
= 0
= 0
= 0
= 4
= handle

=

Output

ptsin(O) = K
ptsin(l) = V
ptsin(2) = 0
ptsin(3) = 0
ptsin(4) = radius
ptsin(5) = 0

4-21

V_ELLIPSE (B-5H)

GEM VOl Reference Guide

V_ELLIPSE (B-5H)
This function draws an ellipse using the writing mode and fill area
attributes. These attributes are listed in Table 4-4. vqf_attributes
(25H) returns the current settings of the attributes that affect the
operation of v_ellipse.
An ellipse is defined for v_ellipse bV the x- and v-coordinates of the
ellipse's center pOint, the x-axis radius, and the v-axis radius.
Input Arguments
handle

Device handle

x

x-coordinate of ellipse's center point

v

v-coordinate of ellipse's center point

xradius

Radius in x-axis units

vradius

Radius in v-axis units

Sample Call to C Language Binding
WORD
WORD

v_ellipse();
handle, x, V, xradius, vradius;

v_ellipse(handle, x,

v, xradius,

vradius);

Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(5)
control(6)

4-22

Input

= 11

= 2
= 0
= 0
= 0
= 5
= handle

ptsin(O)
ptsin(1)
ptsin(2)
ptsin(3)

Output

= x
= V
= xradius
= vradius

V_ELLARC (B-6H)

GEM VOl Reference Guide
V _ELLARC (B-6H)

This function draws an elliptical arc. It uses the writing mode and line
attributes. The line attributes are listed in Table 4-2; use vql_attributes
(23H) to obtain their current -settings.
Define an elliptical arc for v_ellarc by specifying its beginning and
ending angles, the x- and v-coordinates of its center point, its x-axis
radius, and its y-axis radius.
Input Arguments
handle

Device handle

begang

Beginning angle in tenths of degrees, (0-3600)

endang

Ending angle in tenths of degrees, (0-3600)

x

x-coordinate of arc's center point

y

y-coordinate of arc's center point

xradius

Radius in x-axis units

yradius

Radius in v-axis units

Sample Call to C Language Binding
WORD
WORD

v_ellarc();
handle, x, y, xradius, vradius, begang, endang;

v_ellarc(handle, x, y, xradius, yradius, begang, endang);
Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

= 11
= 2
= 0
= 2
= 0
= 6
= handle

Output

intin(O) = begang
intin(1) = endang
ptsin(O)
ptsin(l)
ptsin(2)
ptsin(3)

=x
=V

= xradius
= vradius

4-23

V_ELLPIE (B-7H)

GEM VDI Reference Guide

V _ELLPIE (B-7H)
This function draws an elliptical pie segment using the writing mode
and fill area attributes.
Table 4-4 lists the fill attributes; use
vqf_attributes (25H) to obtain their current settings.
,Define the elliptical pie segment for v_ellpie by specifying its
beginning and ending angles, the x- and y-coordinates of its center
point, its x-axis radius, and its y-axis radius.
Input Arguments
handle

Device handle

begang

Beginning angle in tenths of degrees, (0-3600)

endang

Ending angle in tenths of degrees, (0-3600)

x

x-coordinate of arc's center point

y

y-coordinate of arc's center point

xradius

Radius in x-axis units

yradius

Radius in y-axis units

Sample Call to C Language Binding
WORD
WORD

v _ellpie();
handle, x, y, xradius, yradius, begang, endang;

v_ellpie(handle, x, y, xradius, yradius, begang, endang);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

4-24

Output

Input

=
=
=
=
=
=
=

11
2
0
2
0
7
handle

= begang

intin(O)
intin(l)

= endang

ptsin(O)
ptsin(1)
ptsin(2)
ptsin(3)

=
=
=
=

x
y
xradius
yradius

.

GEM VDI Reference Guide
V _RBOX (B-8H)

v_rbox draws a rectangle with rounded corners. This functions uses
the current writing mode and line attributes. See Table 4-2, above.
vql_attributes (23H) returns the current settings of the attributes that
affect v _rbox.
Define the rectangle bV specifying coordinates (NDC or RC units) for
two of its corners.
Input Arguments
Handle

device handle

xvarray[O]

x-coordinate of rectangle corner

xvarrav[l]

v-coordinate of rectangle corner

xvarray[2]

x-coordinate of corner diagonal to xvarray[O]

xvarrav[3]

v-coordinate of corner diagonal to xvarray[l]

Sample Call to C Language Binding
WORD
WORD

v _rbox();
handle, xvarray[4];

v_rbox(handle, xvarrav);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

= 11
= 2
= 0
= 0
= 0
= 8
= handle

Output

ptsin(O) = Kyarray[O)
ptsin(l) = Kyarray[l)
ptsin(2) = Kyarray(2)
ptsin(3) = Kyarray[31

4-25

V_RFBOX (B-9H)

GEM VDI Reference Guide

V_RFBOX (B-9H)

This function draws a filled rectangle with rounded corners. v_rfbox
uses the current writing mode and fill area attributes. Table 4-2,
above, lists the fill area attributes; use vqf_attributes (25H) to obtain
their current settings.
Define the rounded rectangle to be filled bV specifying the coordinates
(NDC or RC units) for two of its corners.
Input Arguments
Handle

device handle

xvarray[O]

x-coordinate of rectangle corner

xvarray[l]

v-coordinate of rectangle corner

xyarray[2]

x-coordinate of corner diagonal to xvarray[O]

xyarray[3]

v-coordinate of corner diagonal to xyarray[l]

Sample Call to C Language Binding
WORD
WORD

v _rfbox();
handle, xyarray[4];

v_rfbox(handle, xyarray);
Parameter Block Binding
Control
control(a)
control(1)
control(2)
control(3)
control(4)
control(S)
control(6)

4-26

Input

= 11
= 2
a
= a
= a
= 9
= handle

=

ptsin(a)
ptsin(l)
ptsin(2)
ptsin(3)

Output

=
=
=
=

xyarray(O)
xyarray(lJ
xyarray(2)
xyarray(3)

GEM VOl Reference Guide

V_JUSTIFIED (B-AH)

V_JUSTIFIED (B-AH)
This function writes and attempts to justify both the left and right
margins of a text string. The text string is justified according to the
alignment points, passed as input arguments x and y, and the
requested string length. x, y. and length are specified in units of the
current coordinate system (NDC or RC).
vJustified uses the current writing mode and text alignment attributes;
see Table 4-5. Use vqt_attributes (26H) to obtain the current settings
of the attributes that affect the operation of vJustified.
You can specify whether or not vJustified is to modify the inter-word
and/or inter-character spacing to match the requested length of the
text string with the word_space and char_space arguments.
For the C language binding, the string input argument is byte-oriented
and must be null-terminated.
For the Parameter Block (assembly
language) binding, the string is word-oriented.
Any unsupported
character is mapped to a question mark (1), the symbol for an
undefined character. vq_extnd (66H), described in Section 8, returns
the maximum number of characters (size of intin array) allowed in the
text string.
The vqtJustified function (84H), also described in Section 8, returns
the x- and y-axis offsets for each character in a text string given the
same input arguments as vJustified.
Be sure that the specified device has a font loaded before outputting
text. Printers and some other devices may not have a system font
available; if v_opnwk (lH) returned zero in work_outll01 when the
device was opened, call vstJoad_fonts (77H) before vJustified.
v_opnwk and vstJoad_fonts are described in Section 3, "Control
Functions."

4-27

V_JUSTIFIED (B-AH)

GEM VOl Reference Guide

Input Arguments
word_space

Word spacing flag:
zero
Do not modify inter-word spacing
nonzero Modify inter-word spacing

char_space

Character spacing flag:
zero
Do not modify inter-character spacing
nonzero Modify inter-character spacing

string

ASCII character string

x

x-coordinate of the text alignment point

y

y-coordinate of the text alignment point

length

Requested length of the string, in x-axis units

Sample Call to C Language Binding
WORD
WORD
BYTE

vjustified();
handle, x, y, length, word_space, WORD char_space;
string(n);

vjustified(handle, x, y, string, length, word _space, char_space);
, Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

= 11
=
=
=
=
=
=

2
0
2+n
0
10
handle

Output

intin(O) = word_space
intin( 1) = chacspace
intin(n+2) =" string(n)
ptsin(O) = x
ptsin(1) = V
ptsin(2) = length
ptsin(3)
0

=

Note: "n" is used here to represent the number of characters in the
string.

4-28

GEM VOl Reference Guide

V_CONTOURFlll (67H)

V _CONTOURFILL (67H)

This function is often referred to as "seed" or "flood" fill. It fills an
area using the current fill area attributes until it reaches either the
edge of the screen or a specified color. Table 4-4 lists the fill area
attributes; use vqf_attributes (25H) to obtain their current settings.
The center point of the area to be filled is specified in the x and y
arguments using units of the current coordinate system. The color
that defines the contour to be filled bV v_contourfill is specified as a
fill area color index value.
If this value is negative, v_contourfill
searches for any color other than the color of the seed point.
Note:
This function mav not be supported by all device drivers.
Check work_oud7] of vq_extnd (66H) to determine if the device has
seed fill capability.
Input Arguments
index

Color index that defines the contour

x

x-coordinate of starting point

v

v-coordinate of starting point

Sample Call to C Language Binding
WORD
WORD

v_contourfill();
handle, x, y, index;

v_contourfill(handle, x, V, index)
Parameter Block Binding
Control
control(O)
control(1)
control(2)
control(3)
control(4)
control(S)
control(S)

Input

= 103
= 1

intin(O) = index

=
=

ptsin(O) = x
ptsin(l) = V

0
1
= 0
= 0
= handle

Output

4-29

VR_RECFL (72H)

GEM VOl Reference Guide

VR_RECFL (72H)

vr_recfl fills a rectangle whose area is defined bV the pxvarrav
arguments in units of the current coordinate system (NDC or RC)
according to the fill area attributes. This function is similar to v_bar
(B-1 H) except that the fill perimeter attribute is not used. Regardless
of its current setting, vr_recfl operates with the fill perimeter attribute
disabled (invisibile).
The fill area attributes are listed in Table 4-4, above; vqf_attributes
(25H) returns their current settings.
Input Arguments·

pxvarrav[O]

x-coordinate of corner of rectangle

pxvarrav[l]

v-coordinate of corner of rectangle

pxvarrav[2]

x-coordinate of corner diagonal to pxvarrav[O]

pxvarrav[3]

v-coordinate of corner diagonal to pxvarrav[l]

Sample Call to C Language Binding

WORD
WORD

vr_recfl();
handle, pxvarrav[4];

v_recfl(handle, pxvarrav);
Parameter Block Binding
Control
control(O)
control(1)
controJ(2)
controJ(3)
control(4)
control(5)
control(S)

Input

= 114
= 2
= 0
= 0
= 0
= 0
= handle

Output

ptsin(O) = pxyarray[O)
ptsin(1) = pxyarray(1)
ptsin(2)
pxyarray(2)
ptsin(3) = pxyarray(3)

=

End of Section 4

4-30

SECTION 5
Attribute Functions

The VDI attribute functions control how output items are imposed over
existing pixel values (the writing mode) and determine the
characteristics of the output functions.
The output function
characteristics determined by the attribute functions include color, line
type, marker type, fill pattern and style, and character height.
Note that the function descriptions in this section are organized
according to the attributes they control, rather than opcode.
Table 5-1 lists each of the VDI attribute functions.

5-1

5.0

GEM VOl Reference Guide

Table 5-1.
Function

vst_height (CH)
vst_rotation (DH)
vs_color (EH)
vsLtype (FH)
vsl_width (1 OH)
vsl_color (11 H)
vsm_type (12H)
vsm_height (13H)
vsm_color (14H)
vst_font (15H)
vst_color (16H)
vsfjnterior (17H)
vsf_style (18H)
vsf_color (19H)
vswr_mode (20H)
vst_alignment (27H)
vsf_perimeter (68H)
vst_effects (6AH)
vst-point (6BH)
vsl_ends (6CH)
vsf_udpat (70H)
vSI_udsty (71H)

5-2

Page

5-19

5-23
5-6
5-8
5-11
5-12
5-15
5-17
5-18

5-25
5-27

5-33
5-35
5-38
5-3

5-31
5-39
5-28
5-21

5-13
5-40
5-10

VOl Attribute Functions
Purpose

Set character height, abolute mode
Set the character baseline vector
Determine color representation
Set the line type
Set the line width
Set the line color index
Set the polymarker type
Set polymaker height
Set the polymarker color Index
Select a character font
Set the text color index
Set the fill interior style
Set the fill style index
Set the fill color index
Select the writing mode
Set text alignment
Determine fill area perimeter visibility
Set special effects for text
Set character height, points mode
Set line end styles
Set a user-defined fill pattern
Set a user-defined line style

VSWR_MODE (20H)

GEM VDI Reference Guide
VSWR_MODE (20H)

This function selects the writing mode. The writing mode affects the
way new pixels for subsequent drawing operations are placed on the
display. The calling routine specifies the operation to be performed
between the color indices of the current pixel (source) and the existing
pixel (destination) by selecting one of four writing modes.
The writing modes are:
replace, transparent, XOR, and reverse
transparent.
work_out[9] of vq_extnd (66H) returns the number of
writing modes available on a particular device -- see Section 8. Table
5-2 defines the operands used in the Boolean expressions that
describe the four writing modes.
Table 5-2.
Operand

Writing Mode Operands

Definition

mask

Line style or fill pattern

fore

Selected color after mapping from the VDI

back

Color 0 after mapping from the VDI
(white is default)

old

Current color value

new

Replacement color value

Mode 1, Replace
Replace mode is insensitive to the currently displayed image. Any
information already displayed is replaced. This is 'the default writing
mode when the workstation is opened. The Boolean expression for
replace mode is:
new

= (fore

AND mask) OR (back AND NOT mask)

5-3

GEM VDI Reference Guide

VSWR_MODE (20H)
Mode 2, Transparent

Transparent mode affects only the pixels where the mask is 1. These
are changed to the fore value. The Boolean expression for transparent
mode is:
new = (fore AND mask) OR (old AND NOT mask)
Mode 3, XOR
XOR mode reverses the bits representing the color.
expression for XOR mode is as follows:

The Boolean

new = mask XOR old
Mode 4, Reverse Transparent
Reverse transparent mode affects only the pixels where the mask is 0,
changing them to the fore value. The Boolean expression for this
mode is:
new

= (old

AND mask) OR (fore AND NOT mask)

Input Arguments
handle

Device handle

mode

Writing mode:
1
2
3
4

Replace mode
Transparent mode
XOR mode
Reverse transparent mode

If the writing mode specified by the calling routine is
not in the range of 1 - 4, vswr_mode selects replace
mode, 1.

5-4

VSWR_MODE (20H)

GEM VDI Reference Guide
Output Arguments

Selected writing mode
Sample Call to C Language Binding

WORD
WORD

vswr_mode();
set_mode, handle, mode;

set_mode

= vswr_mode(handle,

mode);

Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(S)

Output

Input

= 32
= 0
= 0
= 1
= 1
= 0
= handle

intin(O)

= mode

intout(O) = seLmode

5-5

GEM VOl Reference Guide
VS_COLOR (EH)
Set Color Representation assigns a specified color index to units of
RGB (Red, Green, Blue) intensity. The calling routine specifies the unit
of intensity for each of the three colors in tenths of a percent (0 1000).
If the specified value of a color intensity is less than 0, vs_color maps
the value to 0; an intensity value of greater that 1000 is mapped to
1000.
On a monochrome device, the VOl maps any percentage of color to
white. The background color is referenced as color index zero. The
default color table index values are listed in Table 3-3 on page 3-4.
The number of color indices is device dependent; work_oud13] of
v_opnwk (lH) and v_opnvwk (64H) returns the number of colors that
can be defined. v_opnwk and v_opnvwk are described in Section 3,
"Control Functions."
Note: This function performs no operation if a color lookup table is
not supported for the specified device. work_oud5] of vq_extnd (66H),
described in Section 8, indicates the availability of a color lookup table.
Input Arguments
handle

Device handle

index

The color index

rgbjn[O]

Red color intensity (in tenths of percent, 0-1000)

rgbjn[l]

Green color intensity (in tenths of percent, 0-1000)

rgb_in[2]

Blue color intensity (in tenths of percent, 0-1000)

Sample Call to C Language Binding
WORD
WORD

vs_color();
handle, index, rgbjn[3];

vs_color(handle, index, rgbjn);

5-6

GEM VDI Reference Guide
Parameter Block Binding
Control
controllO)
controll 1)
control(2)
control(3)
control(4)
controllS)
controllS)

Input

= 14
= 0
= 0
= 4
= 0
= 0
= handle

Output

intin(O) = index
intin(l) = rgb_in(O)
intin(2) = rgb_in(l]
intin(3) = rgb_in(2)

5-7

GEM VDI Reference Guide
VSL_TYPE (FH)
This function sets the line type for· subsequent polyline operations. All
devices support at least six polyline types; the total number of
available line types is device-dependent. v_opnwk (lH) and v_opnvwk
(S4H) return the number of line types for a particular device in
work_oudS].
The line type index values and their corresponding pattern word bit
settings are listed in Table 5-3. The pixel value in the pattern word is
1 = pixel on (active); 0 = pixel off, the most significant bit is the first
pixel displayed.
Table 5-3.

Line Type Index Values and Pattern Words

Value

Style

1
2

Solid
long dash
Dot
Dash,dot
Dash
Dash,dot,dot
User-defined
Devicedependent

Line Pattern Word
MSB

3
4
5
6
7
8-n

LSB

1111111111111111
FFFFH
1111111111110000
FFFOH
1 1 10 0 0 0 0 1 1 10 0 0 0 0
EOEOH
1111111000 1 1 100 0
FE38H
1 1 1 1 1 1 1 1·0 0 0 0 0 0 0 0
FFOOH
1 1 1 10 0 0 1 10 0 1 10 0 0
F198H
See vsl_udsty (71 H) on page 5-10

By default at open workstation, the user-defined line style is set to the
pattern word for a solid line. This default assignment can be changed
with vsl_udsty (71 H).

vsLtype returns the line type selected and uses a solid line (1) if the
value specified by the calling routine is out of range.
Note: If a nondefault line width is used, the device may draw the
thickened line using a solid line style and may change the writing
mode.
Check the information returned by vq_extnd (SSH) in
work_oud17] and work_out[18]; vq_extnd is described in Section 8,
"Inquire Functions."

5-8

GEM VDI Reference Guide
Input Arguments

handle

Device handle

style

Requested line type, see Table 5-3

Output Arguments

Line type selected
Sample Call to C Language Binding

WORD
WORD

vsCtype();
set_type, handle, style;

set_type

= vsl_type(handle,

style);

Parameter Block Binding
Control

Input

control(O) = 15
control(l) = 0
control(2) = 0
control(3) = 1
control(4) = 1
control(5) = 0
control(6) = handle

intin(O)

Output

= style

intout(O) = seLtype

5-9

GEM VOl Reference Guide
VSL_UDSTV (71 H)
v_udsty sets the user-defined line style pattern word in the device
driver to the specified pattern word (16-bits). This line is used for
subsequent polyline operations when an application selects the userdefined line style, index 7.
The Most Significant Bit (MSB) of the pattern word is the first pixel
displayed in the line; see Table 5-3 on page 5-8.
When the workstation is opened, the default for the user-defined line
style is a solid pattern word.
Input Arguments
handle

Device handle

pattern

line style pattern word, 16 bits

Sample Call to C Language Binding
WORD
WORD

vsl_udsty();
handle, pattern;

vsl_udsty(handle, pattern);
Parameter Block Binding
Control
control(O)
control(1)
control(2)
control(3)
control(4)
control(5)
control(6)

5-10

Output

Input

= 113
=
=
=
=

0
0
1
0
= 0
= handle

intin(O)

= pattern

GEM VDI Reference Guide
VSL_WIDTH (10H)

This function sets the line width for subsequent polyline operations.
The available line width closest to, but not greater than, the requested
line width is used. Line widths are odd numbers that begin at one. If
you select two in Raster Coordinates, vsl_width returns one, which
sets the line width at one pixel.
vql_attributes (23H), described in Section 8, "Inquire Functions," returns
the current line width in work_out[5].
Note: Thickened lines might be rendered on the device by selecting a
solid line type (1).
Input Arguments
handle

Device handle

width

Requested line width in x-axis NDC/RC units

Output Arguments
Selected line width in x-axis NDC/RC units
Sample Call to C Language Binding
WORD
WORD

vsl_width();
set_width, handle, width;

set_width = vSI_width(handle, width);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

= 16
= 1
= 1
= 0
= 0
= 0
= handle

Output

=

ptsin(O)
vvidth
ptsin(l) = 0

ptsout(O) = seLvvidth
ptsout( 1) = 0

5-11

GEM VOl Reference Guide
VSL_COLOR (11 H)
vsl_color sets the color index for subsequent polyline operations.
vs_color (EH) function determines the color the index represents.

The

At least two color indices, 0 and 1, are always supported
(monochrome). Color indices range from 0 to a device-dependent
maximum. vsLcolor returns the color index selected and uses color
index 1 if the calling process specifies ~n index that is out of range.
The default color table index values are listed in Table 3-3 on page
3-4.
Input Arguments
handle

Device handle

colorjndex

Requested color index

Output Arguments
Color index selected
Sample Call to C Language Binding
WORD
WORD

vsLcolor();
set_color, handle, color_index;

set_color = vsl_color(handle, color_index);
Parameter Block Binding
Control
control(O)
control(1)
control(2)
controJ(3)
control(4)
control(5)
control(6)

5-12

Output

Input

= 17

°°
=
=

=

1
= 1
= 5
= handle

intin(O)

= colocindex

intout(O) = seLcolor

GEM VDI Reference Guide

VSL_ENDS (6CH)

VSL_ENDS (6CH)

This function sets the style for the beginning and ending points of a
polyline. The two points of a polyline can have different styles. The
calling routine can specify the end styles listed in Table 5-4.
Table 5-4.

Value

o

Polyline End Styles

End Style
Squared (Default)
Arrow

2

Rounded

If the calling routine requests an invalid end style, vsl_ends uses
squared (0).
Both the squared and arrow styles end at the end of the polyline. The
rounded style is drawn so that the center of the rounding is at the end
of the polyline; see Figure 5-1.

.

cFigure 5-1.

\

(

·Points for Polyline End Styles

5-13

GEM VOl Reference Guide

VSL_ENDS (6CH)
Input Arguments
handle

Device handle

beg_style

End style for beginning point, see Table 5-4

end_style

End style for ending point

Sample Call to C Language Binding
WORD
WORD

vsl_ends();
handle, beg_style, end_style;

vsLends(handle, beg_style, end_style);
Parameter Block Binding
Control
control(O)
control(1)
control(2)
control(3)
control(4)
control(5)
control(6)

5-14

Input
= 108
= 0
= 0
= 2
= 0
= 0
= handle

intin(O) = beg_style
intin(l) = end_style·

Output

VSM_TYPE (12H) .

GEM VOl Reference Guide
VSM_TYPE (12H)

vsm_type sets the marker type for subsequent polymarker functions.
Although the total number of available marker types is devicedependent, the VOl always defines at least six. The marker types are
listed in Table 5-5.
Table 5-5.
Value

Polymarker Types

Type
Dot

2

Plus

3

Asterisk (Default)

4

Square

5

Diagonal Cross

6

Di~mond

7-n

User-defined

v_opnwk (lH) and v_opnvwk (64H) return the number of marker types
for a particular device in work_oud8]; see Section 3. vqm_attributes
(24H), described in Section 8, "Inquire Functions," returns the current
marker type.
If the marker type requested by the calling routine is out of range,
vsm_type uses an asterisk, type 3. Marker type 1 is the smallest dot
the VOl displays on the device; it cannot be scaled.

5-15

VSM_TYPE (12H)

GEM VDI Reference Guide

Input Arguments
handle

Device handle

symbol

Requested polymarker type, see Table 5-5

Output Arguments
Polymarker type selected
Sample Call to C Language Binding
WORD
WORD

vsm_type();
set_type, handle, symbol;

set_type = vsm_type(handle, symbol);
Parameter Block Binding
Control
control(O)
control(1)
control(2)
control(3)
control(4)
control(5)
controUS)

5-16

Input

= 18
=
=
=
=

0
0
1
1
= 0
= handle

intin(O)

Output

= symbol

intout(O) = seLtype

VSM_HEIGHT (13H)

GEM VOl Reference Guide
VSM_HEIGHT (13H)

The polymarker height determined by vsm_height is used for
subsequent polymarker functions. The number of polymarker sizes
available for a particular device is returned by v_opnwk (lH) and
v_opnvwk (64K) in work_out[9] -- see Section 3.
If the marker height requested by. the calling routine does not exist,
vsm_height selects the next smaller height. vsm_height returns the
actual marker height selected in set_height.
Input Arguments

handle

Device handle

height

Requested polymarker height in y-axis NDC/RC units

Output Arguments

Polymarker height selected in y-axis NDC/RC units
Sample Call to C Language Binding

WORD
WORD

vsm_height();
set_height, handle, height;

set_height = vsm_height(handle, height);
Parameter Block Binding
Control

Input

Output

controllO) = 19
controll 1) = 1
control(2) = 1
control(3) = 0
control(4) = 0
controllS) = 0
controllS) = handle

ptsin(O) = 0
ptsin( 1) = height

ptsout(O) = 0
ptsout( 1) = seLheight

5-17

VSM_COlOR (14H)

GEM VOl Reference Guide

VSM_COLOR (14H)
vsm_color sets the color index for subsequent polymarker operations.
The vs_color (EH) function determines the color the index represents.
At least two color indices, 0 and 1, are always supported
(monochrome). Color indices range from 0 to a device-dependent
maximum.
vsm_color returns the color index selected for the
polymarker and selects color index 1 if the index specified by the
calling process is out of range.
The default color table index values are listed in Table 3-3 on page
3-4.
Input Arguments
handle

Device handle

color_index

Requested polymarker color index

Output Arguments
Selected polyma(ker color index
Sample Call to C Language Binding
WORD
WORD

vsm_color();
set_color, handle, colorjndex;

set_color = vsm_color(handle, color_index);
Parameter Block Binding
Control
controllO) = 20
controlll) = 0
control(2) = 0
control(3) = 1
control(4) = 1
controllS) = 0
control(6) = handle

5-18

. Input
intin(O) = color_index

Output
intout(O) = seLcolor

VST_HEIGHT (CH)

GEM VDI Reference Guide
VST_HEIGHT (CH)

vst_height sets the current graphic text character height in NDC/RC
units (absolute mode). The character height is specified the according
to the distance from the character baseline to the top of the character
cell, rather than the character cell height.
If the specified character height does not map exactly to a size
available on device, vst_height selects the closest character size that
does not exceed the requested size.
vst_height returns the selected character height (baseline to top line)
and the size of a character cell; see Figure 5-2.
For fixed
(monospaced) fonts, vst_height returns the width of a character and
the width of a character cell. For proportional fonts, vst_height returns
the width of the widest character and the width of the widest
character cell.
All input and output arguments are specified in units of the current
coordinate system (NDC or RC).
left Character
Alignment
Delta

Right Character
Alignment
Delta

Top line .....-i-----t--t--:----

c~~~~r

I

Base line I--t-------t-_+_

Cell
Height

--

Character
Width
Cell
Width

Figure 5-2.

Character Size Definition

5-19

VST_HEIGHT (CH)

GEM VDI Reference Guide

v_opnwk (lH), v~opnvwk (64H), and vqt_attributes (26H) return
information about character sizes for the specified device. v_opnwk
and v_opnvwk are described in Section 3; vqt_attributes is described in
Section 8.

Input Arguments
handle

Device handle

height

Requested character height in y-axis NDC/RC units

Output Arguments
char_width

Character width selected in x-axis NDC/RC units

char_height

Character height selected in y-axis NDC/RC units

celLwidth

Character cell width in x-axis NDC/RC units

cell_height

Character cell height in y-axis NDC/RC units

Sample Call to C Language Binding
WORD
WORD

vst_height();
handle, height, char_width, char_height, cell_width,
cell_height;

vst_height(handle, height, &char_width, &char_height, &cell_width,
&cell_height);

Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

5-20

=
=
=
=

12
1
2
0
= 0
= 0
= handle

Input

Output

ptsin(O) = 0
ptsin(l) = height

ptsout(O) = chacwidth
ptsin(l) = char_height
ptsout(2) = celLwidth
ptsout(3) = celLheight

GEM VDI Reference Guide

VST_POINT (SBH)

VST_POINT (68H)

This function sets the current graphic text character height in printer
points (points mode). A point is 1/72 of an inch. The character height
is specified according to the distance between the baseline of one line
of text and the baseline of the next line of text. This specification is is
the character cell height.
If the character height specified bV the calling routine does not map
exactly to a device size, vst_point selects the closest character size
that does not exceed the requested size.
Note that
vst_point returns the selected point size in set_point.
vst_point returns the character height, character width, cell height, and
the cell width in NDC/RC units; see Figure 5-2 on page 5-19.
For proportional faces, vst_point returns the width of the widest
character and the width of the widest character cell in the font.
v_opnwk (1 H), v _opnvwk (64H), and vqt_attributes (26H) return
information about character sizes for the specified device. v_opnwk
and v_opnvwk are described in Section 3; vqt_attributes is described in
Section 8.
Input Arguments
handle

Device handle

point

Character cell height in points

Output Arguments
set_point

Selected cell height in points

char_width

Selected character width in x-axis NDC/RC units

char_height

Selected character height in v-axis NDC/RC units

cell_width

Character cell width in x-axis NDC/RC units

cell_height

Character cell height in v-axis NDC/RC units

5-21

VST_POINT (6BH)

GEM VDI Reference Guide

Sample Call to C Language Bindil!9
WORD
WORD

vst_point();
set_point, handle, point, char_width, char_height,
cell_width, cell_height;

set-point = vst_point(handle, point, &char_width, &char_height,
&cell_width, &ceILheight);

Parameter Block Binding
Control
control(O)
control(1)
control(2)
control(3)
control(4)
control(S)
control(6)

5-22

= 107
0
= 2
1
= 1
= 0
= handle

=

=

Input

Output

intin(O) = point

intout(O) = seLpoint
ptsout(O) = char_width
ptsout(l)
char_height
ptsout(2) = celLwidth
ptsout(3) = celLheight

=

GEM VOl Reference Guide

VST_ROTATION (DH)

VST_ROTATION (DH)
vst_rotation specifies the baseline for subsequent graphic text output
by requesting an angle of rotation for the character baseline vector.
The calling routine specifies the angle for the baseline vector in tenths
if degrees.
Figure 5-3 depicts how angles are specified to
vst_rotation.
vst_rotation returns the selected baseline vector, which is a best-fit
match to the requested value.
The default angle of rotation for the baseline vector is zero degrees
when the workstation is opened.
900

1800

--0+--- 0
2700

Figure 5-3.

Angle Specification

Input Arguments
handle

Device handle

angle

Angle character baseline
degrees, 0 - 3600)

rotation

(in

tenths

of

rotation

(in

Output Arguments
set_baseline

Selected angle of character baseline
tenths of degrees 0-3600)

5-23

GEM VOl Reference Guide

VST_ROTATION (OH)
Sample Call to C Language Binding
WORD
WORD

vst_rotation();
set_baseline, handle, angle;

set_baseline

= vst_rotation(handle,

angle);

Parameter Block Binding
Control
control(O)
control(1)
control(2)
control(3)
control(4)
control(5)
control(6)

5-24

= 13
=
=
=
=
=

0
0
1
1
0
= handle

Input

Output

intin(O) = angle

intout(O) = set-baseline

VST_FONT (15H)

GEM VOl Reference Guide
VST_FONT (15H)

This function selects a graphic character face for subsequent graphic
text operations. The calling routine selects a face according to its
number as listed in Table 5-6.
You can load external faces with
vJoad_fonts (77H), described Section 3.
Note that some faces might not be supported on all devices. Use the
Inquire Font Name and Index function, vqt_name (82H), to determine
face names and indices.
vqt_attributes (26H) returns the currently
selected face in work_out[O]; vqt_name and vqt_attributes are described
in Section 8, "Inquire Functions." v_opnwk (lH) and v_opnvwk (64H)
both return the number of faces for the device in work_oudl0J -- see
Section 3.
Table 5-6.
Value

1
2

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Face Values and Names

Font
System Face
Swiss 721
Swis~ 721 Thin
Swiss 721 Thin Italic
Swiss 721 Light
Swiss 721 light Italic
Swiss 721 Italic
Swiss 721 Bold
Swiss 721 Bold Italic
Swiss 721 Heavy
Swiss 721 Heavy Italic
Swiss 721 Black
Swiss 721 Black Italic
Dutch 801 Roman
Dutch 801 Italic
Dutch 801 Bold
Dutch 801 Bold Italic

5-25

VST_FONT (15H)

GEM VOl Reference Guide

Input Arguments

handle

Device handle

font

Number of requested software text face

Output Arguments

Number of face selected
Sample Call to C Language Binding

WORD
WORD

vst_font();
set_font, handle, font;

set_font

= vst_font(handle,

font);

Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(5)
control(6)

5-26

Input

= 21
=
=
=
=
=

0
0
1
1
0
= handle

intin(O)

Output

= font

intout[O) = seLfont

GEM VDI Reference Guide
VST_COLOR (16H)

This function sets the color index for subsequent graphic text
operations. The vs_color (EH) function determines the color the index
represents.
At least two color indices, 0 and 1, are always supported
(monochrome). Color indices range from 0 to a device-dependent
maximum. vst_color returns the color index selected and uses color
index 1 if the calling process specifies an index that is out of range.
The default color table index values' are listed in Table 3-3 on page
3-4.
Input Arguments

handle

Device handle

colorjndex

Requested text color index

Output Arguments

Selected text color index
Sample Call to C Language Binding

WORD
WORD

vst_color();
set_color, handle, color_index;

set_color = vst_color(handle,colorjndex);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(S)
control(S)

= 22
= 0
= 0
= 1
= 1
= 0
= handle

Input

Output

intin(O) = color_index

intout(O) = seLcolor

5-27

, GEM VOl Reference Guide

VST_EFFECTS (6AH)
VST_EFFECTS (6AH)

This function sets text special effects for subsequently displayed
graphic text. The following effects are available:
•
•
•
•
•
•
•

thickened
light intensity
skewed
underlined
outlined
shadowed
any combination of the above

The effect input argument is a bit pattern. The attributes set by
vst_effects correspond to the setting in the six least significant bits.
Table 5-7 lists the bit assignments.
Table 5-7.
Bit

Description

o

Thickened
o thickened not selected
1 set style to thickened
Intensity
o normal intensity
1 light intensity
Skewed
o skewed not selected
1 set style to skewed
Underlined
o do not underline
1 underline text
Outline
o do not outline
1 outline
Shadow
o no shadow
1 shadow

1

2

3

4

5

5-28

Text Attribute Bit Mapping

VST_EFFECTS (SAH)

GEM VOl Reference Guide

If effect = 9 (1001 binary), for example, the text style is set to
thickened and underlined.·
For effects not supported on a device, vst_effects returns those bits
set to 0 In set_effect. work_out[2] of vq_extnd (SSH) returns the
supported text effects.
The default text effect when the workstation is opened is normal
intensity.
Figure 5-4 depicts the five of the special text effects.

Normal

Thickened

ABCDE
ABCDE

light Intensity

Skewed

. Underlined

Figure 5-4.

ABCDE

ABCDE
Graphic Text Special Effects

Input Arguments
handle

Device handle

effect

Text effect bit pattern

5-29

GEM VOl Reference Guide

VST_EFFECTS (6AH)

Output Arguments
Text effects actually selected (text effect word with
the appropriate bits set)

Sample Call to C Language Binding
WORD
WORD

vst_effects();
set_effect, handle, effect;

set_effect

= vst_effects(handle,

effect);

Parameter Block Binding
Control
controllO)
control(1)
control(2)
control(3)
control(4)
controllS)
control(6)

5-30

Output

Input
= 106
= 0
= 0
= 1
1
= 0
= handle

=

intin(O)

= effect

intout(O) = seLeffect

VST..,ALIGNMENT (27H)

GEM VDI Reference Guide
VST_ALIGNMENT (27H)

vst_alignment sets horizontal and vertical alignment for graphic text.
The horizontal alignment is the direction of the baseline; the vertical
alignment is perpendicular to the baseline. This function controls the
positioning of the text string in relation to the graphic text position.
The default alignment, when the workstation is opened, places the left
baseline corner of the string at the graphic text position.
If the calling routine specifies an invalid horizontal alignment,
vst_alignment selects the default, left justified. vst_alignment selects
the default vertical alignment, baseline, if the calling routine specifies
an invalid vertical alignment.
vqt_attributes (26H) returns the current horizontal and vertical
alignment settings in work_out[3] and work_out[4], respectively; see
Section 8, "Inquire Functions."
To line
Ascentlllle
_ _ Halllme _ _ _

Base line
Descent line

I

Leading t -_ _ _ _ _ _ _ _-IFB=oll=om.:.;...L=in=e_T=o~L=lne
Ascent line
_

~'line

__ _

Base line
Descent line
BOllom line

Figure 5-5.

Graphic Text Alignment

5-31

GEM VOl Reference Guide

VST.ALIGNMENT (27H)
Input Arguments
handle

Device handle
Horizontal aOlignment:

o
1
2
vertjn

left justified (default)
Center justified
Right justified

Vertical alignment (see Figure 5-5):

o
1
2
3
4
5

Baseline (default)
Half line
Ascent line
Bottom line
Descent line
Top line

Output Arguments
Selected horizontal alignment
Selected vertical alignment
Sample Call to C Language Binding
WORD
WORD

vst_alignment();
handle, horJn, vert_in, hor_out, vert_out;

vst_alignment(handle, horIn, vertjn, &hor_out, &vert_out);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

5-32

=
=
=
=

39
0
0
2
= 2
= 0
= handle

Input

Output

intin(O) = hor_in
intin(l) = verLin

intout(O) = hor_out
intout(1) = verLout

GEM VDI Reference Guide

VSFJNTERIOR (17H)

VSF_INTERIOR (17H)
The fill interior style to be used in subsequent polygon fill operations
is determined by vsfjnterior.
vsf_interior returns the selected fill interior style. If the calling routine
specifies an unavailable style, vsf_interior selects hollow. Hollow style
fills the interior with the current background color (color index 0).
Solid style fills the area with the currently selected fill color.
vqf_attributes (25H), described in Section 8, returns both the current fill
interior style and fill style index values.
Input Arguments
handle

Device handle

style

Fill interior style:

o
1
2
3
4

Hollow
Solid
Pattern
Hatch
User-defined style

Output Arguments
setjnterior

Selected fill interior style

Sample Call to C Language Binding
WORD
WORD

vsfjnterior();
setjnterior, handle, style;

setjnterior = vsfjnterior(handle, style);

5-33

GEM VOl Reference Guide

VSF _INTERIOR (17H)

Parameter Block Binding
Control
control(at
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

5-34

= 23
= 0
= 0
= 1
= 1
= 0
= handle

Input

Output

intin(O) = style

intout(O) = seLinterior

GEM VDI Reference Guide

VSF_STYLE (18H)

VSF_STYLE (18H)

vsf_style selects a fill style based on the fill interior style determined
by vsf_interior (17H). If the current fill interior style is hollow (0), solid
(1), or user-defined (4), this function has no effect on the fill style. A
fill style index can be selected only for the pattern (2) and hatch (3) fill
interior styles.
Fill style indices range from 1 to a device-dependent maximum.
work_out[ll] and work_out[12] of v_opnwk (lH) return this maximum;
see Section 3. If the calling routine specifies an unavailable fill style
index, vsf_style uses index 1.
Figure 5-6 shows the available fill styles. Under each fill style shown
Figure 5-6 are two numbers separated by a comma. The number to
the left of the comma corresponds to the interior style:
Hollow,
Pattern, or Hatch. The number to the right of the comma corresponds
to the index for the particular pattern or hatch.

5-35

VSF_STYLE (18H)

GEM VOl Reference Guide

Hollow

Pattern

O,n

2,1

Hatch

2,9

2,17

3,1

3,9

[B] IIIIII

..
2,2

2,10

2,3

2,11

2,18

3,2

3,10

3.3

3,11

mE
2,19

ffil1lllII §±I±I
2,12

2,20

3,4

3,12

~
2,5

2,13

2,21

3,5

~
..::.:.::.:.::.::.... ::.

nm

2,15

2,23

2.6

2,14

'::.'::::'::,::'
. . C8ZZ]
:.,':.,': .. ': .. ':

2,7

2,22

3,6

~
3,7

~
2,8

2,16

Figure 5-6.

2,24

3,8

Fill Styles and Indices

Note: 1,n (interior style 1, solid, followed by any index) produces the
same result as 2,8.
For patterns, index 1 maps to the lowest intensity pattern on the
device. The pattern is always monochrome and uses the current fill
area color for foreground pixels.

5-36

VSF_STYLE (18H)

GEM VOl Reference Guide

The number of available pattern and hatch styles is returned in
work_oudll] and work_oud121. respectively, of v_opnwk (lH) and
v_opnvwk (64H). These functions are described in Section 3.
Input Arguments
handle

Device handle

styleJndex_Fill style index for pattern or hatch interior
Output Arguments
Selected fill style index for pattern or hatch interior
Sample Call to C Language Binding
WORD
WORD

vsf_style();
set_style, handle, style_index;

set_style = vsf_style(handle, style_index);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

Input

=
=
=
=
=
=

24
0
0
1
1
0
= handle

intin(O)

Output

= style_index

intout(O)

= seLstyle

5-37

VSF_COLOR (19H)

GEM VDI Reference Guide

VSF_COLOR (19H)
vsf_color sets the color index for subsequent fill operations. Set Color
Representation, vs_color (EH), determines the color the index
represents.
At least two color indices, 0 and 1, are always supported
(monochrome). Color indices range from 0 to a device-dependent
maximum. vsf_color returns the color index selected and uses color
index 1 if the calling process specifies an invalid index.
The default color table index values are listed in Table 3-3 on page
3-4.
Input Arguments
handle

Device handle

color jndex

Requested fill color index

Output Arguments
Selected fill color index
Sample Call to C Language Binding
WORD
WORD

vsf_color();
set_color, handle, color_index;

set_color = vsf_color(handle, colorjndex);
Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(5)
control(6)

5-38

Input

= 25

=

0
= 0
= 1
= 1
= 0
= handle

intin(O)

Output

= colocindex

intout(O) = seLcolor

VSF_PERIMETER (6SH)

GEM VDI Reference Guide
VSF_PERIMETER (68H)

vsf_perimeter turns the outline of a fill area on or off. When perimeter
visibility is on (the default when the workstation is opened), the border
of a fill area is drawn in the current fill area color with a solid line.
When perimeter visibility is off, ·no outline is drawn.
Any nonzero value specified for the perimeter visibility flag, per_vis,
causes the perimeter to be visible.
Input Arguments

handle

Device handle
Perimeter visibility flag:
zero
Invisible
nonzero Visibile

Output Arguments

set_perimeter Selected perimeter visibility
Sample Call to C Language Binding

WORD
WORD

vsf_perimeter();
set_perimeter, handle, per_vis;

set_perimeter = vSf_perimeter(handle, per_vis);
Parameter Block Binding
Control

Input

Output

control(O) = 104
control(l) = 0
control(2) = 0
control(3) = 1
control(4) = 1
control(5) = 0
control(6) = handle

intin(O) = per_vis

intout(O)

= seLperimeter

5-39

GEM VOl Reference Guide
VSF_UDPAT (70H)

This function redefines the user-definable fill pattern. This fill pattern
is referenced by vsfjnterior (17H) as fill interior style 4.
16 two-byte words are required for a single plane fill pattern. Bit 15
of the first· word is the upper left bit of the pattern. Bit 0 of word 16
is the lower right bit of the pattern. Bit 0 is the least Significant Bit
of the word. Words are stored in the same format as 16-bit integers.
For a single plane pattern, a bit value of 1 indicates foreground color.
A bit value of 0 indicates the background color. The color used for
the foreground is determined by the current fill area color index as set
by vsf_color (19H).
For a multiple plane pattern (multiple colors), the number of full 16by-16 (words-by-bits) planes defined is used in the fill operation. Any
unspecified planes are zeroed. Note that the writing mode must be
set to replace (mode 1) when using a multiplane fill pattern; see
vswr_mode (20H) on page 5-3.
The user-defined fill pattern is the DRI logo by default when the
workstation is opened.
Input Arguments
handle

Device handle

pfill_pat

Fill pattern data (16 words per plane)

Sample Call to C Language Binding
WORD
WORD

vsf_udpat();
handle, planes, pfil_pat[planes x 16];

vsf_udpat(handle, pfill_pat, planes);

5-40

VSF _U 0 PAT (70H)

GEM VOl Reference Guide
Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(5)
control(6)

Input
= 112
= 0
= 0
= 16-n
= 0
= 0
= handle

intin(O)

intin( 15) =1 st plane of fill pattern
intin(16)

intin(29) = 2nd plane of fill pattern
intin(n-15)

intin(n) = last plane of fill pattern

End of Section 5

5-41

SECTION 6
Raster Operations

Raster operations perform logic operations on rectangular blocks of
bits in memory and on rectangular blocks of pixels on physical
devices.
Table 6-1.

Raster Operation Functions

Function

Page

Purpose

v-get_pixel (69H)

6-9

Get Pixel

vro_cpyfm (60H)

6-10

Copy raster, opaque

vr_trnfm (6EH)

6-12

Transform form

vrt_cpyfm (79H)

6-13

Copy raster, transparent

6-1

Memory Form Definition Block

GEM VDI Reference Guide

Memory Form Definition Block

A raster area is defined by a Memory Form Definition Block (MFDB).
As shown in Figure 6-1, an MFDB consists of ten words; its
components are as follows:
• A 32-bit pointer to the memory address of the upper left corner
of the first plane of the raster area. This pointer is a nativemachine pointer. If all 32 bits of this pointer are 0, the MFDB is
for a physical device, and any MFDB parameters you enter are
ignored -- these values are defined in the device driver.
• The width and height of the raster area in pixels.
• The width of the raster area in words. This value is equal to the
width of the raster area in pixels, divided by the word size.
• A flag indicating whether the format of the raster area is standard
or device-dependent.
• The number of memory planes in the raster area.
• Some locations reserved for future use.
A raster area must start on a word boundary and have a width that is
an integral multiple of the word size.

6-2

GEM VOl Reference Guide

Memory Form Definition Block

One word (16 bits)
Word 1

Memory pointer word 1

Word 2

Memory pointer word 2

Word 3

Form Width in Pixels

Word 4

Form Height in Pixels

Word 5

Form Width in Words

Word 6

Form format flag

Word 7

Number of Memory Planes

WordS

Reserved for future use

Word 9

Reserved for future use

Word 10

Reserved for future use

Figure 6-1.

Memorv Form Definition Block

6-3

Raster Area Formats

GEM VOl Reference Guide

Raster Area Formats
Two memory formats are associated with raster areas:
• device-specific format
• well-defined standard format
The VOl provides the vr_trnfm (6EH) function to transform a raster area
from one format to another. You must transform a standard format
raster area to a device-specific format before using a copy raster
function, vro_cpyfm (60H) or vrt_cpyfm (79H).
The form format flag of the MFOB can have two values:

o
1

The form is in device-specific format
The form is in standard format

The layout of a standard form format is as follows (see Figure 6-2):
• Plane based - The planes are contiguous blocks of memory, each
having the same x,y resolution. A monochrome implementation
has a single plane. A color index is mapped to a pixel value with
each plane representing one bit in the value. Tables 6-2 and 6-3
define the pixel-value-to-color-index mapping for eight-color and
sixteen-color screens, respectively.
• The Most Significant Bit in a word (16-bit integer) is the leftmost
bit in the image. Note that the data is stored in the same format
as 16-bit integers.
• Words are arranged sequentially along a row. The first word is on
the left edge of the row.

6-4

Raster Area Formats

GEM VOl Reference Guide

Msb Word 1 Plane 1

r--

Msb

Word 1

r--

Pixel value of
Pixel at (0,0)

Word 2

0,0

Msb Word 1 Plane 2
Msb Word 1 Plane 3

r--

Lsb

I
I

•

Space

Raster
Coordinates
Space

:~

::::::.:.:.:

Standard
Monochrome Form

:::::::::::

.:~:~:'

·s,

Standard
Color Form
(3 Planes)

Figure 6-2.

Table 6-2.

.;.;

Standard Forms

Pixel Value to Color Index Mapping for a-color Screens
Pixel
Value

Color
Index

000
001
010
011
100
101
110
111

0
2
3

6
4
7

5
1

Color
White
Red
Green
Yellow
Blue
Magenta
Cyan
Black

6-5

GEM VDI Reference Guide

Raster Area Formats
Table 6-3.

Pixel Value to Color Index Mapping for 16-color
Screens

Pixel
Value

Color
Index

0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111

0
2
3
6
4
7

5
8
9
10
11
14
12
15
13
1

Color
White
Red
Green
Yellow
Blue
Magenta
Cyan
light Grey
Dark Grey
Dark Red
Dark Green
Dark Yellow
Dark Blue
Dark Magenta
Dark Cyan
Black

Note: A pixel value of 0 maps to the background color.
In addition to the MFDB, the copy raster functions vro_cpyfm (6DH) and
vrt_cpyfm (79H) also take a rectangle as an argument. This allows
operations on a specified portion· of the raster area. A rectangle is
specified by the x,y coordinates of two diagonal corners.
Coordinate Systems
A sample single-plane memory form with a form width of 16 pixels, a
form height of 8 pixels, and a highlighted rectangle with corners of
(3,1) and (5,4) is shown in Figure 6-3.

6-6

Coordinate Systems

GEM VOl Reference Guide

(0,0)

(15,0)

.........
.......
:.:.:: ......
.:.:.: :.'.:
.:.:.:
.......
..,..........
... ...
'"
.......
...

............. ......

.......
... ... .. ..
.......
.:.:.:..:.:.:.:. ..:

(0,7)

(15,7)

(3.1 )

Figure 6-3.

(5,4)

Sample Single Plane Memory Form

Logic Operations
To provide greatest flexibility, raster operations subject to a logic
operation take the operation as an argument rather than using the
logic operation associated with vector primitives.
In addition, the
operations available are greatly expanded to allow more flexibility.
Table 6-4 lists the available operations with the following conventions:
• S

= source pixel value (0 or 1)

• D = destination pixel value (0 or 1)
• D' = destination pixel value after the logical operation

6-7

Logic Operations

GEM VOl Reference Guide

Table 6-4.
Mode

o
1
2

3
4

5
6
7
8
9
. 10
11
12
13
14
15

6-8

Raster Operation Logic Operations

Definition
0'=
0'=
0'=
0'=
0'=
0'=
0'=
0'=
0'=
0'=
0'=
0'=
0'=
0'=
0'=
0'=

0
5 AND 0
5 AND [NOT 0]

5

(Replace mode)

[NOT 5] AND 0

0
5 XOR 0
(XOR mode)
5 OR 0
NOT [5 OR 0]
NOT [5 XOR 0]
NOT 0
5 OR [NOT 0]
NOT S
[NOT S] OR 0
NOT [S AND 0]
1

GEM VOl Reference Guide
V _GET_PIXEL (69H)

This function returns a pixel value and a color index for the pixel
specified in x and y by the calling routine.
Color index 0 is the background color. It might not map to pixel value
o in device-specific form. Refer to Tables 6-2 and 6-3 for the colors
and values. Standard form always maps color index 0 to pixel value O.
Note: v-get_pixel may not be supported by all device drivers.
Input Arguments
handle

Device handle

x

x-coordinate of pixel in RC/NDC units

y

y-coordinate of pixel in RC/NDC units

Output Arguments
pel

Pixel value in device-specific form

index

Color index

Sample Call to C Language Binding
WORD
WORD

v_get_pixel();
handle, x, y, pel, index;

v_get_pixel(handle, x, y, &pel, &index);
Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(S)
control(6)

= 105
1
= 0
= 0
= 2
= 0
= handle

=

Input

Output

ptsin(O) = )(
ptsin(l) = V

intout(O) = pel
intout(1) = index

6-9

VRO_CPYFM (6DH)

GEM VOl Reference Guide

VRO_CPVFM (60H)

Copy Raster Opaque copies a rectangular raster area from source form
to destination form using the logic operation specified by the calling
routine. If the source and destination forms are the same, and the
rectangles overlap, vro_cpyfm copies so that the source rectangle is
not changed until the corresponding area in the destination has been
processed. No rotation or transformation occurs as a result of this
function; the copy is pixel for pixel.
If the source and destination rectangles are not the same size,
vro_cpyfm uses the destination as a pointer and the source for the
size. vq_extnd (66H), described in Section 8, returns scaling ability.
The source and destination forms must be in device-specific form; see
vr_trnfm (6EH) in this section.
All input coordinates (xy[O] to xy(71) must be specified according to the
current coordinate system (NDC or RC).
Input Arguments
handle

Device handle

srcMFDB

Double-word address of the source MFDB

desMFDB

Double-word address of the destination MFDB
Logic operation (refer to Table 6-4)

xy[O]

x-coordinate of source rectangle corner in NDC/RC

xy[l]

v-coordinate of source rectangle corner in NDC/RC

xy[2]

x-coordinate, in NDC/RC, of corner diagonal to xy[O]

xy[3]

v-coordinate, in NDC/RC, of corner diagonal to xy[l]

xy[4]

x-coordinate
NDC/RC

of

destination

rectangle

corner

in

xy[5]

v-coordinate
NDC/RC

of

destination

rectangle

corner

in

6-10

GEM VDI Reference Guide
xV[6]

x-coordinate of destination rectangle corner diagonal
to xV[4]

xV[7]

v-coordinate of destination rectangle corner diagonal
to xV[5]

Sample Call to C Language Binding

WORD
WORD

vro_cpvfm();
handle, wr_mode, XV[], *srcMFDB, *desMFDB;

vro_cpvfm(handle, wr_mode, xV, srcMFDB, desMFDB);
Parameter Block Binding
Control

Input

control(O) = 109
control(1) = 4
control(2)
0
control(3) = 1
control(4) = 0
control(5) = 0
controJ(S) = handle
control(7-8) = srcMFOB
controI(9-10) = desMFOB

intin(O) = wr_mode
ptsin(O) = xylO)
ptsin(l) = xyll)

=

ptsin(7)

Output

= xy(7)

6-11

VR_TRNFM (6EH)

GEM VOl Reference Guide

VR_TRNFM (6EH)

This function transforms a raster area from standard format to devicespecific format or from device-specific to standard format.
The
operation is a toggle that changes the current format state.
The number of planes specified in the source MFOB determines the
number transformed. The source format flag is toggled and placed in
the destination.
The user is required to ensure that the other
parameters in the destination MFOB are correct.
Note that the source and destination MFDBs must be either completely
coincident or separate; they cannot partially overlap.
Input Arguments
handle

Device handle

srcMFOB

Double-word address of the source MFDB

desMFOB

Double-word address of the destination MFDB

Sample Call to C Language Binding
WORD
WORD

vr_trnfm();
handle, *srcMFDB, *desMFDB;

vr_trnfm(handle, srcMFDB, desMFDB);
Parameter Block Binding
Control
control(O) = 110
control( 1) = 0
control(2) = 0
control(3) = 0
control(4) = 0
control(S) = 0
control(6) = handle
controI(7-8) = srcMFDB
controI(9-10) = desMFDB

6-12

Input

Output

GEM VOl Reference Guide

VRT_CPYFM (79H)

VRT_CPYFM (19H)
Copy Raster Transparent copies a monochrome rectangular raster area
from the source form to a color area. The calling routine specifies a
writing mode and color indices for both O's and l's. The source form
cannot be the screen.
If the source and destination rectangles are not the same size,
vrt_cpyfm uses the source rectangle for the size and the upper left
corner of the destination rectangle for the initial destination location.
All rectangle coordinates (xy[O] to xy[l1) must be specified according
to the current coordinate system (NOC or RC).
Transfer of information from the source to the destination is controlled
by specifying the writing mode as described below.
Mode 1, Replace
Replace mode results in a replacement of all pixels in the destination
rectangle. The foreground color index, specified in index[O], is output
to all pixels associated with source locations which are set to one.
The background color index, specified in index[1], is output to all pixels
associated with source locations set to zero.
Mode 2, Transparent
Transparent mode affects only the pixels associated with a source
value of one. Those pixels are set to the foreground color whose
index is specified in index[O]. The color index specified in index[l] is
not used.
Mode 3, XOR
In XOR mode, the monochrome raster source area is logically XORed
with each plane of the destination. The specified color indices are not
used.

6-13

VRT_CPYFM (79H)

GEM VOl Reference Guide

Mode 4, Reverse Transparent
Reverse Transparent mode affects only the pixels associated with a
source value of zero. These pixels are set to the background color
specified in index[l]. The color index specified in index[O] is not used.
Input Arguments
handle

Device handle

srcMFDB

Double-word address of the source MFDB

desMFDB

Double-word address of the destination MFDB
Writing Mode:
1
2
3
4

Replace mode
Transparent mode
XOR mode
Reverse transparent mode

index[O]

Color index for ones in data (foreground)

index[1]

Color index for zeros in data (background)

xylOl

x-coordinate of source rectangle corner in NDC/RC

xy[l]

v-coordinate of source rectangle corner in NDC/RC

xy[2]

x-coordinate, in NDC/RC, of corner diagonal to xy[O]

xy[3]

v-coordinate, in NDC/RC, of corner diagonal to xy[l]

xy[4]

x-coordinate
NDC/RC

of

destination

rectangle

corner

in

xy[5]

v-coordinate
NDC/RC

of

destination

rectangle

corner

in

xy[6]

x-coordinate, in NDC/RC, of corner diagonal to xy[4]

xy[7]

v-coordinate, in NDC/RC, of corner diagonal to xy[5]

6-14

VRT_CPYFM (79H)

GEM VDI Reference Guide
Sample Call to C Language Binding

WORD
WORD

vrt_cpyfm();
handle, wr_mode, xy[], *srcMFDB *desMFDB, index;

vrt_cpyfm(handle, wr_mode, xy, srcMFDB, desMFDB, &index);
Parameter Block Binding
Control

Input

control(O) = 121
control(l) = 4
control(2) = 0
control(3) = 3
control(4) = 0
control(5) = 0
control(6) = handle
controI(7-8) = srcMFDB
controI(9-10) = desMFDB

intin(O) = wr_mode
intin(1) = index[O)
intin(2) = index[l)
ptsin(O) = xylO)
ptsin(1) = xy[l)

ptsin(7)

Output

= xy(7)

End of Section 6

6-15

SECTION 7
Input Functions

The VOl input functions allow user interactions with the application
program. Many of the input functions support two modes: request
and sample. In request mode, the driver waits until an input event
occurs before returning.
In sample mode, the driver returns the
current status or location of the input device without waiting.
In VOl-only programs with multiple workstations, use the request
mode rather than the sample mode to input characters. Workstations,
using the sample mode might not get all of the characters input.
Note: Programs that use both the Application Environment Services
(AES) and VOl functions must use the AES input functions rather than
the VOl functions. Use the VOl input functions only in programs that
do not use the AES. The AES is described in the GEM Application
Environment Services Reference Guide.
Table 7-1 lists the VOl input functions.

7-1

7.0

GEM VOl Reference Guide
Table 7-1.

VDI Input Functions

Function

Page

Purpose

vrqJocator (1 CH)
vsmJocator (1 CH)

7-5
7-7

Input locator, request mode
Input locator, sample mode

vrq_valuator (1 DH)
vsm_valuator (1 DH)

7-9
7-11

Input valuator, request mode
Input valuator, sample mode

vrq_choice (1 EH)
vsm_choice (1 EH)

7-13
7-14

Input choice, request mode
Input choice, sample mode

vrq_string (1 FH)
vsm_string (1 FH)

7-16
7-18

Input string, request mode
Input string, sample mode

vsin_mode (21 H)
vsc_form (6FH)
vex_timv (76H)
v_show_c (7 AH)
v_hide_c (7BH)
vq_mouse (7CH)
vex_butv (7DH)
vex_motv (7EH)
vex_curv (7FH)
vq_key _s (BOH)

7-3
7-20
7-22
7-24
7-26
7-27
7-28
7-30
7-32
7-34

Set input mode
Set mouse form
Exchange timer interrupt vector
Show cursor
Hide cursor
Sample mouse button state
Exchange button change vector
Exchange mouse movement vector
Exchange cursor change vector
Sample keyboard state information

7-2

GEM VDI Reference Guide

VRT_CPYFM (79H)

VSIN_MODE (21 H)
vsin_mode sets the input mode to request or sample for the specified
logical input device. The logical input devices are:
•
•
•
•

locator (mouse, trackball, or joystick)
valuator (potentiometer)
choice (function keys)
string (keyboard)

Input Arguments
handle

Device handle

-dev_type

Logical input device:
1
2
3
4

mode

Locator
Valuator
Choice
String

Input mode:
1

Request
Driver does not return until an input event occurs

2

Sample
Driver returns current status or location of the
input d·evice without waiting

Sample Call to C Lal1!l!@!1e Binding
WORD
WORD

vsin_mode();
handle, dev_type, mode;

vsin_mode(handle, dev_type, mode);

7-3

VSIN_MOOE (21H)

GEM VOl Reference Guide

Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(S)
control(S)

7-4

= 33
= 0
= 0
= 2
= 1
= 0
= handle

Input

Output

intin(O) = dey_type
intin(l) = mode

intout(O)

= Selected

mode

GEM VOl Reference Guide

VSIN_MOOE (21 H)

VRQ_LOCATOR (1 CH)

This function returns the position of the specified locator device in
request mode. Upon entry to the "locator routine, the current cursor
form Is displayed at the initial coordinate.
Because vrqJocator
operates in request mode, it tracks the graphic cursor with the input
device until a terminating event occurs, which can result from the user
pressing a key or a button on a mouse. vrqJocator removes the
cursor when the terminating event occurs.
Typically, the arrow keys move the cursor in large jumps when used
without the Shift key and in pixel increments when used with the Shift
key. If both a keyboard and another locator device are available, the
cursor is tracked by input from either. This gives the user maximum
flexibility.
vrqJocator always displays .a cursor on the screen, even if the cursor
is currently obscured or hidden.
Note: This function is not required and might not be supported by all
device drivers.
.
Input Arguments
handle

Device handle

initx

Initial x-coordinate of locator in NOC/RC units

inity

Initial y-coordinate of locator in NOC/RC units

7-5

VRQ_lOCATOR (1 CH)

GEM VOl Reference Guide

Output Arguments
xout

Final x-coordinate of locator in NDC/RC units

yout

Final y-coordinate of locator in NDC/RC units

term

locator terminator
The low byte contains a character terminator. For
keyboard-terminated locator input, this is the ASCII
character code of the key that was struck to
terminate input. For nonkeyboard-terminated input
(tablet or mouse for example), valid locator
terminators begin with 20H (space) and Increase from
there. For instance, if the puck on a tablet has 4
buttons, the first button must generate 20H as a
terminator, the second 21 H, the third 22H, and the
fourth 23H.

Sample Call to C Language Binding
WORD
WORD

vrq_locator();
handle, initx, inity, xout, yout, term;

vrqJocator(handle, initx, Inity, &xout, &yout, &term);
Parameter Block Binding
Control
control(O)
control(l)
control(2)
control(3)
control(4)
control(S)
control(S)

7-6

= 28
= 1
= 1
= 0
= 1
= 0
= handle

Input

Output

ptsin(O) = initx
ptsin(1) = inity

intout(O) = term
ptsout(O) = xout
ptsout(1) = yout

GEM VDI Reference Guide

VRQ_LOCATOR (lCH)

VSM_LOCATOR (1 CH)

vsmjocator returns the position of the specified locator device. Input
is sampled. Upon entry to the locator routine, no cursor is displayed.
Use v_show_c (7 AH), described on page 7-24, to display the cursor. If
the cursor position has ·changed, vsmjocator returns the cursor
position; if a terminating event occurred, vsmjocator returns a
character. See Table 7-2 for the appropriate settings of control(2) and
control(4).
Note: This function is not required and might not be supported by all
device drivers. If both a keyboard and another locator device are
available, the input comes from either, giving the user maximum
flexibility.
Input Arguments

handle

Device handle

initx

Initial x-coordinate of locator in NDC/RC units

inity

Initial y-coordinate of locator in NDC/RC units

Output Arguments

xout

New x-coordinate of locator in NDC/RC units

yout

New y-coordinate of locator in NDC/RC units

term

Locator keypress if keypress occurs
This information is the same as for vrqJocator (lCH),
see page 7-5.

7-7

VSM_LOCATOR (lCH)
Table 7-2.

GEM VOl Reference Guide
Sample Mode Status Returned

Event

Control(2)

Control(4)

Coordinates changed

1

o

Key pressed; coordinates
unchanged

0

1

No input

0

o

Key pressed; coordinates
changed

1

1

Sample Call to C Language Binding
WORD
WORD

vsmJocator();
handle, initx, inity, xout, yout, term;

vsm_locator(handle, initx, inity, &xout, &yout, &term);
Parameter Block Binding
Control

Input

control(O) =28
ptsin(O) = x
control(l) = 1
ptsin(l) = V
control(2) = 1 coordinate changed
no coordinate changed
control(3) = 0
control(4) = 0 no keypress character
1 keypress character returned
control(S) = 0
control(S) = handle

o

7-8

Output
intout(O) = term
ptsout(O) = xout
ptsout( 1) = yout

GEM VDI Reference Guide

VSM_LOCATOR (1 CH)

VRQ_VALUATOR (1DH)
This function returns the value of the valuator device. Because it
operates in request mode, vrq_valuator increments or decrements the
initial value of the valuator until a terminating character is struck.
Valuator keys are typically the up-arrow and down-arrow keys .
.Valuator numbers range from 1 to 100. Typical implementation of the
up-arrow and down-arrow keys is as follows:
• Pressing the up-arrow key adds ten to the valuator.
• Pressing the down-arrow key subtracts ten from the valuator.
• Pressing the up-arrow key with the Shift key adds one to the
valuator.
• Pressing the down-arrow key with the Shift key subtracts one
from the valuator.
Note: vrq_valuator is not required and might not be supported by all
device drivers.
Input Arguments
handle

Device handle
Initial value

Output Arguments
vaLout

Output value

term

Terminator

7-9

GEM VOl Reference Guide

VRQ_VALUATOR (lDH)

Sample Call to C Language Binding
WORD
WORD

vrq_valuator();
handle, vaLin, vaLout, term;

vrq_valuator(handle, valjn, &val_out, &term);
Parameter Block Binding
Control
controllO)
controlll)
control(2)
control(3)
control(4)
controllS)
control(6)

7-10

=
=
=
=
=

29
0
0
1
2
= 0
= handle

Input

Output

intin(O) = vaUn

intout(O) = vaLout
intout(1)
term

=

GEM VDI Reference Guide

VRQ_VALUATOR(lDH)

VSM_VALUATOR (1DH)

vsm_valuator returns the current value of the valuator device in
sample mode. If the valuator has changed, vsm_valuator increments
or decrements the valuator value as required. If a terminating event
occurs, vsm_valuator returns the value.
If nothing happens, the
function does not return a value.
Valuator numbers range from 1 to 100. The suggested keys are the
same as for vrq_valuator (lDH); see page 7-9.
Note: This function is not required and may not be available on all
devices.
Input Arguments

handle

Device handle

vaCin

Initial value

Output Arguments

vaCout

New valuator value

term

Keypress, if keypress event occurred

status

Terminating status:

o
1
2

Nothing happened
Valuator changed
Keypress character

Sample Call to C Language Binding

WORD
WORD

vsm_valuator();
handle, valjn, val_out, term, status;

vsm_valuator(handle, vaCin, &vaCout, &term, &status);

7-11

VSM_VALUATOR (10H)

GEM VOl Reference Guide

Parameter Block Binding
Control

Input

Output

control(O) = 29
control( 1) = 0
control(2) = 0
control(3) = 1
control(4) = status
control(S)
0
control(6) = handle

intin(O) = vaUn

intout(O) = vaLout
intout(1) = term

=

7-12

GEM VDI Reference Guide

VSM_VAlUATOR (lDH)

VRQ_CHOICE (1 EH)

Operating in request mode, this function returns the status of the
selected choice device (function key). vrq_choice samples input until a
key is pressed; if a valid choice key is pressed, vrq_choice returns its
value. Otherwise, vrq_choice returns the initial choice number.
Choice numbers range from one to a device-dependent maximum
value.
v_opnwk (lH) and v_opnvwk return the number of choice
devices in work_out[42]; see Section 3.
Note: This function is not required and might not be supported by all
device drivers.
Input Arguments

handle

Device handle
Initial choice number

Output Arguments

out_chioce

Choice key number

Sample Call to C Language Binding

WORD
WORD

vrq_choice();
handle, in_choice, out_choice;

vrq_choice(handle, in_choice, &out_choice);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(S)
control(6)

= 30

=

Input

Output

intin(O) :;;; in_choice

intout(O)

= oULchoice

0
= 0
= 1
= 1
= 0
= handle

7-13

VRQ_CHOICE (1 EH)

GEM VDI Reference Guide

VSM_CHOICE (1 E)
vsm_choice returns the choice status of the selected choice device.
Upon entry to the routine, vsm_choice .samples input.
If input is
available and is a valid choice key, vsm_choice returns it. Choice
numbers range from one to a device-dependent maximum value.
v_opnwk (lH) and v_opnvwk return the number of choice devices in
work_out[42]; see Section 3. .
Note: This function is not required and may not be available on all
devices.
Input Arguments
handle

Device handle

Output Arguments
choice

Choice
number
unsuccessful

status

Choice status:

o
1

Nothing happened
Sample successful

Sample Call to C Language Binding
WORD
WORD

vsm_choice();
handle, choice;

vsm_choice(handle, &choice);

7-14

if

sample

successful,

0

if

GEM VOl Reference Guide

VSM_CHOICE (lE)

Parameter Block Binding
Control
control(O) = 30
control( 1) = 0
control(2) = 0
control(3) = 0
control(4) = status
control(5) = 0
control(6) = handle

Input

Output
intout(O)

= choice

7-15

VSM_CHOICE (1 E)

GEM VOl Reference Guide

VRQ_STRING (1 FH)
Operating in request mode, vrq_string returns a string from the
specified device. Input is accumulated until vrq_string encounters a
carriage return or· the intout array is full (maximum string length has
been reached).
If the calling routine enables echo mode, text will be echoed to the
screen with the current text attributes using the vertex passed in
echo_yx as the justification point. Note that echo mode might not be
available on all devices. vqt_attributes, described in Section 8, returns
the current text attributes.
If the number passed as the maxiumum string length is negative, the
output string values returned by vrq_string conform to the standard
keyboard defined in Appendix D. In this case, the absolute value of
length is used as the maximum string size.
Note: Echo mode might not be available on all devices.
Input Arguments
handle

Device handle

length

Maximum string length

echo_mode

Echo mode:

o
1

No echo
Echo input characters at specified position

x- and y-coordinates of echo area in NDC/RC units
Output Arguments
string

Output string returned in ADE

The string is word-oriented for the Parameter Block Binding. For the C
Binding, the string is byte-oriented and null-terminated; its length
includes an additional byte for the terminating null.

7-16

VRQ_STRING (1 FH)

GEM VOl Reference Guide
Sample Call to C Language Binding

WORD
WORD
BYTE

vrq_string();
handle, length, echo_mode, echo_xv[];
*string;

vrq_string(handle, length, echo_mode, echo_xv, string);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

= 31
1
0
= 2
= string length
= 0
= handle

=
=

Input

Output

intin(O) = length
intin(1) = echo_mode
ptsin(O) = echoJY(O)
ptsin(l) = echoJy(1)

intout

= string

7-17

VRQ_STRING (lFH)

GEM VOl Reference Guide

VSM_STRING (1 FH)
vsm_string returns a string from the specified device. Upon entry,
vsm_string samples input; if data is available, it is accumulated, and
the function samples the input. again. vsm_string accumulates input
until one of the following events occurs:
• data is no longer available
• a carriage return is encountered
• the maximum string length is reached
If the string will always be terminated with RETURN, use vrq_string
(lFH); see page 7-16.
If the calling routine enables echo mode, text will be echoed to the
screen with the current text attributes using the vertex passed in
echo_yx as the justification point. vqt_attributes, described in Section
8, returns the current text attributes.
Note: Echo mode might not be available on all devices.
If the number passed as the maxiumum string length is negative, the
output string values returned by vrq_string conform to the standard
keyboard defined in Appendix o. In this case, the absolute value of
the length argument is used as the maximum string size.
Input Arguments
handle

device handle

length

Maximum string length

echo_mode

Echo mode:

o
1

No echo
Echo input characters at the specified position

x- and y-coordinates of echo area in NOC/RC units

7-18

VSM_STRING (lFH)

GEM VDI Reference Guide
Output Arguments
string

Output string, if sample successful
The string is word-oriented for the Parameter Block
Binding.
For the C Binding, the string is bvteoriented and null-terminated; its length includes an
additional byte for the terminating null.

status

Length of output string:

o Sample

unsuccessful (characters not available)

>0 Sample successful (characters available)
Sample Call to C Language Binding
WORD
WORD
BYTE

vsm_string();
status, handle, length, echo_mode, echo-xv[];
*string;

vsm_string(handle, length, echo_mode, echo_xv, string, &status);
Parameter Block Binding
Control
control(O)
control( 1)
control(2)
control(3)
control(4)
control(5)
control(6)

= 31
= 1
= 0
= 2
= status
= 0
= handle

Input

Output

intin(O) = length
intin(l) = echo_mode
ptsin(O) = echo.JLV

9-45

GEM VDI Reference Guide
V_WRITE_META (5-63H)
v_write_meta writes the intin and ptsin parameters to the metafile.
The first word of the intin array should contain a sub-opcode that
defines this information as a user-defined metafile item.
The VDI reserves sub-opcodes 0 through 100. The sub-opcode you
use to define your metafile item must be numbered 101 or higher.
Input Arguments
handle

Device handle

numjntin

Length of intin array

num-ptsin

Number of input vertices

intin

User-defined information

ptsin

User-defined information

Sample Call of C Language Binding
WORD
WORD

v_write_meta();
handle, numjntin, nurn_ptsin, intin[nurnjntin),
ptsin[num_ptsin);

v_write_meta(handle, nurn_intin, intin, num_ptsin, ptsin);
Parameter Block Binding
Control

=

control(O)
5
control(l) = num-ptsin
control(2) = 0
control(3) = num_intin
control(4) = 0
control(5) = 99
control(6) = handle

9-46

Output

Input
intin(O) = sub-opcode
intin
intin

=

ptsin = ptsin

VM_FILENAME (5-64H)

GEM VDI Reference Guide
VM_FILENAME (5-64H)

When a metafile is first opened, its default name is GEMFllE.GEM and
its default location is the current drive and directory. vrn_filename
renames a metafile from GEMFllE.GEM to the name specified by the
calling routine. The metafile extension of GEM is maintained. The
specified name can include a path and drive to locate the file
somewhere other than on the current drive and directory.
Note: Call this function immediately after opening the metafile (see
v_opnwk (1 H) in Section 3) or it has no effect. vm_filename closes and
deletes any open metafiles.
Before this function is invoked, all
metafile output is directed to GEMFllE.GEM.
Input Arguments

handle

Device handle

filename

Path/filename (null-terminated for C binding)

Sample Call to C Language Binding

WORD
WORD
BYTE

vm_filename;
handle;
*filename;

vm_filename(handle, filename);
Parameter Block Binding
Control

Input

Output

control(O) = 5
intin(O to n) = filename.
control(1) = 0
control(2)
0
control(3) = number of chars
in filename
control(4) = 0
control(5) = 100
control(6) = handle

=

End of Section 9

9-47

Appendix A
GEM VDI Error Messages

Command line syntax error
Description:

The VOl displays this message when the command
line includes an illegal character, path, or drive
specification.

Solution:

8e sure that the command line conforms the
operating system's command line conventions.
Reenter the command line after correcting illegal
entries.

Unable to find ASSIGN.SYS
Description:

This message indicates that the VOl is unable to find
the ASSIGN.SYS file in the specified location.

Solution:

Place the ASSIGN.SYS file in the current directory.

Error reading ASSIGN.SYS
Description:

The VOl cannot use the ASSIGN.SYS file because its
format is incorrect.

Solution:

Refer to Section 1 for the file's correct format.

Memory table corrupted
Description:

This message indicates that the system's memory is
corrupted.

Solution:

Reboot your system.

A-l

Error Messages

GEM VOl Reference Guide

Insufficient memory
Description:

This message indicates that the VOl cannot satisfy
your memory allocation request.

Solution:

If your system has enough memory to run the VOl,
reboot your system.

Invalid memory block address
Description:

This message indicates that the system's memory is
corrupted.

Solution:

Reboot the system.

Drive specification not allowed in ASSIGN.SYS
Description:

This message indicates that your ASSIGN.SYS file
contains an illegal drive specification.

Solution:

Edit the file to remove the drive specification. The
correct format of an ASSIGN.SYS file is described in
Section 1.

Illegal device id in ASSIGN.SYS
Description:

.The
VOl
displays
this
message
when
your
ASSIGN.SYS file contains a device 10 number that
exceeds the range of values listed in Table 1-1.

Solution:

Refer to Table 1-1 in Section 1 for the valid device
10 numbers. Correct the ASSIGN.SYS file with your
text editor.

Partial record found in ASSIGN.SYS

A-2

Description:

This message indicates that your ASSIGN.SYS file
contains a partial entry.

Solution:

Check your ASSIGN.SYS file for incomplete device 10
numbers or filenames. Refer to Section 1 for the
correct ASSIGN.SYS file format.

GEM VDI Reference Guide

Error Messages

Invalid filename encountered in ASSIGN.SYS
Description:

Your ASSIGN.SYS file contains a filename which Is
either too long or contains illegal characters.

Solution:

Locate the invalid filename within ASSIGN.SYS and
correct it using the following guidelines:
• The filename must have eight or fewer
characters.
• The first character in the filename must be
alphabetic.
• The file's extension must be SYS.

ASSIGN.SYS file is empty
Description:

The VDI displays this message to indicate that it has
found an empty ASSIGN.SYS file.

Solution:

Use your text editor to enter the necessary
ASSIGN.SYS information.
Section 1 describes the
ASSIGN.SYS contents.

Corrupted driver file
Description:

When the VDI has found, but is unable to use, a
device driver specified in ASSIGN.SYS, it displays this
message.

Solution:

Use your distribution disk to make another copy of
the device driver. Try to use the new copy. Contact
your dealer if you are unable to use the device
driver.

End of Appendix A

A-3

GEM VDI Reference Guide
GEM VOl Metafile Format

This appendix describes the information output by the metafile driver
and the operations it performs for various VDI functions.
Standard Metafile Item Format

Most of the function requests passed to the metafile driver result in
the driver writing a standard metafile item to the metafile buffer. In a
standard format metafile item, the control, integer, and vertex
parameters are written to the metafile in the format shown in Table
B-1.
Table 8-1.

Word

o
1
2
3
4...
n+4...

Value
control[O]
control[ 11
control[3]
control[5]
ptsin[O-n]
intin[O-m]

Control, Integer and Vertex Parameters

Description
opcode
vertex count
integer parameter count
sub-opcode (or zero)
input vertices (if provided)
input integer (if provided)

Note if the vertex or integer parameter count is zero, nothing is output
for the ptsin or intin information.

B-1

Standard Metafile Item Format
Standard Metafile Function

GEM VOl Reference Guide

Re~es!~

Requests for the functions listed below cause the metafile driver to
output a standard metafile item.
Opcode (Decimal)

3
4
5-2
5-3
5-20
5-21
5-22
5-23
5-25
6
7
8
9
11-1
11-2
11-3
11-4
11-5
11-6
11-7
11-8
11-9
11-10
12
13
14
15
16
17
18
19
20
21
22

B-2

Function
Clear Workstation, v_clrwk (3H)
Update Workstation, v_updwk (4H)
Exit Alpha Mode, v_exitcur (5-2H)
Enter Alpha Mode, v_entercur (5-3H)
Form Advance, v_form_adv (5-14H)
Output Window, v_output_window (5-15H)
Clear Display List, v_clear_dispJist (5-16H)
Output Bit Image File, v_bitjmage (5-17H)
Output Printer Alpha Text, v_alpha_text (5-19H)
Polyline, vJine (6H)
Polymarker, v_pmarker (7H)
Text, v_qtext (8H)
Fill Area, v_fillarea (9H)
Bar GOP, v_bar (B-1 H)
Arc GOP, v_arc (B-2H)
Pie GOP, v_pieslice (B-3 H)
Circle GOP, v_circle (B-4H)
Ellipse" GOP, v_ellipse (B-5H)
Elliptical Arc GOP, v_ellarc (B-6H)
Elliptical Pie Slice GOP, v_ellpie (B-7H)
Rounded Rectangle GOP, v_rbox (B-8H)
Filled, Rounded Rectangle GOP, v_rfbox (B-9H)
Justified Graphics Text GOP, vjustified (B-AH)
Set Character Height, Absolute Mode, vst_height (C
Set Character Baseline Vector, vst_rotation (OH)
Set Color Representation, vs_color (EH)
Set Polyline Line Type, vsl_type (FH)
Set Polyline line Width, vsl_width (10H)
Set Polyline Color Index, vsLcolor (11 H)
Set Polymarker Type, vsm_type (12H)
Set Polymarker Height, vsm_height (13H)
Set Polymarker Color Index, vsm_color (14H)
Set Text Font, vst_font (15H)
Set Text Color Index, vst_color (16H)

GEM VOl Reference Guide

23
24
25

32
39

104
106
107

108
112
113
114
129

Standard Metafile Item Format

Set Fill Interior Style, vsfJnterior (17H)
Set Fill Style Index, vSf_style (18H)
Set Fill Color Index, vsf_color (19H)
Set Writing Mode, vswr_mode (20H)
Set Graphic Text Alignment, vst_alignment (27H)
Set Fill Perimeter Visibility, vsf_perimeter (68H)
Set Graphic Text Special Effects, vst_effects (6AH)
Set Character Height, Points Mode, vst.jloint (6BH)
Set Polyline End Styles, vsl_ends (6CH)
Set User-defined Fill Pattern, vsf_udpat (70H)
Set User-defined Line Style Pattern, vsl_udsty (71 H)
Fill Rectangle, vr_recfl (72H)
Set Clipping Rectangle, vs_clip (81 H)

B-3

Standard Metafile Item Format

GEM VOl Reference Guide

Nonstandard Metafile Items

Open Workstation - v opnwk (1 H)
v_opnwk initializes the metafile buffer and writes the metafile header
to it. The device values normally returned by v_opnwk are returned.
The format of the metafile header is described below.
Metafile Header Format

8-4

Word

Description

o

Offffh

1

length of header in words

2

100*major version number + minor version number

3

NDC/RC transformation mode flag:

o

positive y values ascend from origin (origin in
lower left corner)

2

positive y values descend from origin (origin in
upper left corner)

4 - 7

Minimum and maximum x and y extent values for the
information contained in the metafile. If undefined by
the application (see v_meta_extents (5-62H) in
. Section 9), all four values are zero. The values are
stored in the following order: minimum x, minimum
y, maximum x, maximum y.

8 - 9

Physical page size:
page width in tenths of
millimeters, .followed by page height in tenths of
millimeters.
If undefined by the application, both
values are zero. (See Appendix C, "Reserved Metafile
Sub-opcodes.")

GEM VOl Reference Guide

Nonstandard Metafile Items

Word

Description

10 - 13

The coordinate window which
system used in the metafile.
application, all four values are
stored in the following order:
V, upper right x, upper right y.

14

Bit image opcode flag:

o
1

defines the coordinate
If undefined by the
zero. The values are
lower left x, lower left
(See Appendix C.)

No bit image opcode in file
Bit image opcode included in metafile

Bits 1 - 15 must be zero.
Close Workstation - v_clswk (2H)
v_clswk appends an end-of-metafile marker, OFFFFH (one word) to the
metafile buffer. It then flushes the buffer and closes the metafile.

B-5

Nonstandard Metafile Items

GEM VOl Reference Guide

Special Metafile Escapes
There are three escape functions that provide special functions for
metafiles.
These functions are briefly described here; Section 9
provides more detailed information.
Update Metafile Extents - v_meta_extents (5-62H)
v_meta_extents updates words 4 - 7 in the metafile header to indicate
the extents passed in the ptsin array.
Write Metafile Item - v_write_meta (5-63H)
v_write_meta writes the intin and ptsin parameters to the metafile.
The first word of the intin array should contain a sub-opcode that
defines what type of user-defined metafile item is being written. This
special sub-opcode can be used by an application to identify the
metafile item when it is read in. The VOl reserves sub-opcodes 0
through 100.
Change GEM VOl Filename - vm_filename (5-64H)
If any information currently exists in the metafile or metafile buffer,
vm_filename flushes the buffer and closes the file. vm_filename
reinitializes the metafile buffer and performs rudimentary file name
validation. If the drive, path, and filename are valid, they are used to
update the File Control Block (FCB) of the metafile. The metafile will
not actually be opened until the first buffer needs to be flushed.

8-6

Special Metafile Escapes

GEM VOl Reference Guide
Inquire Functions

Inquire Addressable Character Cells - vq_chcells (5-1 H)
vq_chcells returns -1 in both intout(O), rows, and intout(l), columns, to
indicate "that cursor addressing is not possible.
Inquire Color Representation - vq_color (1 AH)
vq_color returns -1 for the color index to indicate that no value is
available.
Inquire Current Polyline Attributes - vqLattributes (23H)
vqLattributes returns the set values.
Extended Inquire - vq_extnd (66H)
vq_extnd returns the appropriate inquiry values.

End of Appendix B

B-7

GEM VOl Reference Guide
Reserved Metafile Sub-opcodes

This appendix describes the metafile sub-opcodes reserved for two
Digital Research GEM applications, GEM Output™ and GEM DrawTM.
Metafile Sub-opcodes for GEM Output

The VOl reserves two sub-opcodes for sub-functions used by the GEM
Output application:
Sub-opcode

o

Sub-function
Physical Page Size -- Defines how large a picture is
to be rendered on the output page.
Coordinate
Window
Defines
a
newpage
transformation which maps from the metafile
coordinate system to the output device.

The two GEM Output metafile sub-opcodes result in an update of the
metafile header. The opcodes are not actually written to the body of
the metafile.

C-l

Physical Page Size

GEM VDI Reference Guide

Physical Page Size
This sub-function defines the size of the output area. All of the data
in the coordinate window is mapped to this area. If no physical page
size is defined, the Output application will attempt a best fit on the
target device, assuming that "pixels" in the metafile are square.
Input Arguments
control(O)
control(l)
control(3)
control(5)
control(6)
intin(O)
intin(l)
intin(2)

5

o
3

99
Device handle
Sub-opcode number, 0
Page width, in tenths of millimeter
Page height, in tenths of millimeter

Output Arguments
control(2)
control(4)

C-2

0
0

Coordinate Window

GEM VDI Reference Guide
Coordinate Window

This sub-function defines the coordinate system used in the metafile.
All of the data in the defined coordinate window is mapped to the area
defined by the Physical Page Size sub-function.
The coordinate window defaults to NDC space (0 to 32K). The location
of the origin (0, 0), depends on the coordinate space set when the
metafile was opened; see v_opnwk (lH) in Section 3. For example, if
raster coordinate space was specified when v_opnwk was invoked, the
origin would be located in the upper left corner of the display surface.
Note that the window corner information must be specified as the
lower left and upper right corners. Arbitrary opposing corners will not
convey enough information.
Input Arguments
control(O)
control(l)
control(3)
control(5)
control(6)
Intln(O)
Intln(l)
intin(2)
intin(3)
intin(4)

5

o
5
99
Device handle
Sub-opcode, 1
x-coordinate of
v-coordinate of
x-coordinate of
v-coordinate of

lower
lower
upper
upper

left corner of window
left corner of window
right corner of window
right corner of window

Output Arguments
control(2)
control(4)

0
0

C-3

Metafile Sub-opcodes for GEM Draw

GEM VOl Reference Guide

Metafile Sub-opcodes for GEM Draw·

The following sub-opcodes are reserved for use by the GEM Draw
application. GEM VOl defines the sub-opcodes for the following subfunctions:
Sub-opcode

C-4

Sub-function

10

Group

49

Set No line Style

50

Set Attribute Shadow On

51

. Set Attribute Shadow Off

80

Start Draw Area Type Primitive

81

End Draw Area Type Primitive

GEM VOl Reference Guide

Group

Group

This sub-function indicates how many previous primitives are grouped.
The number of preceding primitives in the group is passed to the subfunction in intin( 1).
Input Arguments

control(O)
control(l)
control(3)
control(5)
control(6)
intin(O)
intin(l)

5

o
2

99
Device handle
Sub-opcode number, 10
Number of preceding GEM Draw primitives in the
group

Output Arguments

control(2)
control(4)

0
0

C-5

GEM VOl Reference Guide

Set No Line Style
Set No Line Style

This sub-function is used by GEM Draw to indicate that subsequent
area type primitives are not to be outlined. The effects of this subopcode are cancelled by any subsequent calls to vsLtype (FH); see
Section 5.
Input Arguments
control(O)
control(l)
control(3)
control(5)
control(6)
intin(O)

5

o
1
99
Device handle
Sub-opcode number, 49

Output ·Arguments
control(2)
control(4)

C-6

0
0

GEM VDI Reference Guide

Set Attribute Shadow On

Set Attribute Shadow On
This sub-function is used bV GEM Draw to indicate that all subsequent
primitives that occur before the next Set Attribute Shadow Off subfunction should be ignored. This is because such primitives are used
to draw a drop shadow for the first primitive immediately following the
Set Attribute Shadow Off call.
Internally, GEM Draw assigns a shadowed attribute to the first
primitive that follows the Set Attribute Shadow Off call and performs
its own shadow drawing.
All attribute information which occurs
between Set Attribute Shadow On and Set Attribute Shadow Off will
continue to be processed.
Note that GEM Draw will not drop shadows from text or from polylines
consisting of only two vertices.
Input Arguments
control(O)
control(l)
control(3)
control(5)
control(6)
intin(O)

5

o
1

99
Device handle
Sub-opcode number, 50

Output Arguments
control(2)
control(4)

0
0

C-7

Set Attribute Shadow Off

GEM VOl Reference Guide

Set Attribute Shadow Off
This sub-function indicates to GEM Draw the end of primitives used to
draw a drop shadow qf the first primitive immediately following this
sub-opcode.
Input Arguments
control(O)
control(l)
control(3) .
control(5)
control(6)
intin(O)

5

o
1

99
Device handle
Sub-opcode number, 51

Output Arguments
control(2)
control(4)

C-8

0
0

GEM VOl Reference Guide

Start Draw Area Tvpe Primitive

Start Draw Area Type Primitive
This sub-function indicates to GEM Draw that an area type primitive
block follows. GEM Draw will use the vertices of the first primitive
(anvthing except text) that follows this sub-opcode to define a GEM
Draw area type primitive.
All other primitives encountered before the next End Draw Area Tvpe
Primitive sub-opcode will be ignored.
Input Arguments
control(O)
control(l)
control(3)
control(5)
control(6)
intin(O)

5

o
1
99
Device handle
Sub-opcode number,

ao

Output Arguments
control(2)
control(4)

0
0

C-g

End Draw Area Type Primitive

GEM VDIReference Guide

End Draw Area Type Primitive
This sub-function indicates the end of an area type primitive block to
GEM Draw.
Input Arguments
control(O)
control(l)
control(3)
control(5)
control(6)
intin(O)

5

o
1

99
Device handle
Sub-opcode number, 81

Output Arguments
control(2)
control(4)

0
0

End of Appendix C

C-10

Appendix D

Standard Keyboard

The VDI defines a standard keyboard so applications can take
advantage of special keys not defined in the standard, 7-bit ASCII
character set. A 16-bit value is used to return these characters. The
high byte contains a binary value assigned to each key. The low byte
contains the 7-bit ASCII varue, if such a value is defined, or a zero if
the code is an extended code.

Table D-1.
High Byte

03

GEM VDI Standard Keyboard Assignments
low Byte

1E

00
01

30
2E

03

20

04

12
21
22

05
06
07
08
09

23
17
24

02

OA
DB

25
26
32

DC

31
18

DE
OF

19
10

10

13
1F

12

14
16

00

11

13

14
15

Character
CNTL 2 (Nul)
CNTL A
CNTL B
CNTL C
CNTL 0
CNTL E
CNTL F
CNTL G
CNTL H
CNTll
CNTL J
CNTL K
CNTL L
CNTL M
CNTL N
CNTL 0
CNTL P
CNTL Q
CNTL R
CNTL S
CNTL T
CNTL U

D-1

Standard Keyboard

GEM VOl Reference Guide
Table 0-1. (Cont'd)

High Byte
2F
11
20
15
2C
1A
2B
1B
07
OC
39
02
28
04
05
06
08
28
OA
OB
09
00
33
OC
34
35
OB
02
03
04
05
06
07
08
09

0-2

Low Byte
16
17
18
19
1A
1B
1C
10
1E
1F
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
20
2E
2F
30
31
32
33
34
35
36
37
38

Character
CNTL V
CNTL W
CNTL X
CNTL Y
CNTL Z
CNTL [
CNTL \\
CNTL]
CNTL 6
CNTL Space
I

#
$
%

&

*
+

/

0
1
2
3
4
5
6
7
8

Standard Keyboard

GEM VOl Reference Guide
Table 0-1. (Cont'd)

High Byte
OA
27
27
33
00
34
35
03
1E
30
2E
20
12
21
22
23
17
24
25
26
32
31
18
19
10
13
1F
14
16
2F
11
20
15

Low Byte
39
3A
3B
3C
3D
3E
3F
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
40
4E
4F
50
51
52
53
54
55
56
57
58
59

Character
9

<
=

>
?
@

A
B
C
0
E
F
G
H
I

J

K
L
M
N

0
P
Q

R
S
T

U
V
W

X
y

0-3

Standard Keyboard

GEM VDI Reference Guide
Table 0-1. (Cont'd)

High Byte
2C
1A
28
18
07
OC
29
1E
30
2E
20
12
21
22
23
17
24
25
26
32
31
18
19
10
13
1F
14
16
2F
11
20
15
2C

0-4

Low 8yte
5A
58
5C
5D
5E
5F
60
61
62
63
64
65
66
67
68
69
6A
68
6C
60
6E
6F
70
71
72
73
74
75
76
77
78
79
7A

Character
Z
[
\\
]

"

_ (Underscore)
a
b
c
d

e
f

g
h
j

k

I
m

n
0

P
q

r
s
t
u
v
w
x

y
z

. Standard Keyboard

GEM VOl Reference Guide
Table 0-1. (Cont'd)
High Byte
1A
2B
1B
29
OE
81
78
79
7A
7B
7B
70
7E
7F
80
1E
30
2E
20
12
21
22
23
17
24
25
26
32
31
18
19
10
13
1F

Low Byte
78
7C
70
7E
7F
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00

Character

{

I
}

Rubout (DEL)
Alt 0
Alt 1
Alt 2
Alt 3
Alt 4
Alt 5
Alt 6
Alt 7
Alt 8
Alt 9
Alt A
Alt B
Alt C
Alt D
Alt E
Alt F
Alt G
Alt H
Alt I
Alt J
Alt K
Alt L
Alt M
Alt N
Alt 0
Alt P
Alt Q
Alt R
Alt S

0-5

Standard Keyboard

GEM VOl Reference Guide
Table 0-1. (Cont'd)

High Byte

14
16
2F
11
20
15
2C
3B
3C
3D
3E
3F
40
41
42
43
44
54
55
56
57
58
59
5A
58
5C
50
5E
5F
60
61
62
63
64

0-6

low Byte
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00

Character
Alt T
Alt U
Alt V
Alt W
Alt X
Alt Y
Alt Z
F1
F2
F3
F4
F5
F6
F7
F8
F9
FlO
Fll
F12
F13
F14
F15
F16
F17
F18
F19
F20
F21
F22
F23
F24
F25
F26
F27

Standard Keyboard

GEM VOl Reference Guide
Table D-1. (Cont'd)
High Byte
65
66
67
68
69
6A
6B
6C
60
6E
6F
70
71
73
40
40
74
50
50
48
48
51
51
76
49
49
84
77
47
47
52
52
53
53

low Byte
00
00
00
00
00
00
00
00
00
00
00
00
·00
00
00
36
00
00
32
00
38
00
33
00
00
39
00
00
00
37
00
30
00
2E

Character
F28
F29
F30
F31
F32
F33
F34
F35
F36
F37
F38
F39
F40
Ctrl left-arrow
right-arrow
Shift right-arrow
Ctrl right-arrow
down-arrow
Shift down-a rrow
up-arrow
Shift up-arrow
Page down
Shift Page down
Ctrl Page down
Page up
Shift Page up
Ctrl Page up
Ctrl Home
Home
Shift Home
Insert
Shift Insert
Delete
Shift Delete

0-7

GEM VOl Reference Guide

Standard Keyboard
Table 0-1. (Cont'd)

High Byte
72
37
01
OE
82
83
1C
1C
4C
4A
4E
OF
OF
4B
4B
4F
4F
75

Low Byte
00
2A
1B
08
00
00
OD
OA
35
2D
2B
09
00
00
34
00
31
00

End of Appendix 0

0-8

Character
Ctrl Print Screen
Print Screen
Escape
Backspace
Alt Alt =
CR
Ctrl CR
Shift Num Pad 5
Num Pad Num Pad +
Tab
Backtab
left-arrow
Shift left-arrow
End
Shift End
Ctrl End

GEM VOl Reference Guide
Processor-Specific Data

SOS6-Specific Data
Registers and Interrupts
The application program passes the address of the Parameter Block to
GEM VOl in registers DS:OX. Pass the VOl 10 number, 1139 (0473H), in
the register CX. The interrupt is EF.
Note: GEM VOl runs on Concurrent™ operating systems that support
DOS calls of versions 2.0 and above.
Exchange Mouse Movement Vector
For SOS6-based systems, the application-dependent code is invoked
via a CAll FAR (CAllF) instruction. On entry, the BX register contains
the new x position of the mouse; the CX register contains the new y
position of the mouse. When complete, the application-dependent
code should perform a RETURN FAR (RETF) instruction with the x,y
position of the mouse the driver is to store in BX, CX. See vex_motv
(7EH) in Section 7, "Input Functions," for information related to this
function.
Exchange Button Change Vector
For S086-based systems, the application code is invoked via a CALL
FAR (CAllF) instruction with register AX containing the mouse button
keys. Keys are encoded by the same rules that apply to the vq_mouse
(7CH) function.
When complete, the application-dependent code
should perform a RETURN FAR (RETF) instruction with the mouse
button state the driver is to store in AX. See vex_butv (70H) for
related information. Both vq_mouse and vex_butv are described in
Section 7.

E-1

GEM VOl Reference Guide

BOB6-Specific Data
Exchange Cursor Change Vector

For BOB6-based machines, the application-dependent code is invoked
with a CAll FAR (CAllF) instruction. Upon entry, register ex contains
the x position and the ex register the y pOSition at which the cursor is
to be drawn. If the application-dependent code does not draw its own
cursor, a CAll FAR should be performed to the address returned in
control(9) and control(10) with the x,y position at which to draw the
cursor in ex, ex. This causes GEM VOl to draw a cursor. When
complete, the application should perform a RETURN FAR (RETF)
instruction. See the description of vex_curv (7FH) in Section 7 for
related information.
Exchange Timer Interrupt Vector
For BOB6-based systems, the application-dependent code is invoked
with a CAll FAR (CAllF) instruction. When complete, the application
should perform a RETURN FAR (RETF) instruction.
See the description of vex_timv (76H)
information.

E-2

in

Section

7 for

related

GEM VOl Reference Guide

68000-Specific Data

68000-Specific Data
Registers and TRAPS
Pass the address of the Parameter Block to GEM VOl in one 32-bit
register, 00.1. Register D1.w contains the GEM VDI ID number 115
(73H).
For other 68K
For CP/M-68K:;" GEM VOl is invoked via TRAP 2.
operating systems that support GEM VDI, the TRAP is identified in the
operating system's manual.
Exchange Mouse Movement Vector
For 68000-based systems, the application-dependent code is invoked
via a JUMP TO SUBROUTINE (JSR) i'nstruction. On entry, the DO.w
register contains the new x position of the mouse. The D1.w register
contains the new y position" of the mouse.
When complete, the
application-dependent code should perform a RETURN FROM
SUBROUTINE (RTS) instruction with the x,y position of the mouse the
driver is to store in DO.w, D1.w.
See vex_motv
information.

(7EH)

in

Section

7, "Input Functions," for related

Exchange Button Change Vector
For 68000 processors, the application code is invoked via a JUMP TO
SUBROUTINE (JSR) instruction and OO.w contains the mouse button
keys. Keys are encoded by the same rules that apply to vq_mouse
(7CH).
When complete, the application-dependent code should
perform a RETURN FROM SUBROUTINE (RTS) instruction with the
mouse button state the driver is to store in DO.w.
See vex_butv (7DH) for related information.
vex_butv are described in Section 7.

Both vq_mouse and

E-3

68000-Specific Data

GEM VDI Reference Guide

Exchange Cursor Chanjle Vector
For 68000-based machines, the application-dependent code is invoked
with a JUMP TO SUBROUTINE (JSR) instruction. Upon entry, the DO.w
register contains the x position and the Dl.w register the y position. If
the application-dependent code does not draw its own cursor, a JUMP
TO SUBROUTINE (JSR) instruction should be performed to the address
returned in control(9) and control(10) with the x,y position at which to
draw the cursor in DO.w and Dl.w. This causes GEM VDI to draw a
cursor. When complete, the application should perform a RETURN
FROM SUBROUTINE (RTS) instruction.
Refer to the description of vex_curv (7FH) in Section 7 for related
information.
Exchange Timer Interrupt Vector
The application-dependent code· on 68000-based systems is invoked
with a JUMP TO SUBROUTINE (JSR) instruction. When complete, the
application should perform a RETURN FROM SUBROUTINE (RTS)
instruction.
Refer to the description of vex_timv (76H) in Section 7 for related
information.

End of Appendix E

E-4

GEM VOl Reference Guide
Character Sets and Font Files

Character Sets
The system fonts provided with the VOl are illustrated in figures F-l
and F-2. Figure F-l shows the USASCII character set. Figure F-2
shows the additional characters included to form the international
character set.
Note that external fonts (those which are dynamically loaded) do not
include characters for decimal equivalents 0 through 31; see "Font
Format," in this appendix.

F-l

GEM VDI Reference Guide

Character Sets

IIU'IMAI
VAIIII

•

16

.n

4N

64

NO

96

112

0

I

2

]

4

5

6

7

...

IUXA
IIHIMAI
VAlli.

0

()

I

I

2

2

3

3

4

4

5

5

II

6

6

~

7

7

+

8

8

9

9

@

lO

A

Q

II

B

.t

12

C

13

0

~

14

E

~

15

F

~

~
~

,..
.. t

~

J

Figure F-1.

F-2

()

•

,.

"IANI'
I\I'A! .1

,
0 @ p

1 A Q a
" 2 B R b
# 3 C S c
$ 4 D T d
0/0 5 E U e
& 6 F V f
, 7 G W g
( 8 H X h
) 9 I Y 1

·· J z
+ ,· K [
..

~:

, < L
-- M
> N
/ ·';) 0

P
q
r
S

t
u

v
W

x

Y
J z
k {
I

\ 1 I
] m }
1\ n 'V
-

0

!:::,.

GEM VOl USASCII Character Set

GEM VDI Reference Guide

..

DIIIMAI
VAlllf

•

mXA
I'HIMAI
VAlli.

Character Sets

176 192

128

144

160

8

9

A

B

,

,

-

1

-

1)

0

IJ

0

0



0

0

~ E a, a

I

I

U

2

2

,

F

E

--~ +
r >
7r
<
,.
a

§ n

D

"
1

E

A

3

4

4

5

5

6

6

7

7

8

8

9

9

10

A

II

B

12

C

13

14

Figure F-2.

e IE

,

D

a" 0" u p
..
a 0 n- re
"
a_
0" N CE
,
"
a
A
a u
"
~ u 0 A
.. .
"
y 6 6
e
..
..
e 0 I
,
e" 0 I
1 e V2 +
"1 £ 14
~

3

15

,

re

C

..

208 224 240

0

0

f

A

¥

n
f'

~
(1

.,

..

J.I.
T

,....,

""

¢

0

e

•

n
0

,.

©

cp

«

®

E

»

TM

n

f

2

I
BlANK
(~I'An)

GEM VOl International Character Set Extension

F-3

Font Data

GEM VOl Reference Guide

Font Format
The system fonts and external fonts used in GEM VOl are composed of
four parts: the font data, a font header, a character offset table, and a
horizontal offset table.
Font Data
The font data is organized as a single raster area. The area's height
equals the font height and its width equals the sum of the character
widths.
The top scan line of the first character in the font is aligned to a byte
boundary. The top scan line of the second character is abutted to the
first character and Is not necessarily byte-aligned. That is, the end of
any character and the beginning of the following character often occur
within the same byte; no byte alignment occurs within the font form.
Bit padding occurs only at the end of a scan line. Each scan line in
the font form begins on a word boundary. The number of bytes from
the beginning of one scan line to the beginning of the next is called
the form width.
The number of scan lines required to draw any
character is called the form height.
The format of the file is such that the low byte of a word occurs in
memory before the high byte.
Font Header
The font header contains information that describes global aspects of
the font. Font global aspects include information that applies to every
character of the font, for example, the name of the face, the font size,
and the minimum and maximum characters in the font. The format of
the font header is shown in Table F-l.

F-4

GEM VOl Reference Guide

Table F-1.
Byte Number

o-

1

Font Header

Font Header Format

Description
Font identifier; see vst_font (15H) In Section 5

2 - 3

Font size in points

4 - 35

Font name; see vqt_name (82H) in Section 8

36 - 37

Lowest ADE value in the font, first character

38 - 39

Highest ADE value in the font, last character

40 - 41

*Top line distance

42 - 43

*Ascent line distance

44 .:. . 45

*Half line distance

46 - 47

*Descent line distance

48 - 49

*Bottom line distance

50 - 51

Width of the widest character in the font

52 - 53

Width of the widest character cell in the face

54 - 55

Left offset; see vqt_font_info (83H) in Section 8 '

56 - 57

Right offset see vqt_font_info (83H) in Section 8

58 - 59

Thickening; this is the number of pixels by which to
widen thickened characters

60 - 61

Underline size; this is the pixel-width of the underline

*Distances are measured relative to the character baseline and are
always a positive value (magnitude rather than offset).

F-5

Font Header

GEM VOl Reference Guide
Table F-1. (Cont'd)

Byte Number

Description

62 - 63

lightening mask; this mask is used to drop pixels out
when lightening (usually 5555H)

64 - 65

Skewing mask; this mask determines when additional
character rotation is required to perform skewing
(usually 5555H)

66 - 67

Flags:
Bit 0 Set if default system font
Bit 1 Set if horizontal offset tables should be used
Bit 2 Reservered -- must be zero
Bit 3 Set if mono-spaced font

68 - 71

Pointer to the horizontal offset table

72 - 75

Pointer to the character offset table

76 - 79

Pointer to the font data

80 - 81

Form width (see "Font Data")

82 - 83

Form height (see "Font Data")

84 - 87

Pointer to the next font (set by the driver)

Character Offset
The character offset table is used to index into the font data and to
determine the width of specific characters in the font. It is indexed by
relative character value (the ADE value of the desired character, minus
the lowest ADE value in the font) and yields the offset from the base
of the font data to the beginning of the character definition. The
difference between the offset to a character and the offset to the
following character gives the width of the character. Note that the
character offset table includes one more entry than the number of
characters in the font so that a width may be obtained for the final
character in the font.
Note:
fonts.

F-6

The character offset table is required even for mono-spaced

Character Offset

GEM VOl Reference Guide
Horizontal Offset Table

The horizontal offset table is indexed by relative character value and
yields any additional positive or negative spacing necessary before
outputting the character. The horizontal offset table often does not
exist; this is indicated by the horizontal offset table bit in the Flags
word (66) of the font header.

End of Appendix F

F-7

GEM VOl Reference Guide
Bit Image File Format

A GEM VOl bit image file contains information that can be used to recreate a picture from its bit (pixel) image. The file consists of a
header and raw pixel information.
The pixel information can be
encoded in a variety of formats.
A bit image file has an extension of IMG.
Bit Image File Header
The bit image file header consists eight 16-bit words in which the
high order byte precedes the low order byte. The header words are
defined as listed in Table G-l.
Table G-1.
Word

o
1
2
3
4
5
6
7

Bit Image File Header Format

Contents
Image file version number
Header length in words
Number of planes (source device bits per pixel)
Pattern definition length (number of bytes)
Source device pixel width (microns)
Source device pixel height (microns)
Scan line width (pixels)
Number of scan line items

Word 1 indicates how long the header is. Always check this value;
future releases of GEM might have a longer header.
Word 3 defines the number of bytes used to describe pattern_run
(pattern_run is described below). The value can range from 1 to a.
Note that this value is 2 for most bit image files taken from screen
devices.

G-1

Bit Image File Header

GEM VDI Reference Guide

Bit Image File Data Format
The bit image data is composed of a series of scan line items. Word 7
in the file header indicates how many scan line items are present.
Each scan line item has two components:
• a vertical replication count
• encoded data for each plane
The vertical replication count is a word value formatted as follows:
Byte
0
1
2

3

Contents
NUL
NUL
FF Hex
Count

The count indicates how many identical scan lines are defined in this
scan_line item.
The encoded data for each color plane follows the vertical replication
count. The data is presented in the following order:
first plane -- red
second plane -- green
third plane -- blue
fourth plane -- grey
Data is always provided for all defined bit planes.
Note: The number of pixels described for each bit plane of a scan line
is not necessarily the scan line width specified in the file header.
Because the data is encoded in byte-wide packets (groups of eight
pixels), the number of pixels actually described is always a multiple of
eight and is never more than seven pixels wider than the scan line
width.

G-2

GEM VDI Reference Guide

Bit Image File Data Format

Plane data is encoded in one of three modes: solid run, pattern run, or
bit string.
A solid_run item contains a single byte that describes a state and the
number of bytes for which that state is true. The high-order bit
defines the state where:
1 = pixels on
off

o = pixels

The low-order seven bits define the run length. For example, to set a
stream of 24 pixels (3 bytes) on, the encoded data is 83H. Similarly, to
set a stream of 256 pixels (32 bytes) off, the encoded data is 20H.
A pattern_run item describes a set of pattern bytes and the number of
times the pattern bytes should be repeated. The number of bytes in a
pattern is defined in the bit image file header; typically, it is two for a
screen device image. A pattern_run item is defined as follows:
Bvte

o
1
2

n

Contents
NUL
Length of run
First byte of pattern

Last byte of pattern
(n is defined by header word 3)

For example, a stream of 48 pixels (6 bytes) alternating red and blue
with a pattern width of two is encoded as follows:
• Red plane item (hex values): 00 03 AA AA
• Blue plane item (hex values): 00 03 55 55
• Green plane item: The green bit plane in this example is a solid
run so the encoded data is 06H (all pixels are off).

G-3

Bit Image File Data Format

GEM VDI Reference Guide

If a stream of pixels for a given plane cannot be encoded efficiently as
a solid run or pattern run, it must be encoded as a bit_string. A
bit_string item is defined as follows:
Byte

o

Contents

1
2

80 Hex
Byte count
First byte of bit string

n

Last byte of bit string

End of Appendix G

G-4

Index

8086-specific data, E-1

Attribute shadow, C-7, C-8
Axis scaling, 9-26

68000-specific data, E-3

B
A

Absolute mode, 5-19
Alpha cursor control, 9-6, 9-7,
9-8, 9-9, 9-10, 9-13,
9-17
Alpha Cursor Down, v_curdown,
9-7
Alpha Cursor Lett, v_curlett, 9-9
Alpha cursor position, 9-17
Alpha Cursor Right, v_curright,
9-8
Alpha Cursor Up, v_curup, 9-6
Alpha text attribute, 9-15, 9-16
Alpha text string output, 9-14
Angle specifications, 4-15
Arc, v_arc, 4-17
Arrays, 1-5
Ascent line, 5-32
ASCII values, 0-1
Assembly language routines,
2-11
ASSIGN.SYS, 1-4, 3-18
ASSIGN.SYS error messages,
A-1
Assignment table, 1-4
Attribute functions, 5-2

Background color, 3-4, 3-13
Bar, v_bar, 4-16
Baseline, 5-31
Baseline vector, 5-23
Bit image encoding modes, G-3
Bit image file, 9-26
Bit image file
color planes, G-2
data, G-1, G-2
file header, G-1
version, G-1
Bit string encoding, G-3
Bottom line, 5-32

c
Cell Array, v_cellarray, 3-8, 4-12
Change GEM VOl Filename,
vm_filename, 9-47
Character baseline, 5-19
Character cell, 5-19
Character codes, 0-1
Character height, 3-9
Character offset table, F-6
Character rotation support, 8-15
Character sGan line, F-4

Index-1

Character sets, F-1
Character size, 5-21
Character thickening, F-5
Character top line, 5-19
Character width, 3-9
Circle, v_circle, 4-21
Clear device, 3-13
Clear Display list,
v_clear_dispJist, 9-25
Clear Workstation, v_clrwk, 3-13
Clipping rectangle, 3-20, 8-17
Close events, 3-12
Close Virtual Workstation,
v_clsvwk,3-17
Close Workstation, v_clswk,
3-12
Color index, pixel, 6-9
Color table index values, 3-4
Command line error messages,
A-1
Command, GEMVDI, 2-15
Contour Fill, v_contourfill, 4-29,
8-15
Control, 2-11
Control array, 1-5, 2-11
Control functions, 3-1
Coordinate scaling, 1-2
Coordinate systems, 1-6, 6-6
Coordinate window, C-2, C-3
Copy Raster, Opaque,
vro_cpyfm, 6-10
Copy Raster, Transparent,
vrt_cpyfm, 6-13
CP/M-68K, E-3
Cursor mask, 7-20

Index-2

D
Default values
character baseline rotation,
3-3
character height, 3-3
clipping, 3-3
color index, 3-4
cursor, 3-3
fill parameter visibility, 3-3
input mode, 3-3
line width, 3-3
marker height, 3-3
polyline end style, 3-3
text alignment, 3-3
text style, 3-3
user-defined fill pattern, 3-3
user-defined line style, 3-3
writing mode, 3-3 .
Descent line, 5-32
Device driver names, 1-4
Device Drivers, 1-2
Device handle, 1-3, 3-2
Device ID number, 1-4, 3-5
Device type, 3-9
Device-specific information,
8-14
Direct Alpha Cursor Address,
vs_curaddress, 9-13
Disable/enable Film Exposure,
vsc_expose, 9-44

E

Echo mode, 7-16, 7-18
Ellipse, v_ellipse, 4-22

Elliptical Arc, v_ellarc, 4-23
Elliptical Pie, v_ellpie, 4-24
End Draw Area Type Primitive,
C-10
End-of-metafile marker, B-5
Enter Alpha Mode, v_enter_cur,
9-5
Entering alpha mode, 9-5
Entering graphics mode, 9-4
Erase to End of Alpha Screen,
v _eeos, 9-11
Erase to End of Alpha Text Line,
v _eeol, 9-12
Error messages, A-1
Escape functions, 9-1
Exchange Button Change Vector
(68000), E-3
Exchange Button Change Vector
(8086), E-1
Exchange Button Change Vector,
vex_butv, 7-28
Exchange Cursor Change Vector
(68000), E-4
Exchange Cursor Change Vector
(8086), E-2
Exchange Cursor Change Vector,
vex_curv, 7-32
Exchange Mouse Movement
Vector (68000), E-3
Exchange Mouse Movement
Vector (8086), E-1
Exchange Mouse Movement
Vector, vex_motv, 7-30
Exchange Timer Interrupt Vector
(68000), E-4
Exchange Timer Interrupt Vector
(8086), E-2

Exchange Timer Interrupt
Vector, vex_timv, 7-22
Execute graphics commands,
3-14
Exit Alpha Mode, v_exit_cur, 9-4
Exposure time, 9-41
Extended Inquire, vq_extnd, 8-14
External fonts, F-4

F
Face values, 5-25
Fill interior style, 5-33
Fill perimeter attribute, 4-10
Fill Rectangle, vr_recfl, 4-30
Filled Area, v _flllarea, 3-8, 4-10
Filled Rounded Rectangle,
v_rfbox, 4-26
Film name, 9-42
Film type, 9-41
Flood fill, 4-29
Font
ADE values, F-5
ascent line distance, F-5
bottom line distance, F-5
byte-orientation, F-6
character offset table, F-6
data, F-4
descent line distance, F-5
form height, F-4
form width, F-4
format, F-4
global aspects, F-4
half line distance, F-5
header, F-4
horizontal offset table, F-6,

Index-3

F-7
identifier, F-5
lightening mask, F-6
raster area, F-4
size in points, F-5
skewing mask, F-6
top line distance, F-5
underline size, F-5
Font identifiers, 3-18
Fonts, 3-18, 3-19
Form Advance, v_form_adv, 9-22
Function parameter format, 2-11

G
GOOS, 1-2
GOP attributes, 3-8
GOP ID numbers, 4-14
GOPs,3-7
GEM Draw, C-4
GEM file extension, 9-47
GEM Output, C-l
GEMFILE.GEM, 9-47
GEMVDI command, 2-15
Generalized Drawing Primitives,
·
3-7,4-14
Generate Tone, v_sound, 9-34
Get Pixel, v-!)et-pixel, 6-9
Graphic cursor control, 9-20,
9-21
Group sub-function, C-5

H
Half line, 5-32

Index-4

Handle, 3-2
Handle
root device, 3-15
Hard Copy, v_hardcopy, 9-19
Hide Cursor, v_hide_c, 7-26
Home Alpha Cursor, v_curhome,
9-10
Horizontal offset table, F-6, F-7

ID number
device, 3-5
IMG file extension, 0-1
Initiating printer output, 3-14
Input Choice, Request Mode,
vrq_choice, 7-13
Input Choice, Sample Mode,
vsm_choice, 7-14
Input functions, 7-1
Input Locator, Request Mode,
vrqJocator, 7-5
Input Locator, Sample Mode,
vsm_locator, 7-7
Input modes, 7-1
Input parameters array, 1-5,
2-11
Input point coordinates array,
1-5,2-11
Input String, Request Mode,
vrq_string,7-16
Input String, Sample Mode,
vsm_string, 7-18
Input Valuator, Request Mode,
vrq_valuator, 7-9
Input Valuator, Sample Mode,

vsm_valuator, 7-11
Inquide Functions, 8-1
Inquire Addressable Alpha
Character Cells,
vq_chcells, 9-3
Inquire Camera Film Name,
vqp_filmname, 9-42
Inquire Cell Array, vq_cellarray,
8-4
Inquire Character Cell Width,
vqt_width, 8-22
Inquire Color Representation,
vq_color, 8-2
Inquire Current Alpha Cursor
Address, vq_curaddress,
9-17
Inquire Current Fill Area
Attributes, vqf_attributes,
8-10
Inquire Current Font
Information, vqt_font_info,
8-26
Inquire Current Graphic Text
Attributes, vqt_attributes,
8-12
Inquire Current Polyline
Attributes, vqLattributes,
8-6
Inquire Current Polymarker
Attributes, vqm_attributes,
8-8
Inquire Font Name and Index,
vqt_name, 8-24
Inquire Input Mode, vqin_mode,
8-18
Inquire Justified Graphics Text,
vqtjustified, 8-29

Inquire Printer Scan Heights,
vq_scan, 9-29
Inquire Tablet Dimensions,
vq_tdimensions, 9-39
Inquire Tablet Status,
vq_tabstatus, 9-18
Inquire Text Extent, vqt_extent,
8-19
Interrupts
MS-DOS, E-1
PC DOS, E-1
Intin, 2-11
Intin array, 2-11
Intout, 2-11

J
Justified Graphics Text,
vJustified, 4-27

K
Keyboard definition, 0-1

L
Length of integer array, 2-14
Length of intin array, 8-16
Line style pattern word, 5-8
Line type values, 5-8
Line width, 3-10
Load Fonts, vstJoad_fonts, 3-18
Locator terminator, 7-6

Index-5

M

N

Marker height, 3-10
Marker width, 3-10
Maximum number of veritces,
8-16
Memory error messages, A-1
Memory Form Definition Block,
6-2
Memory requirements, 2-16
Metafile, 1-3, 3-14
Metafile
Metafile, 3-13
extent values, B-4
format, A-3
header format, B-4
item, B-1
reserved sub-opcodes, C-1
special escapes, B-6
Metafile bounding rectangle,
9-45
Metafile extent values, 9-45
Metafile item, 9-46
Metafiles, 9-45, 9-46, 9-47
Metaile header, 9-45
MFDB,6-2
MFDB form format flag, 6-4
Mouse
button state, E-1, E-3
position, E-1, E-3
Mouse button state, 7-27
Mouse form, 7-20
MS-DOS registers and
interrupts, E-1
Muting flag, 9-35

Noe, 1-6
Normalized coordinate space,
1-2
Normalized Device Coordinates,
1-6
Number of available colors, 3-8
Number of character heights,
3-6
Number of choice devices, 3-9
Number of colors, 8-15
Number of columns, 9-3
Number of faces, 3-7
Number of hatch styles, 3-7
Number of line types, 3-6
Number of line widths, 3-7
Number of locator devices, 3-8
Number of marker sizes, 3-7
Number of marker types, 3-7
Number of patterns, 3-7
Number of rows, 9-3
Number of string devices, 3-9
Number of valuator devices, 3-9

Index-6

o
Offset
character, F-6
horizontal, F-7
Opcode
1H, v_opnwk, 3-2
2H, v_clswk, 3-12
3H, v_clrwk, 3-13
4H, v_updwk, 3-14
5-1 H, vq_chcells, 9-3

5-2H, v_exit_cur, 9-4
5-3H, v_enter_cur, 9-5
5-4H, v_curup, 9-6
5-5H, v_curdown, 9-7
5-6H, v_curright, 9-8
5-7H, "V_curlett, 9-9
5-8H, v_curhome, 9-10
5-9H, v_eeos, 9-11
5-AH, v_eeol, 9-12
5-BH, vs_curaddress, 9-13
5-CH, v_curtext, 9-14
5-DH, v_rvon, 9-15
5-EH, v_rvoff, 9-16
5-FH, vq_curaddress, 9-17
5-10H, v_eeol, 9-18
5-11H, v_hardcopy, 9-19
5-12H, v_dspcur, 9-20
5-13H, v_rmcur, 9-21
5-14H, v_form_adv, 9-22
5-15H, v_output_window, 9-23
5-16H, v_clear_dispJist, 9-25
5-17H, v_bitjmage, 9-26
5-18H, vq_scan, 9-29
5-19H, v_alpha_text, 9-31
5-3CH, vs_palette, 9-33
5-3DH, v_sound, 9-34
5-3EH, vs_mute, 9-35
5-51 H, vt_resolution, 9-36
5-52H, vt_axis, 9-37
5-53H, vt_origin, 9-38
5-54H, vq_tdimensions, 9-39
5-55H, vt_alignment, 9-40
5-5BH, vsp_film, 9-41
5-5CH, vqp_filmname, 9-42
5-5DH, vsc_expose, 9-44
5-62H, v_meta_extents, 9-45
5-63H, v_write_meta, 9-46

5-64H, vm_filename, 9-47
6H, v_pline, 4-4
7H, v_pmarker, 4-6
8H, v -9text, 4-8
9H, v_fillarea, 4-10
AH, v_cellarray, 3-8, 4-12
B-1H, v_bar, 4-16
B-2H, v_arc, 4-17
B-3H, v_pieslice, 4-19
B-4H, v_circle, 4-21
B-5H, v_ellipse, 4-22
B-6H, v_ellarc, 4-23
B-7H, v_ellpie, 4-24
B-8H, v_rbox, 4-25
B-9H, v_rfbox, 4-26
B-AH, vJustified, 4-27
CH, vst_height, 5-19
DH, vst_rotation, 3-8, 5-23
EH, vs_color, 3-8, 5-6
FH, vsLtype, 5-8
10H, vsLwidth, 5-11 .
11 H, vsLcolor, 5-12
12H, vsm_type, 5-15
13H, vsm_height, 5-17
14H, vsm_color, 5-18
15H, vst_font, 5-25
16H, vst_color, 5-27
17H, vsfjnterior, 5-33
18H, vsf_style, 5-35
19H, vsf_color, 5-38
1AH, vq_color, 8-2
1BH, vq_cellarray, 8-4
1CH, vrqJocator, 7-5
1DH, vrq_valuator, 7-9
1DH, vsm_valuator, 7-11
1EH, vrq_choice, 7-13
1EH, vsm_choice, 7-14

Index-7

1FH, vrq_string, 7-16
1FH, vsm_string, 7-18
20H, vswr_mode, 5-3
21H, vsin_mode, 7-3
23H, vql_attributes, 8-6
24H, vqm_attributes, 8-8
25H, vqf_attributes, 8-10
26H, vqt_attributes, 8-12
27H, vst_alignment, 5-31
64H, v _opnvwk, 3-15
65H, v_clsvwk, 3-17
66H, vq_extnd (66H), 8-14
67H, v_contourfill, 4-29
68H, vsf_perimeter, 5-39
69H, v-get_pixel, 6-9
6AH, vst_effects, 5-28
6BH, vst_point, 5-21
6CH, vsLends, 5-13
60H, vro_cpyfm, 6-10
6EH, vr_trnfm, 6-12
6FH, vsc_form, 7-20
70H, vsf_udpat, 5-40
71H, vsl_udsty, 5'-10
72H, vr_recfl, 4-30
73H, vqin_mode, 8-18
74H, vqt_extent, 8-19
75H, vqt_width, 8-22
76H, vex_timv, 7-22
77H, vst_load_fonts, 3-18
78H, vst_unload_fonts, 3-19
79H, vrt_cpyfm, 6-13
7AH, v_show_c, 7-24
7BH, v_hide_c, 7-26
7CH, vq_mouse, 7-27
70H, vex_butv, 7-28
7EH, vex_motv, 7-30
7FH, vex_curv, 7-32

Index-8

80H,
81 H,
82H,
83H,
84H,

vq_key_s, 7-34
vs_clip, 3-20
vqt_name, 8-24
vqt_fontJnfo, 8-26
vqtjustified, 8-29

Opcodes, 1-3
Opcodes
for assembly language calls,
2-11
Open Virtual Workstation,
v _opnvwk, 3-15
Open Workstation, v_opnwk,
3-2, 8-14
Output Bit Image File,
v_bit_image, 9-26
Output Cursor Addressable
Alpha Text, v_curtext,
9-14
Output function fill attributes,
4-3
Output function line attributes,
4-2
Output function text attributes,
4-3
Output functions, 4-1
Output parameters array, 1-5,
2-11
Output point coordinates array,
1-5, 2-11
Output Printer Alpha Text,
v_alpha_text, 9-31
Output Window,
v_output_window, 9-23

p
Parameter Block (PB), 2-11
Parameter Block
address (68000), E-3
address (8086), E-1
format, 2-11
Pattern run encoding, G-3
Pattern word, 5-8
PB, 2-11
PC DOS registers and interrupts,
E-1
Physical Page Size, C-2
Pie, v_pieslice, 4-19
Pixel aspect ration, 9-26
Pixel color index, 6-9
Pixel height, 3-6
Pixel height of printer head
pass, 9-29
Pixel image, G-1
Pixel width, 3-6
Place Graphics Cursor, v_dspcur,
9-20
Plane data encoding, G-3
Plotter buffer, 3-14
Point size, 5-21
Points mode, 5-21
Polyline color index values, 3-4
Polyline, v_pline, 4-4
Polymarker type values, 5-15
Polymarker, v_pmarker, 4-6
Primitive 10 numbers, 4-14
Printer buffer, 3-14
Printer display list, 9-22, 9-25
Printer head passes per page,
9-29
Printer scan height, 9-29

Ptsin, 2-11
Ptsin array, 2-11
Ptsout, 2-11

R
Raster
Raster
Raster
Raster
Raster

area, 6-2
area formats, 6-4
Coordinates, RC, 1-7
logic operations, 6-7
operation writing modes,
6-13
Raster operations, 6-1
RC, 1-7
Registers
68000, E-3
MS-DOS, E-1
PC DOS, E-1
Remove last Cursor, v_rmcur,
9-21
Renaming a metafile, 9-47
Replace mode, 5-3
Request input mode, 7-1
Required functions, 2-2
Return string, 7-16, 7-18
Reverse transparent mode, 5-4
Reverse Video Off, v_rvoff, 9-16
Reverse Video On, v_rvon, 9-15
RGB, 5-6
Root device handle, 3-15, 3-19,
7-30, 7-32
Rounded Rectangle, v_rbox,
4-25

Index-9

s
Sample input mode, 7-1
Sample Keyboard State
Information, vq_key_s,
7-34
Sample Mouse Button State,
vq_mouse, 7-27
Sample program, 2-17
Scaling rectangle, 9-26
Scan height division factor,
9-29
Scan line, F-4
Screen type, 8-14
Seed fill, 4-29
Select Camera Film Type and
Exposure, vsp_film, 9-41
Select Palette, vs_palette, 9-33
Set Attribute Shadow Off, C-8
Set Attribute Shadow On, C-7
Set Character Baseline Vector,
vst_rotation, 5-23
Set Character Cell Height,
Points Mode, vst_point,
5-21
Set Character Height, Absolute
Mode, vst_height, 5-19
Set Clipping Rectangle, vs_clip,
3-20, 8-16
Set Color Representation,
vs_color, 3-8, 5-6
Set Fill Color Index, vsf_color,
5-38
Set Fill Interior Style,
vsfjnterior, 5-33
Set Fill Perimeter Visibility,
vSf_perimeter, 5-39

Index-10

Set Fill Style Index, vSf_style,
5-35
Set Graphic Text Alignment,
vst_alignment, 5-31
Set Graphic Text Special Effects,
vst_effects, 5-28
Set Input Mode, vsin_mode, 7-3
Set Mouse Form, vsc_form, 7-20
Set No Line Style, C-6
Set Polyline Color Index,
vsLcolor, 5-12
Set Polyline End Styles,
vsLends, 5-13
Set Polyline Line Type, vsLtype,
5-8
Set Polyline Width, vsl_width,
5-11
Set Polymarker Color Index,
vsm_color, 5... 18
Set Polymarker Height,
vsm_helght,5-17
Set Polymarker Type, vsm_type,
5-15
Set Tablet Alignment,
vt_alignment, 9-40
Set Tablet Axis Resolution,
vt_axis, 9-37
Set Tablet Origin, vt_origin,
9-38
Set Tablet Resolution,
vt_resolution, 9-36
Set Text Color Index, vst_color,
5-27
Set Text Font, vst_font, 5-25
Set User-defined Fill Pattern,
vSf_udpat, 5-40
Set User-defined Line Style,

vsLudsty, 5-10
Set Writing Mode, vswr_mode,
5-3
Set/Clear Muting Flag, vs_mute,
9-35
Setting
color index, 5-6
exposure time, 9-41
fill area perimeter, 5-39
fill color, 5-38
fill interior style, 5-33
fill style, 5-35
line color, 5-12
line end style, 5-13
line type, 5-8
line width, 5-11
marker color, 5-18
marker height, 5-17
marker type, 5-15
text alignment, 5-31
text color, 5-27
text effects, 5-28
text font, 5-25
writing mode, 5-3
Show Cursor, v_show_c, 7-24
Solid run encoding, G-3
Sound, 9-34
Sound suppression, 9-35
Special metafile escapes, 8-6
Stack requirements, 2-16
Standard keyboard, 0-1
Start Draw Area Type Primitive,
C-9
Sub-opcodes, C-1
Sub-opcodes
Coordinate Window, C-3
End Draw Area Type Primitive,

C-10
Group, C-5
Physical Page Size, C-2
Set Attribute Shadow Off, C-8
Set Attribute Shadow On, C-7
Set Draw Area Type Primitive,
C-9
Set No line Style, C-6
System fonts, F-4

T
Table axes alignment, 9-40
Table resolution, 9-36
Terminator character, 7-6
Text alignment, 5-31
Text effect word, 5-28
Text effects, 5-28,8-15
Text Rotation, vst_rotation, 3-8
Text, v-9text, 4-8
Top line, 5-32
Transform Mode, vr_trnfm, 6-12
Transformation mode 0, 1-6
Transformation mode 2, 1-7
Transparent mode, 5-4
TRAP instruction, 68000, E-3

u
Undefined character symbol,
4-8, 4-27
Unload Fonts, vst_unload_fonts,
3-19
Update Metafile Extents,
v_meta_extents, 9-45

Index-l1

Update Workstation, v_updwk,
3-14
USASCII character set, F-l
User-defined metafile item,
9-46

v
v_alpha_text, 9-31
v_arc, 4-17
v_bar, 4-16
v_bitJmage, 9-26
v_cellarray, 3-8, 4-12
v_circle, 4-21
v_clear_dispJist, 9-25
v_clrwk, 3-13, 9-22, 9-25
v _clsvwk, 3-17
v_clswk, 3-12, 8-5
v_contourfill (67H), 8-15
v_contourfill, 4-29
v_curdown, 9-7
v_curhome, 9-10
v_curlett, 9-9
v_curright, 9-8
v_curtext, 9-14
v_curup, 9~6
v_dspcur, 9-20
v_eeol, 9-12
v _eeos, 9-11
v_ellarc, 4-23
v_ellipse, 4-22
v_ellpie, 4-24
v_enter_cur, 9-5
v_exit_cur, 9-4
v_fill area, 3-8, 4-10
v_form_adv, 3-13, 9-22

Index-12

v--get_pixel, 6-9
v--9text, 4-8
v_hardcopy, 9-19
v_hide_c, 7-24, 7-26
vjustified, 4-27
v_meta_extents, 9-45, 8-4, 8-6
v_opnvwk, 3-15, 7-13, 7-14,
7-26
v_opnwk, 3-2, 7-13, 7-14, 7-26,
8-14, 8-4, C-3
v_output_window, 9-23
v_pieslice, 4-19
v_pline, 4-4
v_pmarker, 4-6
v_pmarker attributes, 4-2
v_rbox, 4-25
v_recfl, 4-30
v_rfbox, 4-26
v_rmcur, 9-21
v_rvoff, 9-16
v_rvon,9-15
v_show_c, 7-20, 7-24, 7-26
v_updwk, 3-14, 9-23
v_write_meta, 9-46, 8-6
Valuator keys, 7-9
Values
ASCII, 0-1
ASCII Decimal Equivalent, F-5
default attributes, 3-3
device type, 3-9
face, 5-25
fill interior style, 5-33
fill- style, 5-36
keyboard, 0-1
line ends, 5-13
line points, 5-13
line type, 5-8

metafile extent, B-4
MFOB format flag, 6-4
pixel-to-color-Index, 6-4
polymarker type, 5-15
text effects, 5-28
VOl entry point, 1-5
VOl 10 number
68000, E-3
8086, E-l
VOl keyboard assignments, 0-1
vex_butv, 7-28, E-l, E-3
vex_curv, 7-32, E-2, E-4
vex_rnotv, 7-30, E-l, E-3
vex_tirnv, 7-22, E-2, E-4
virtual workstations, 3-15
vrn_filename, 9-47, B-6
vq_cellarray, 8-4
vq_chcells, 9-3, 9-13, B-7
vq_color, 8-2
vq_curaddress, 9-17
vq_extnd, 3-2, 3-20, 4-4, 4-6,
4-8, 4-10, 4-27, 4-29,
6-10,8-14,9-31
vq_key_s, 7-34
vq_mouse, 7-27, E-1, E-3
vq_scan, 9-29
vq_tabstatus, 9-18
vq_tdimensions, 9-39
vqf_attributes, 8-10
vqin_mode, 8-18
vql_attributes, 8-6, B-7
vqm_attributes, 8-8
vqp_filmname, 9-42
vqt_attributes, 7-16, 7-18, 8-12
vqt_extent, 8-19
vqt_fontjnfo, 8-26, F-5
vqtjustified, 4-27, 8-29

vqt_name, 8-24, F-5
vqt_width, 8-22
vr_trnfm, 6-4, 6-10, 6-12
vro_cpyfm, 6-4, 6-6, 6-10
vrq_choice, 7-13
vrqJocator, 7-5
vrq_string, 7-16
vrq_valuator, 7-9
vrqstring, 7-18
vrt_cpyfm, 6-4, 6-6, 6-13
vs_clip, 3-20, 4-3, 8-16
vs_color, 3-8, 5-6, 8-2
vs_curaddress, 9-13
vs_mute, 9-35
vs_palette, 9-33, 9-34
vsc_expose, 9-44
vsc_form, 7-20, 9-20
vsf_color, 5-38
vsfjnterior, 5-33
vsf_perimeter, 5-39
vsf_style, 5-35
vsf_udpat, 5-40
vsin_mode, 7-3
vsLcolor, 5-12
vsLends, 5-13
vsl_type, 5-8, C-6
vsLudsty, 5-10
vsLwidth, 5-11
vsm_choice, 7-14
vsm_color, 5-18
vsm_height, 5-17
vsm_locator, 7-7, 9-20
vsm_string, 7-18
vsm_type, 5-15
vsm_valuator, 7-11
vsp_film, 9-41
vst_alignment, 5-31, 8-16

Index-13

vst_color, 5-27
vst_effects, 5-28
vst_font, 5-25
vst_height, 5-19
vstJoad_fonts, 3-18, 9-31
vst_point, 5-21
vst_rotation, 3-8, 5-23
vst_unload_fonts, 3-19
vswr_mode, 4-3, 5-3
vt_alignment, 9-40
vt_axis, 9-37
vt_origin, 9-38
vt_resolution, 9-36

w
Workstation default attribute
values, 3-3
Write Metafile Item,
v_write_meta, 9-46
Writing a justified text string,
4-27
Writing a text string, 4-8
Writing modes, 5-3

x
XOR mode, 5-4

Index-14

GEM™ VDI Function Reference Table
Opcode
Dec
Hex

Function and Binding

1
2
3
4

1
2
3
·4

5-1
5-2
5-3
5-4
5-5
5-6
5-7
5-8
5-9
5-10
5-11
5-12
5-13
5-14
5-15
5-16
5-17
5-18
5-19
5-20
5-21
5-22
5-23

5-1
5-2
5-3
5-4
5-5
5-6
5-7
5-8
5-9
5-A
5-B
5-C
5-0
5-E
5-F
5-10
5-11
5-12
5-13
5-14
5-15
5-16
5-17

5-24

5-18

5-25

5-19

vq_chcells( handle, &row~, &columns )
v_exiLcur( handle )
v_enteccur( handle )
v_curup( handle)
v_curdown( handle )
v_curright( handle )
v_curleft( handle )
v_curhome( handle )
v_eeos( handle )
v_eeol( handle)
vs_curaddress( handle. row, column )
v_curtext( handle, string )
v_rvon( handle )
v_rvoff( handle )
vq_curaddress( handle, &row, &column )
vq_tabstatus( handle )
v_hardcopy( handle )
v_dspcur( handle. x. y )
v3mcur( handle )
v_form_adv( handle )
v_outpuLwindow( handle. xy )
v_cleacdisp_list( handle )
v_biLimage( handle. filename. aspect, x-scale, y_scale.
h_align, v_align, xy )
vq_scan( handle. &g_height. &g_slices, &a_height. &a_slices.
&factor )
v_alpha_text( handle. string )

5-60
5-61
5-62

5-3C
5-30
5-3E

vs_palette( handle. palette )
v_sound( handle. frequency, duration )
vs_mute( handle. action )

5-81
5-82

5-51
5-52

vLresolution( handle, xres, yres. &xset. &yset)
vLaxis( handle. xres. yres. &xset. &yset)

v_opnwk( work-in, &handle, work-out)
v_clswk( handle )
v_clrwk( handle )
v_updwk( handle )

Opcode
Dec
Hex

Function and Binding

5-83
5-84
5-85

5-53
5-54
5-55

vLorigin(handle, xorigin, vorigin)
vq_tdimensions( handle, &xdimension, &vdimension)
vLalignment( handle, dx, dv)

5-9.1
5-92
5-93

5-5B
5-5C
5-50

vsp_film( handle, index, lightness)
vqp_filmname( handle, index. name )
vsc_expose( handle. state )

5-98
5-99
5-100

5-62
5-63
5-64

v_meta_extents( handle. min-x, min_v, max-x. max-v )
v_write_meta( handle, num_ints, ints, num_pts, pts )
vm_filename( handle, filename )

6

10

6
7
8
9
A

11-1
11-2
11-3
11-4
11-5
11-6
11-7
11-8
11-9
11-10

B-1
B-2
B-3
B-4
B-5
B-6
B-7
B-8
B-9
B-A

12

C

13
14
15
16
17
18
19
20
21

0
E
F
10
11
12
13
14
15

7

8
9

v_pline( handle, count, xv )
v_pmarker( handle, count, xv )
v_gtext( handle, x. v. string)
v_fill a rea' handle, count, XV)
v_cellarrav( handle, XV, row_length. eLpecrow, num_rows,
wr_mode, colors)
v_bar( handle, xV )
v_arc' handle, xc. vc, rad, sang. eang )
v_pieslice( handle, xc, vc, rad. sang, eang )
v_circle( handle, xc, vc. rad )
v_ellipse( handle. xc. vc. xrad. vrad )
v_ellarc( handle, xc, vc; xrad. vrad, sang, eang )
v_ellpie( handle, xc, vc, xrad, vrad, sang, eang)
v_rbox( handle, xy )
v_rfbox( handle, xV )
v...justified( handle, x, y, string, length, word_space, char_space)
vSLheight( handle. height, &chacwidth, &char_height, &celLwidtl
&celLheight )
vSLrotation( handle, angle )
vs_color( handle, index. rgb )
vsLtvpe( handle, stvle )
vsLwidth( handle, width )
vsLcolor( handle, index)
vsm_tvpe( handle. symbol )
vsm_height( handle, height)
vsm_color( handle. index )
vSLfont( handle. font)

Opcode
Dec
Hex

Function and Binding

22
23
24
25
26
27

18

28
28
29
29
30
30
31
31

lC
lC
10
10
lE
lE
IF
IF

vSLcolorC handle. index)
vsLinteriorC handle. style)
vsLstyle( handle. index )
vsLcolorC handle, index )
vq_colorl handle. indeM" seLflag, rgb )
vq_celiarrayC handle, xy, row_len, num_rOWI, &eLused, &rows_used,
&status, colarray )
vrq_locatorC handle, initx. inity, &xout, &yout, &term )
vsmJocatorC handle, initx. inity, &xout. &yout, &term )
vrq_valuatorC handle. vaUn, &vaLout, &term )
vsm_valuator( handle. vaLin. &vaLout, &term, &status )
vrq_choice( handle. in_choice. &ouLchoice )
vsm_choice( handle. &choice )
vrq_string( handle. length. echo_mode, echoJY. string)
vsm_string( handle. length, echo_mode. echoJY, string, &status )

32
33

20
21

vswcmode( handle. mode )
vsin_mode( handle. dey_type. mode )

35
36
37
38
39

23
24
25
26
27

vqLattributesC handle. attributes )
vqm_attributes( handle. attributes )
vqLattributes( handle, attributes )
vqLattributes( handle. attributes )
vsLalignment( handle. hor_in, verLin, &hor_out, &verLout )

100
101
102
103
104
105
106
107

64
65
66
67
68
69
6A
68

108
109
110
111

6C
60
6E
6F

16
17
18
19
lA

v_opnvwkC worLin, &handle, worLout I
v_clsvwk( handle )
vq_extndC handle, ow flag. worLout )
v_contourfill( handle, x. y. index )
. vsLperimeterC handle, per_vis)
v_geLpixelC handle, x. y, &pel. &index )
vsLeffectsC handle. effect )
vsLpoint( handle, point, &chacwidth, &chacheight, &cell_width,
&celLheight )
vsLendsC handle. beg_style, end_style)
vro_cpyfm( handle, wr_mode. xy, srcMF08, desMF08 )
vr_trnfm( handle. srcMFOB. desMFOB )
vsc_forml handle. cur_form )

Opcode
Dec
HeK

112
113
114
, 115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

70
71
72
73
74
75
76
77
78
79
7A
7B
7C
70
7E
7F
80
81
82
83

132

84

Function and Binding
vsLudpat( handle, filLpat, planes t
vsLudsty( handle, pattern t
vr3ecfl( handle, Ky t
vqin_mode( handle, dey_type, &inpuLmode t
vqLeKtent( handle, string, extent )
vqLwidth( handle, character. &ceILwidth, &lefLdelta, &righLdelta )
vex-timv( handle, tim_addr, &old_addr, &scale )
vsLload_fonts( handle, select )
vSLunload_fonts( handle, select t
vrLcpyfm( handle, wr _mode. xv, srcMFDB, desMFDB, &index t
v_show_c( handle. reset t
v_hide_c( handle t
vq_mouse( handle, &status, &px, &py )
vex-butyl handle, usercode, &savecode )
vex-motv( handle, usercode, &savecode )
vex-curve handle, usercode, &savecode )
vq_key_s( handle, &status )
vs_clip( handle, clip_flag, xy )
vqLname( handle, elemenLnum, namC' )
vqLfonLinfo( handle, &minADE, &maxADE, distances, &maxwidth,
effects)
vqt"';ustified( handle, x, y, string. length. word_space,
char_space, offsets )

/02 b 7 7d 6/
(

I

{."j

l



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Producer                        : Adobe Acrobat 9.2 Paper Capture Plug-in
Modify Date                     : 2010:01:05 14:27:43-08:00
Create Date                     : 2010:01:05 14:27:43-08:00
Metadata Date                   : 2010:01:05 14:27:43-08:00
Format                          : application/pdf
Document ID                     : uuid:da4bfdad-757c-45ef-86b7-2cde7831e2bf
Instance ID                     : uuid:eb04f4e8-2244-4ae3-845f-ea47e0e65526
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 329
EXIF Metadata provided by EXIF.tools

Navigation menu