Digital PDFs
Documents
Guest
Register
Log In
AA-Y660A-TK
December 1983
146 pages
Original
14MB
view
download
Document:
PRO/GIDIS Manual
Order Number:
AA-Y660A-TK
Revision:
0
Pages:
146
Original Filename:
http://bitsavers.org/pdf/dec/pdp11/pro3xx/POS/AA-Y660A-TK_PRO_GIDIS_Manual_198312.pdf
OCR Text
PRO/GIDIS Manual Order No. AA-Y660A-TK December 1983 This document describes PRO/GIDIS, DIGITAL's General Image Display Instruction Set, as implemented for the Professional Developer's Tool Kit. It is a user guide and reference manual for programmers developing graphics applications for the Professional personal computers. DEVELOPMENT SYSTEM: Professional Host Tool Kit,V1.7 or later PRO/Tool Kit V1.0 or later SOFTWARE SYSTEM: PROjGIDIS V1.7 DIGITAL EQUIPMENT CORPORATION Maynard, Massachusetts 01754 First Printing, December 1983 The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by DIGITAL or its affiliated companies. The specifications and drawings, herein, are the property of Digital Equipment Corporation and shall not be reproduced or copied or used in whole or in part as the basis for the manufacture or sale of items without written permission. Copyright © 1983 by Digital Equipment Corporation All Rights Reserved The following are trademarks of Digital Equipment Corporation: CTI BUS DEC DECmate DECsystem-10 DECSYSTEM-20 DECUS DECwriter DIBOL mamaama MASSBUS PDP P/OS PRO/BASIC PRO/Communications Professional PRO/FMS PRO/RMS PROSE PROSE PLUS Rainbow RSTS RSX Tool Kit UNIBUS VAX VMS VT Work Processor CONTENTS . . . . . . . . . . . vii PREFACE CHAPTER 1 1.1 1.2 1.2.1 1.2.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 1. 5.4 1.5.5 1. 5.6 1.5.7 1.6 1.7 1.8 1.9 1.10 1.11 1.11.1 1.11.2 1.12 1.12.1 1.12.2 1.12.3 1.12.4 1.12.5 1.13 1.13.1 1.13.2 1.13.3 1.13.4 1.13.5 1.13.6 1.13.7 1.14 1.15 CHAPTER 2 2.1 2.1.1 2.1.2 INTRODUCTION TO PRO/GIDIS OVERVIEW • • • • • • • ' . . •••• • • • . 1-1 RELATIONSHIP TO OTHER GRAPHICS TOOLS . • . • • 1-2 WHEN TO USE PRO/GIDIS ••••••...•. 1-2 WHEN NOT TO USE PRO/GIDIS •.••• . • • • 1-3 THE PRO/GIDIS INSTRUCTION SET . • •. . . 1-4 CONTROL INSTRUCTIONS • • • • • • • • • . . • • 1-5 THE VIEWING TRANSFORMATION . • • • 1-6 Aspect Ratios •• . • • • • • • • . 1-7 GIDIS Output Space • • • .•. . • • . • 1-8 Imposed Device Space • • . . . . • . • • • 1-10 The Viewport • . • • . . • • • . • • . . • • • 1-11 Hardware Address Space • • . • . . . . • . 1-11 The Viewing Transformation • . .••. 1-12 Addressing Pixels •.••. . . • • • • • 1-13 DRAWING INSTRUCTIONS • • . . • • • • • • • • 1-13 FILLED FIGURE INSTRUCTIONS . . . • . • • 1-14 TEXT INSTRUCTIONS . . • . . • • • • . . . . . . 1-15 COLOR ATTRIBUTES • • • • • . . • . . . • . • • • 1-15 THE WRITING MODE • • • . • • •••. 1-16 LINE AND CURVE ATTRIBUTES . . • • . • . . • . • 1-19 Line Texture • • • • • • . • . • . . . 1-19 Pixel Size • • . • . . . • • • • . 1-20 FILLED FIGURE ATTRIBUTES • • • • • • • . • . 1-21 Area Texture • • • • • . . . . . • • • . • • . 1-21 Area Texture Size ••• • • • . . . • • • 1-22 Area Texture Cell Size • • • • • • . . . • 1-22 Shading to a Line or Point • . • • . . . . 1-22 Filled Figure Examples • • • . • . • • . . • • 1-23 TEXT ATTRIBUTES •••••••..••. 1-25 Alphabets •...•. 1-25 Cell Rendition .•• ..••••. 1-27 Cell Rotation • • • • • . • . . • • • 1-28 Cell Oblique . • • • . . . . . • • • • • . 1-28 Cell Unit Size . . • • . • • • . • • • • • • • 1-29 Cell Display Size • . . . . • • •. . • • 1-29 Cell Movement • •• . . . . • • . . . 1-29 AREA OPERATIONS INSTRUCTIONS • • • • • • • • 1-31 REPORT HANDLING INSTRUCTIONS • • • • • • • • 1-31 INTERACTING WITH THE PRO/GIDIS INTERPRETER THE PRO/GIDIS INTERFACE • • • . . • • • • • • • • 2-1 Write Special Data (IO.WSD) ••• . • . . . 2-3 Read Special Data (IO.RSD) • • • . . . • • . 2-4 iii 2.2 2.2.1 2.2.2 2.3 2.4 CHAPTER 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 CHAPTER 4 4.1 4.2 4.3 4.4 CHAPTER 5 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 CHAPTER 6 6.1 6.2 6.3 6.4 6.5 6.6 PRO/GIDIS INSTRUCTION SYNTAX . . . • . Operation Codes .•...•..•• Parameter Blocks . . . . . . • . . . SAMPLE MACRO-Il PROGRAM . . . . . . . SAMPLE FORTRAN PROGRAM . . . . . • • . . . . . . . · . . • · . • • • • • • 2-6 2-6 2-7 2-8 2-9 CONTROL INSTRUCTIONS INITIALIZE . . NEW PICTURE END PICTURE FLUSH BUFFERS SET OUTPUT CURSOR NOP END LIST . . . . . . . . . . . . . . . . .. . . . . · . . · · . . . . . . · • 3-1 . . . 3-6 . . . 3-7 . . . 3-8 . . . 3-8 • • 3-10 . . 3-11 VIEWING TRANSFORMATION INSTRUCTIONS SET - OUTPUT- IDS . . . . . • . . . . . . . • . . . . SET OUTPUT VIEWPORT . . . . . . . . . . . • • . . SET GIDIS OUTPUT SPACE ......••••.•• SET-OUTPUT CLIPPING REGION • . . . . . 4-1 4-3 4-4 4-6 GLOBAL ATTRIBUTES INSTRUCTIONS SET PRIMARY COLOR · SET SECONDARY COLOR . .. ... SET-COLOR MAP-ENTRY . •. .•. SET-PLANE-MASK . . . . . • . SET-WRITING MODE . . . . . SET-PIXEL SIZE . . ...•. SET-LINE TEXTURE • ...•..• SET-A,REA-TEXTURE . . • . • . . . SET-AREA-TEXTURE SIZE . . . • . SET-AREA-CELL SIZE ••. · . . . . · · . . . . . . · . . . .. . • . . · • • . . 5-1 . 5- 2 . 5- 3 5-4 . 5-7 5-7 • • 5-9 • 5-10 5-11 • 5-12 DRAWING INSTRUCTIONS SET POSITION . . SET REL POSITION DRAW LINES . . . DRAW- REL - LINES DRAW ARC . . DRAW REL ARC . . . . . • • . . . • . • . . . . . . . . . . . . . . . •. ..........• .•............•• ....•...•.••. . . • • . . .. •.. iv 6-1 6-2 6-3 6-5 6-7 6-9 CHAPTER 7 7.1 7.2 CHAPTER 8 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10 8.11 CHAPTER 9 9.1 9.2 CHAPTER 10 10.1 10.2 10.3 APPENDIX A A .1 A.2 A.3 A.4 FILLED FIGURE INSTRUCTIONS BEGIN FILLED FIGURE END FILLED FIGURE . . . . . . . . . . . • • 7-1 7-2 TEXT INSTRUCTIONS SET ALPHABET ••.••• . • • • • • . • 8-2 CREATE ALPHABET • • • • • • . . • . . . • . • • • 8-2 LOAD CHARACTER CELL • • • .•.•• . • . 8-4 SET CELL RENDITION . • • • • . • • • • • . . 8-5 SET-C ELL-ROTAT ION . • • • • . . . .• 8-6 SET-CELL-OBLIQUE • • • . • • • • • . . . • • • 8-6 SET-CELL-UNIT SIZE ••.... • • • • . • . 8-7 SET-CELL-DISPLAY SIZE •••• ••• • 8-8 SET-CELL-MOVEMENT MODE . • • • • • . . • . . • 8-9 SET-CELL-EXPLICIT-MOVEMENT •••• .0 • . • 8-10 DRAW CHARACTERS • . • • . ••• . . • . 8-11 AREA OPERATION INSTRUCTIONS ERASE CLIPPING REGION • • • • • . . •. . . . 9-1 PRINT-SCREEN •-. • . . . • • • • . . . . . • . 9-2 REPORT HANDLING REQUEST CURRENT POSITION •••• REQUEST STATUS REQUEST-CELL STANDARD - .......... - 10-1 10-2 10-3 PRO/GIDIS INSTRUCTION SUMMARIES INSTRUCTIONS INSTRUCTIONS INSTRUCTIONS REPORT TAGS GROUPED BY FUNCTION • . .•••• IN OPCODE ORDER • . . . • . . IN ALPHABETIC ORDER • •••• .•...••••• .••.••• APPENDIX B DEC MULTINATIONAL CHARACTER SET APPENDIX C GLOSSARY v A-I A-2 A-3 A-5 EXAMPLES 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 2-1 2-2 Context for Filled Figure Examples • . • • • 1-23 A Filled Figure Using DRAW LINES • • . . • • • . 1-24 A Filled Figure Using DRAW ARC • • • 1-24 A Filled Figure Using DRAW-ARC • . • • • • • • • 1-24 A Filled Figure Using DRAW REL ARC • • . 1-24 A Filled Figure Using DRAW-REL-ARC ••• 1-25 A Filled Figure Using DRAW-LINES • . . • • • 1-25 A Filled Figure Using DRAW-LINES • • • • • • 1-25 Instruction with Fixed-Length Parameter Block . . 2-7 Instruction with Variable-Length Parameter Block • 2-7 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 1-11 1-12 1-13 1-14 2-1 3-1 8-1 PRO/GIDIS Sample Output . . . • . • • • • • . • • 1-1 PRO/GIDIS Interface, Programs/Video Hardware • 1-3 Isotropic Mapping: Window to Viewport • • • . • . 1-9 Isotropic Mapping: IDS to HAS . • . 1-10 Video Hardware Address Space . . • • • • . . . . 1-11 The Viewing Transformation . . . . • 1-12 The Extended Bitmap Option • • • • . . • • . . • 1-15 The Writing Modes Shown with Line Texture . • • 1-17 The Logical Drawing Pixel • • • • . . • • • 1-21 Filled Figure Images . • . . . • . . . • • . 1-23 Alphabet 0 . • • • • • • . • • • • • • . • • 1-26 Character Cell Rotation •• . . . • • • . • • • 1-27 Character Unit Cell and Display Cell • • • . 1-28 Character Cell Movement . • . . • • • . . • • • 1-30 PRO/GIDIS Data Path • • . • • • • • • • . • . • • 2-2 INITIALIZE Subsystem Initialization Bit Mask. 3-2 SET CELL RENDITION Bit Mask • • . • • • • • • • • 8-5 3-1 3-2 3-3 4-1 4-2 4-3 5-1 5-2 5-3 6-1 7-1 8-1 8-2 9-1 10-1 Control Instructions Summary Chart • . . . • . 3-1 Initialization Subsystems ••••• . • • . • 3-2 Initialization Variable States • • . . . • • • • • 3-3 Viewing Transformation Instructions Summary Chart 4-1 State Variables Affected by SET OUTPUT IDS . • • 4-2 State Variables Affected by SET-GIDIS OUTPUT SPACE 4-5 Global Attribute Instructions Summary-Chart - . • . 5-1 Color Map Values for the Professional . • . • • • 5-4 Plane Mask Values • . . . • . .• .••• 5-5 Drawing Instructions Summary Chart • • 6-1 Filled Figure Summary Chart . . • • • 7-1 Text Instructions Summary Chart . • • . • • • 8-1 Cell Rotation Angles • • . . • • • • • • • 8-6 Area Operations Summary Chart • • • • • • • • 9-1 Report Handling Summary Chart • • . . . • . . . 10-1 FIGURES TABLES vi PREFACE WHO SHOULD READ THIS MANUAL You should read this manual if you are developing a graphics application for the Professional 300 Series computer and need information about PRO/GIDIS, the General Image Display Instruction Set that runs on the Professional computer. PRO/GIDIS is one of the tools that can be used in developing graphics applications for the Professional computer. This document is intended for programmers who have had experience with systems programming and graphics applications software. The reader also is expected to be familiar with the Professional 300 Series Tool Kit, and either MACRO-II or FORTRAN. It is recommended that you also read the CORE Graphics Library (CGL) Manual for a more tutorial approach to graphics software development on the Professional computer. SCOPE OF MANUAL This manual describes PRO/GIDIS and is intended to be used as both a reference manual and user guide. It covers applications running on the Professional and also provides programming information about device-independent text and graphics programming with PRO/GIDIS. ORGANIZATION OF MANUAL The manual has ten chapters and three appendixes. are summarized in the following subsections. The contents Chapter I -- Introduction to PRO/GIDIS This chapter is the "user guide" for PRO/GIDIS. It provides an overview of PRO/GIDIS and its relationship to other graphics products, suggests when PRO/GIDIS should and should not be used, summarizes the PRO/GIDIS instruction groups, and discusses each group in detail. Chapter 2 -- Interacting with the PRO/GIDIS Interpreter Describes the software interface to PRO/GIDIS. It describes the Queue I/O (QIO) directives that send instructions to PRO/GIDIS and return GIDIS reports, and provides PRO/GIDIS programming syntax rules and programming examples. vii PREFACE Chapter 3 -- Control Instructions Details the PRO/GIDIS instructions for program start-up, initialization, along with syntax-required instructions. Chapter 4 -- Viewing Transformation Instructions Describes the instructions used for m~pping graphics addressable image areas to hardware output devices and the concepts involved in area transformation. Chapter 5 -- Global Attributes Instructions Details the global parameters that govern the appearance of drawing primitives (writing modes, line characteristics, pixel size, area texture, and primary/secondary color). Chapter 6 -- Drawing Instructions Describes the instructions used for drawing lines and curves. Chapter 7 -- Filled Figures Instructions Details those PRO/GIDIS instructions closed figures. that provide shading for Chapter 8 -- Text Instructions Describes the instructions that control text subsystem characteristics (current alphabet, character selection for display, unit and display sizes, cell rotation and rendition, and so forth). Chapter 9 -- Area Operation Instructions Details those instructions that affect the display area and the instruction for dumping screen contents to the Professional's printing device. Chapter 10 -- Report Handling Describes report handling instructions information from the output device. that return state Appendix A -- Instruction Summary Lists the PRO/GIDIS instructions, their opcodes, argument list lengths, and associated parameters. Also features an instruction list sorted into opcode order. viii PREFACE Appendix B -- DEC Multinational Character Set Shows the code table for the Professional's alphabet 0, Multinational Character Set. the DEC Appendix C -- Glossary RELATED DOCUMENTATION Please refer to the other manuals in the Tool Kit Documentation Set for more information on developing applications for the Professional. ix CHAPTER 1 INTRODUCTION TO PRO/GIDIS PRO/GIDIS, the General Image Display Instruction Set (GIDIS), is one of several tools used to develop graphics applications for the Professional 300 Series computer. It consists of a set of instructions that provide the lowest-level, virtual device interface to the Professional's graphics hardware. 1.1 OVERVIEW PRO/GIDIS is aimed at applications creating "synthetic graphics," those in which images can be described using geometrical entities such as lines, arcs, and shaded areas. PRO/GIDIS can also be used to display mixed text and graphics. Figure 1-1 shows typical PRO/GIDIS output, a graphical representation of some sample statistical data. EJ<PEt{)ITLRES BILLICNS (J' OCl.LMS 100 75 MILLlOO 100 ~ Errollment, total D _ ~Il..LI'ENT MIt IIJ flllNlE .tODl,., } PI..bUc Errollment Priva~ Errollment Total E>q:Iendi Ures - - - Pl..blic ~endiUres . . . . . Pr i vate Expend i Ures Right Scal~ J- , 75 Left Scale 1 50 I 25 ........... - ...... , ..... . 19bO Figure 1-1: 1%2 1964 1966 1968 PRO/GIDIS Sample Output 1-1 1970 1972 -125 .. ········1 1974 OVERVIEW PRO/GIDIS is implemented as a layer of P/OS software that receives and interprets binary instructions and executes them on the Professional's graphics hardware. The interpretation of instructions is dependent on the current state of PRO/GIDIS as well as on any explicit parameters that might be supplied with the instruction. Many PRO/GIDIS instructions, like those that control global attributes or the viewing transformation, do not actually cause any drawing to take place, but rather, change PRO/GIDIS's state. 1.2 RELATIONSHIP TO OTHER GRAPHICS TOOLS The other graphics tools include: • The Professional Developer's Tool Kit CORE Graphics Library (CGL), a library of high-level graphics subroutines based on the ACM SIGGRAPH CORE Standard. NOTE Do not use PRO/GIDIS and CGL in the same program. CGL was implemented with PRO/GIDIS and must have exclusive control of it for proper operation. • ReGIS (Remote Graphics Instruction Set), a Digital-developed, ASCII-based protocol, is used to transmit graphics instructions from a host computer to a remote Professional, or VT125 or GIGI graphics terminal. ReGIS currently cannot be used by applications that reside on the Professional itself; it can only be used when communicating with the Professional over a communications line. PRO/GIDIS supports CGL and ReGIS and is designed to support Digital's future graphics products. As shown in Figure 1-2, both CGL and ReGIS are implemented as layers above PRO/GIDIS. 1.2.1 • WHEN TO USE PRO/GIDIS Use PRO/GIDIS if you programming. are already 1-2 well-versed in graphics RELATIONSHIP TO OTHER GRAPHICS TOOLS Local Applicatilrl using eCl Host Application ~ local Applicatilrl using CroIS Curb Terminal eCl Core Graphics librcr'1;j Emulatilrl (with ReGIS) L I CIOIS I I Video Display Plotter GIDIS GIDIS Figure 1-2: I Virtual Device Interface PRO/GIDIS Interface, Programs/Video Hardware • Use PRO/GIDIS for applications that require fast execution speed and that can make use of its level of functionality. Some examples are interactive drawing packages, graphics terminal emulators, and scientific/engineering data display packages. • Use PRO/GIDIS for applications that require efficient storage of images. Your program can store sequences of binary instructions on disk or in memory and send them to PRO/GIDIS for rapid display. • Use PRO/GIDIS to implement graphics utility layers, CORE and GKS. • Use PRO/GIDIS to implement application-specific graphics subroutine libraries. This provides flexibility, permits optimization of routines for a particular application, and avoids use of excessive virtual address space. 1.2.2 • such as WHEN NOT TO USE PRO/GIDIS If you are not well-versed in graphics programming, consider using the CORE Graphics Library instead of PRO/GIDIS. 1-3 RELATIONSHIP TO OTHER GRAPHICS TOOLS • If your program requires support for coordinates, curves, markers, and Graphics Library. real (floating point) so forth, use the CORE If you are concerned with portability of programs and • programmers, and industry-standard program interfaces to graphics routines, use the CORE Graphics Library. • If you require VT125 compatibility, Professional Terminal Emulator. use ReGIS with the • Do not mix graphics protocols. Do not use PRO/GIDIS if you intend to use the CORE Graphics Library and/or direct access to the video hardware. 1.3 THE PRO/GIDIS INSTRUCTION SET PRO/GIDIS instructions are defined in the form of an mnemonic instruction name and accompanying arguments. Some instructions require no arguments; some require a fixed number of arguments; and some accept a variable number of arguments. Chapter 2 describes how to construct calls to PRO/GIDIS instructions. The PRO/GIDIS instruction set can be divided into the following functionally related groups. Each group is described in detail in subsequent sections of this chapter. • Control Instructions These instructions initialize the PRO/GIDIS interpreter, begin and end pictures, set the cursor, and so forth. • Viewing Transformation Instructions The instructions control the PRO/GIDIS extents, and the mapping between them. • address and Global Attribute Instructions These instructions set the PRO/GIDIS general state that control the appearance of images. • spaces variables Drawing Instructions These instructions draw the actual lines and curves that make up images. 1-4 THE PRO/GIDIS INSTRUCTION SET • Filled Figure Instructions These instructions draw solid areas. • by arphabets and control graphics as scrolling and to return specific the operation of CONTROL INSTRUCTIONS These are the instructions that PRO/GIDIS interpreter. • draw Report Instructions These instructions cause PRO/GIDIS information about the current state. 1.4 specific Area Operation Instructions These instruction perform operations such printing on specific areas. • shading Text Instructions These instructions character text. • figures control the INITIALIZE The INITIALIZE instruction restores power-on status to one or more graphics subsystems (addressing, global attributes, text, or all subsystems). • NEW PICTURE The NEW PICTURE instruction clears indicate the start of a new picture. • the view to group of END PICTURE The END PICTURE instruction indicates the end of a picture=drawing instructions. • surface FLUSH BUFFERS The FLUSH BUFFERS instruction forces the execution of pending PRO/GIDIS instructions. 1-5 CONTROL INSTRUCTIONS • SET OUTPUT CURSOR The SET OUTPUT CURSOR instruction specifies the particular character or object to be used as the output cursor (a visible object used to mark the current screen output location). • NOP The NOP nothing. • instruction performs no operation changes a variable- END LIST The END LIST instruction indicates the length argument list. 1.5 and end of THE VIEWING TRANSFORMATION The graphical world is two-dimensional; we visualize it as a plane. The Cartesian coordinate system provides a convenient way of describing a plane. A coordinate pair specifies a discrete point in the form: X,Y where X is the horizontal axis and Y is the vertical axis. The finite area of a plane that can be specified by coordinate pairs is called an address space. The origin of an address space is (0,0). Coordinate values increase in magnitude to the right and downward. PRO/GIDIS deals with three address spaces: • GIDIS Output Space (GOS) GIDIS Output Space is the address GIDIS drawing instructions. • space referenced by the Imposed Device Space (IDS) Imposed Device Space is the user-defined address space that provides a device-independent means of describing the view surface. 1-6 THE VIEWING TRANSFORMATION • Hardware Address Space (HAS) Hardware address space (HAS) is a fixed address space that reflects the characteristics of the particular graphical device being used. PRO/GIDIS does not allow the explict use of HAS coordinates. PRO/GIDIS maps coordinates between the three address spaces based on built-in and user-supplied information. This double mapping is called the viewing transformation (or "graphics pipeline") and is discussed in Section 1.5.6. A specific rectangular portion of an address space is called extent. PRO/GIDIS deals with three user-defined extents: • The Window The window is an extent within GrDIS Output Space to the viewport. • an that maps The Clipping Region The clipping region is an extent within GIDIS Output Space that determines which portion of the view surface is available for drawing. • The Viewport The viewport is an extent within Imposed Device maps to a portion of the view surface (HAS). Space that Normally, you need only be concerned with GIDIS Output Space coordinates. However, you must be aware that the viewing transformation can result in some loss of resolution, and that some mapping relationships will be more optimal than others. 1.5.1 Aspect Ratios Aspect ratio is a way of representing the shape (the relationship between the horizontal and vertical dimensions) of an area. There are two types of aspect ratio. • Unit Aspect Ratio Unit aspect ratio is the ratio of the physical size of one unit in the horizontal direction to one unit in the vertical direction. For example, in an address space whose unit aspect ratio is 1:1, a rectangle whose four sides are exactly one unit in length would appear perfectly square. 1-7 THE VIEWING TRANSFORMATION The logical address spaces (GIDIS Output Space and Imposed Device Space) have a unit aspect ratio of 1:1. A physical address space (such as Hardware Address Space) has a unit aspect ratio that is dependent on specific hardware. • Picture Aspect Ratio Picture aspect ratio is the ratio of an area's width to its height. In order to map extents from one address space to another the picture aspect ratios of the extents must match. Otherwise, only a portion of the lower-level extent is used. This is called isotropic mapping. For example, a window defined to be four GOS units by eight GOS units has a picture aspect ratio of 1:2 and would map perfectly to a viewport defined to be nine IDS units by 18 IDS units. 1.5.2 GIOIS Output Space GIOIS Output Space (GOS) is the device-independent, address space referenced by PRO/GIOIS instructions for the purposes of drawing an image. GOS has a unit aspect ratio of 1:1. GOS is bounded by the set of 16-bit, signed, two's-complement integers. PRO/GIDIS does not check for integer overflow; thus, GOS coordinates, in effect, "wrap around". NOTE It is recommended that you restrict the use GOS coordinates to the range (-16384 to 16384) that PRO/GIDIS can compute, without risk overflow, the locations of all points required draw an image. of so of to 1.5.2.1 The Window - The window is the extent within GIDIS Output Space that maps to the viewport in Imposed Device Space. The SET GIOIS OUTPUT SPACE instruction specifies the upper-left corner, width, and height of the window, and thus its resolution and picture aspect ratio. You can adjust the window to match the data available to your application. It can be any portion of GIOIS Output Space and does not have to include the origin (0,0). 1-8 THE VIEWING TRANSFORMATION In the viewing transformation, GIDIS isotropically maps the window to the viewport. If the picture aspect ratios of the two extents do not match, GIDIS maps the window onto the uppermost or leftmost portion of the viewport {see Figure 1-3}. 1600 1400 1000 IDS 1000 1000 Figure 1-3: Isotropic Mapping: Window to Viewport 1.5.2.2 The Clipping Region - The clipping region is a rectangular area in GIDIS Output Space that determines which portion of the view surface is accessible for drawing. In order for a point to be drawn on the view surface, it must lie within the clipping region. The SET OUTPUT CLIPPING REGION instruction specifies the clipping regIon, which is -bounded only by the limits of the view surface. By default, the clipping region is the same as the window. The SET GIDIS OUTPUT SPACE instruction sets the clipping region to the-newly-specified window. That allows the window/clipping region to function as the extent within GOS that is "visible through the viewport." In other words, for some applications, you may find it convenient to think of the window and the clipping region as the same extent. A clipping region that is different from the window allows you to display portions of an image without changing the viewing transformation {and state variables}. Changing the clipping region is more efficient than changing the window, viewport or IDS. 1-9 THE VIEWING TRANSFORMATION 1.5.3 Imposed Device Space Imposed device space (IDS) is a user-defined logical address space that provides a device-independent way of describing the view surface of any hardware device. The SET OUTPUT IDS instruction specifies the size of Imposed Device Space; which-has a fixed origin of (0,0). The size is restricted to positive integers in a s ned: 16-bit word. NOTE It is recommended that you restrict the use IDS coordinates to the range (-16384 to 16384) that PRO/GIDIS can compute, without risk overflow, the locations of all points required draw an image. of so of to IDS has a unit aspect ratio of 1:1, and its origin always maps to the upper-left corner of the Hardware Address Space. By default, the picture aspect ratio and resolution of IDS match that of the HAS. In the viewing transformation, GIDIS isotropically maps IDS to the hardware address space such that the specified IDS rectangle uses as much as possible of the HAS while still maintaining the desired picture aspect ratio (see Figure 1-4). Thus, if the picture aspect ratios of the two rectangular areas do not match, only a portion of the view surface is used. 1000 Har·dware Coor-dlnate Space Figure 1-4: Isotropic Mapping: IDS to HAS 1-10 THE VIEWING TRANSFORMATION 1.5.4 The Viewport The SET OUTPUT VIEWPORT instruction specifies a rectangular extent within IDS that corresponds to the window in GIDIS Output Space. The viewing transformation maps the window to the viewport and the viewport to Hardware Address Space. Thus, if the window and clipping region are the same, the viewport specifies the area of the view surface to which drawing is confined. 1.5.5 Hardware Address Space Hardware address space (HAS) reflects the characteristics of the particular device being used. Although PRO/GIDIS does not allow the explicit use of hardware coordinates, an understanding of them can help you optimize the viewing transformation for your application. The Professional video monitor's Hardware Address Space is 960 units in the horizontal dimension by 240 units in the vertical dimension (as shown in Figure 1-5). It's unit aspect ratio (width to height) is 2:5 or 1:2.5. 1 Figure 1-5: Video Hardware Address Space The two 32-unit bands along the sides are not part of HAS. You can draw in them but to do so will make your application device-dependent because they do not necessa~ily exist o~ other devices. The 16-unit band along the bottom IS not accessIble for drawing. 1-11 THE VIEWING TRANSFORMATION On a properly adjusted monochrome monitor, HAS occupies a space 7.87 inches (horizontal) by 4.92 inches (vertical). Thus, a rectangle one unit by one unit in HAS coordinates would create an image that is 0.008 inches horizontal (7.87 / 960) by 0.02 inches vertical (4.92 / 240). On a properly adjusted color monitor, HAS occupies a space 9.45 inches (horizontal) by 5.91 inches (vertical). Thus, a rectangle one unit by one unit in HAS coordinates would create an image that is 0.01 inches horizontal (9.45 / 960) by 0.025 inches vertical (5.91/ 240). 1.5.6 The Viewing Transformation The process of creating an image on a view surface can be thought of as a two-step process, as shown in Figure 1-6. 1. GIDIS maps GOS coordinates window and viewport. to IDS coordinates using the 2. GIDIS maps IDS coordinates to HAS coordinates using the given size of IDS and the known size of HAS. Thus, by establishing the winctQw and viewport, you also establish the relationship of all GOS and IDS coordinates, including those outside the window/viewport. ~ ! ! I • til I 8 , •• w S I'" ! " ~ a I , J II ! II ~ I C I I I • I II II I t ~ " .. U I II' i I I I I I r CIDIS wtput Space (GOS) Imposed Device Space (IDS) J=~=~~t.=*=f===~ Har-::kere Coordinate Space (HCS) Figure 1-6: The Viewing Transformation 1-12 THE VIEWING TRANSFORMATION In effect, you change window parameters in order to "view" a different portion and/or scaling of Gidis Output Space. You change viewport parameters in order to "view" the same portion of GOS in a different portion of the view surface. Viewing transformation parameters only affect subsequently received GIDIS instructions. Changing the parameters does not affect images already visible on the view surface. In order to do that, you must change the mapping parameters and redraw the image. 1.5.7 Addressing Pixels Some applications, such as a natural image display, must address individual pixels directly. To accomplish this, set IDS space to width 1920 and height 1200. The picture aspect ratio is 8:5, a ratio that maps to the entire screen. Pixel X (from the left) on row Y is IDS coordinate [X*2, Y*5]. There is a pixel at every X coordinate divisible by two and Y coordinate divisible by five. For example, [100,20], [22,15], and [78,505] all map directly to a pixel. PRO/GIDIS automatically truncates coordinates that map partway between pixels. For example, [101,23], [23,16], and [78,509] map to the same pixels as the first list of coordinates. NOTE An IDS of 960 by 240 does not accomplish the same thing. It would have a picture aspect ratio of 4:1 (the unit aspect ratio is 1:1) which would not match the picture aspect ratio of HAS (8:5). 1.6 DRAWING INSTRUCTIONS Part of the PRO/GIDIS state is a coordinate pair called the current position that corresponds to the current drawing location in GIDIS Output Space. The visual representation of the current position is the cursor. Thus, some of these instructions do not draw anything, they simply change the current position. 1-13 DRAWING INSTRUCTIONS • SET POSITION The SET POSITION instruction specifies the new current position as an absolute location in GIDIS Output Space. • SET REL POSITION The SET REL POSITION instruction specifies the new current position as a point relative to (an offset from) the old current position. • DRAW LINES The DRAW LINES instruction draws one or more starting at the current position. • straight lines DRAW REL LINES Draws one or more straight lines starting at the current position. Coordinates specified are relative to the current position or the previous point. • DRAW ARC Draws a section of a circle using the current position reference. • a DRAW REL ARC Draws a section of a circle using an offset from the position as a reference. 1.7 as current FILLED FIGURE INSTRUCTIONS A filled-figure is a closed, shaded figure that can be bordered by either straight lines, circular arcs, or any combination of these. The instructions that begin and end filled figures are: • BEGIN FILLED FIGURE The BEGIN FILLED FIGURE instruction starts definition. • a filled figure END FILLED FIGURE The END FILLED FIGURE instruction ends a filled figure definition and causes the entire figure to be filled in with the current area texture. 1-14 TEXT INSTRUCTIONS 1.8 TEXT INSTRUCTIONS PRO/GIDIS text is independent from the Professional terminal subsystem's text mode. The instruction that draws text is: • DRAW CHARACTERS The DRAW CHARACTERS instruction displays each of the characters specified by each charact~r index in the parameter list. The characters are taken from the currently selected alphabet. 1.9 COLOR ATTRIBUTES The Professional's video subsystem includes an internal bitmap (also known as a raster image or frame buffer). The bitmap consists of one or more two-dimensional matrices of bits called planes. Each bitmap position controls a pixel, which represents a physical hardware coordinate position. The basic Professional bitmap has a single plane, providing one bit for each pixel. Because a single bit can be in one of two possible binary states: 0 or 1, only dark and light images are possible. A value of 0 specifies dark and 1 specifies light. The actual colors depend on the phosphors used in the monitor. COLOR MAP MONITOR RED GREEN BLUE 0 1 2 3 4 5 6 7 Figure 1-7: The Extended Bitmap Option 1-15 7 0 0 COLOR ATTRIBUTES When equipped with the Extended Bitmap Option (EBO) board, the Professional's bitmap has three planes. The SET PLANE MASK instruction specifies which planes are accessible to- PRO/GIDIS and which are "write-locked." Three planes provide three bits per position. Thus each position can contain a binary number in the range 000 to III (0 to 7 decimal). This number is an index into an internal table called the color map, which contains descriptions of colors. The color map consists of eight entries, numbered a to 7, as shown in Figure 1-7. Each color map entry consists of three fields, red, green, and blue, that contain intensity values for each primary color in light. The SET COLOR MAP ENTRY instruction allows you to specify these red, green, -and blue values by proportion. By changing the contents of the color map, you can form 256 different colors. If no color monitor is present, you can use the color map to form eight shades of display intensity. NOTE· When you change the contents of a color map entry, you instantly change the color displayed for all pixels that were drawn with that entry. The red and green fields each consist of three bits and thus have eight possible values. The blue field has only two bits and thus has four possible values. The human eye is less sensitive to changes in blue than either of the other primaries. When drawing an image, PRO/GIDIS places a color map index into each pixel required by the image. The actual color map index placed in a particular bitmap position depends on the previous contents of that pixel, the current pattern, and the writing mode (more information on this in the following sections.) The PRO/GIDIS state includes two color map index values: the primary color and the secondary color, specified by SET PRIMARY COLOR and SET SECONDARY COLOR respectively. In general, the primary color indicates the presence of an image (the foreground) and the secondary color indicates the absence of an image (the background). 1.10 THE WRITING MODE PRO/GIDIS characters, line textures and area textures each form a binary pattern which, for the purpose of describing the writing 1-16 THE WRITING MODE modes, we will call the "current pattern." The exact way in which PRO/GIDIS uses the current pattern to create images depends on the writing mode and the primary and secondary colors. Figure 1-8 shows the same line texture (which includes ON and OFF pixels) drawn over light and dark areas in all eight visible writing modes • .~~~II.I.I.I.I.I.I.I C~~P~~ME~.T ~fC~~E II II II II II II I OVERLAY OVERLAY NEGATE R~~L~:.E II II II II II II II II II Er~~W!~!31.1.1.1.1.1.1 ERASE NEGATE Figure 1-8: The Writing Modes Shown with Line Texture The writing modes are: • TRANSPARENT In transparent mode, no actual drawing is done. Otherwise, all other drawing processes are exercised and the state information (particularly, the current position) is updated. The texture is ignored. Transparent mode for determining the current position after drawing without actually drawing the image. • TRANSPARENT NEGATE This mode is identical to transparent mode. • COMPLEMENT In complement mode, wherever the current pattern contains set (1) bits, PRO/GIDIS performs a bitwise inversion of the pixel 1-17 THE WRITING MODE value (color index). For example, a pixel containing 101 (color map entry 5) changes to 010 (color map entry 2). Wherever the current pattern contains clear (0) bits, no modifications are made. The purpose of complement mode is to make images "stand out" from whatever has already been drawn. If the appropriate color map entries contain complementary colors, the image in the display area is effectively reversed. The original image can be restored by repeating the process. Complement mode is likely to produce seams when filled figures overlap. Since filled figures include their borders, areas with a common border are considered to overlap. • COMPLEMENT NEGATE Complement negate mode is identical to complement mode except that PRO/GIDIS negates the current pattern. Wherever the current pattern contains clear (0) bits, PRO/GIDIS performs a bitwise inversion of the pixel value (color index). Wherever the current pattern contains set (1) bits, no modifications are made. • OVERLAY In overlay mode, wherever the current pattern contains set (1) bits, PRO/GIDIS draws in the current primary color. Wherever the current pattern contains clear (0) bits, no drawing occurs. The purpose of overlay mode is to draw images whatever is already on the view surface. • "on top of" OVERLAY NEGATE Overlay negate mode is identical to overlay mode except that PRO/GIDIS negates the current pattern. Wherever the current pattern contains clear (0) bits, PRO/GIDIS draws in the current primary color. Wherever the current pattern contains set (1) bits, no drawing occurs. • REPLACE In replace mode, wherever the current pattern contains set (1) bits, PRO/GIDIS draws in the primary color. Wherever the current pattern contains clear (0) bits, PRO/GIDIS draws in the secondary color. The purpose of replace mode is to draw images that completely replace whatever is already on the view surface. 1-18 THE WRITING MOOE • REPLACE NEGATE Replace negate mode is identical to replace mode except that PRO/GIOIS negates the current pattern. Wherever the current pattern contains clear (0) bits, PRO/GIOIS draws in the primary color. Wherever the current pattern contains set (1) bits, PRO/GIOIS draws in the secondary color. • ERASE In erase mode, PRO/GIOIS sets all pixels to the secondary color. The purpose of erase mode is to draw images by erasing what is already on the view surface. • ERASE NEGATE Erase negate mode is identical to erase mode PRO/GIOIS sets all pixels to the primary color. 1.11 except LINE AND CURVE ATTRIBUTES The following sections describe the PRO/GIOIS state that determine the appearance of lines and curves. 1.11.1 that variables Line Texture The SET LINE TEXTURE instruction specifies a linear bit pattern used for drawing lines and arcs. The line texture is used in conjunction with the writing mode and the primary and secondary colors to determine the value for all pixels in a line or arc. The line texture is wrapped around corners to provide a smoothly textured pattern. For example, the character "X" represents pixels drawn in the primary color and "-" represents pixels drawn in the secondary color. The pattern 0100110 produces a line (drawn from left to right) that looks like: - X - - X X Although you specify the size of a single repetition of the line texture in GIOIS Output Space coordinates, that size is only an approximation. PRO/GIOIS actually uses the largest integral multiple of the pattern length that is less than or equal to the specified size. 1-19 LINE AND CURVE ATTRIBUTES For example, assume that the line above has a size of seven and was drawn exactly once in seven pixels. Changing the size to 14 uses each bit twice in succession: - - X X - - - - X X X X - When you use a large drawing pixel, a number of pixels are written multiple times, potentially with both primary and secondary colors in ei ther order· (see the SET PIXEL SIZE instruction.) The same example with a pixel size of-two by two (pattern size = 14 pixels) would produce: -X XX X-X XX X- -X XX XX XX X-X XX XX XX X- where the symbols mean: -X XXX Secondary color written once Secondary color written twice Secondary color written once, then primary once Primary color written once, then secondary once Primary color written twice In replace mode, "-X" produces "X", "X-" forth, so the final result would be: produces "_" and so - - X X - X X X X - - X X - - - - X X X X In complement mode, " "does nothing and "X" complements the pattern. Thus " " does not change the pixel, "-X" and "X-" complements it once, and "XX" complements it twice (returning to the original state). The final result would be: - - X - X - - - X - - - X - - X - X - - - X - - - X 1.11.2 Pixel Size The SET PIXEL SIZE instruction specifies the size of the logical drawing pixel, the bit pattern used to draw lines and arcs. Increasing the size of the logical drawing pixel widens the lines used to draw images. The default logical drawing pixel is one physical pixel. Figure 1-9 shows several different logical drawing pixels and lines. 1-20 FILLED FIGURE ATTRIBUTES 1.12 FILLED FIGURE ATTRIBUTES The following sections describe the PRO/GIDIS state that determine the appearance of filled figures • variables • Figure 1-9: 1.12.1 The Logical Drawing Pixel Area Texture The SET AREA TEXTURE instruction specifies a two-dimensional bit pattern that defines the appearance of filled figures. Area texture is specified as a character in an alphabet. Any arbitrary pattern (up to the maximum character size) can be used for area texture. For example, given alphabet 2, character 23, (the pattern shown here): o o a a o 1 1 1 o o o o o 1 o 1 with area texture given as alphabet 2, character appropriate sizes specified, the pattern drawn is: - - - X X X - - - X X X - - - X X X - - - X X X - X X X - - - - - - - - X X X - - - - - X X X - - - X X X - X X X - - - X X X 1-21 23, and the FILLED FIGURE ATTRIBUTES where the symbols mean: X Secondary color Primary color Area textures are aligned with a fixed point on the screen so that no seams show if two areas overlap. (Assuming they are drawn with the same pattern, pattern sizes, writing mode, and colors.) The size of area texture cells is defined by the SET AREA CELL SIZE instruction. 1.12.2 Area Texture Size The SET AREA TEXTURE SIZE instruction specifies the actual size of the area texture character. Although you specify area texture size GIDIS Output Space coordinates, that size is only an approximation. PRO/GIDIS actually uses the largest integral multiple of the texture pattern that is less than or equal to the specified size. 1.12.3 Area Texture Cell Size The SET AREA CELL SIZE instruction allows you to specify the size of the area texture cell, the source for the area texture. Generally, area texture cell size matches the cell size loaded from a character cell in an alphabet. For those occasions when the loaded cell size is inappropriate for the area texture, this instruction permits clipping the area cell after it is loaded from the character cell. 1.12.4 Shading to a Line or Point PRO/GIDIS can be used to emulate shading to a line or a point using the filled figure instructions. Your program must calculate the area to be filled and issue the appropriate instructions. One way is to buffer points and generate one fill-area sequence for a number of points. Another is to determine the incremental area to be filled for each point and send a fill area sequence for each point. Because the area includes the border, unusual results (seams) can occur in complement mode when areas are adjacent or overlapping. 1-22 FILLED FIGURE ATTRIBUTES 1.12.5 Filled Figure Examples The format for these example programs in described in Chapter 2. 1-3 1-2 1-6 Figure 1-10: .BYTE .WORD .BYTE • WORD • WORD .BYTE • WORD . WORD .BYTE .WORD • WORD .WORD .BYTE .WORD .WORD 1-5 1-7 1-8 Filled Figure Images 2.,10. 7680.,4800. 4.,13. O. ,0 • 7680.,4800 . 4. ,9. o. ,0 . 7680.,4800 • 3.,17. 16. -1 • 100. 2.,14. -1. O. Example 1-1: 1-4 length = 2, opcode = SET OUTPUT IDS width, height length = 4, opcode = SET OUTPUT VIEWPORT length = 4, opcode = SET GIDIS OUTPUT SPACE ; length = 3, opcode = SET LINE TEXTURE ;. length pattern size length = 2, opcode = SET AREA TEXTURE special 'alphabet' use line texture for area texture Context for Filled Figure Examples 1-23 FILLED FIGURE ATTRIBUTES .BYTE • WORD .BYTE • BYTE • WORD • WORD • WORD • WORD • WORD • WORD • WORD .BYTE 2.,29. 340.,270 • 0.,31. 255.,25 • 1340,270, 1840.,770 • 1340.,1270 • 340.,1270 • 840.,770 • 340.,270 • -32768 • 0.,32. Example 1-2: .BYTE • WORD .BYTE .BYTE • WORD • WORD • BYTE • BYTE • WORD .BYTE • BYTE • WORD • WORD • BYTE • BYTE • WORD .BYTE • BYTE .WORD • WORD • BYTE • WORD .BYTE ; length = 0, opeode = END FILLED FIGURE length = 2, opeode = SET POSITION = 0, opeode = BEGIN FILLED FIGURE length ; length = 3, opeode = DRAW ARC ; length = 0, opeode = END FILLED FIGURE length = 2, opeode = SET POSITION length length = 0, opeode = DRAW ARC ; length = 0, opeode = BEGIN FILLED FIGURE = 0, opeode = END FILLED FIGURE A Filled Figure Using DRAW_ARC 2.,29 . 5190.,138 • 0.,31. 3.,27 • 0.,-610., 80 • 2.,25 • 5190.,770 • 0.,32. Example 1-5: length = 0, opeode = BEGIN FILLED FIGURE ; END LIST terminated, opeode = DRAW LINES A Filled Figure Using DRAW ARC 2.,29 • 4660.,340 • 0.,31. 3.,23 • 5090.,770 • 120 • 0.,32 • Example 1-4: = 2, opeode = SET POSITION A Filled Figure Using DRAW_LINES 2.,29. 3090.,270 • 0.,31. 3.,23. 3090.,770 • 360 • 0.,32 • Example 1-3: length length = 2, opeode = SET POSITION length length = 3, opeode = DRAW REL ARC- length = 2, opeode = DRAW LINES length = 0, opeode = END FILLED FIGURE = 0, ope ode = BEGIN FILLED FIGURE A Filled Figure Using DRAW REL ARC 1-24 FILLED FIGURE ATTRIBUTES .BYTE • WORD .BYTE .BYTE • WORD .BYTE • WORD .BYTE 2.,29. 7000.,3790 • 0.,31. 3.,23. 6000.,3800.,180 • 3.,23. ; 6000.,5532.,-60 • 0.,32. Example 1-6: . BYTE .WORD .BYTE .BYTE • WORD • WORD • WORD • WORD • BYTE length length = 0, opcode = BEGIN FILLED FIGURE = 3, opcode = DRAW REL ARC - length = 3, opcode = DRAW REL ARC length = 0, opcode = END FILLED FIGURE - length - = 2, opcode = SET POSITION < length = 0, opcode length = 8, opcode ; length = BEGIN FILLED FIGURE = DRAW LINES = 0, opcode = END FILLED FIGURE A Filled Figure Using DRAW_LINES 2.,29. 3090.,3770 • 0.,31 • 255.,25 • 3590.,2270 • 4090.,3770 • 2790.,2870 • 4290.,2870 • 3090.,3770 • -32768 • 0.,32 • Example 1-8: 1.13 = 2, opcode = SET POSITION A Filled Figure Using DRAW REL ARC 2.,29 • 890.,3770. 0.,31. 8.,25. 1890.,3770 • 890.,1770 • 1890.,1770 • 890.,3770 • 0.,32 • Example 1-7: .BYTE • WORD • BYTE • BYTE • WORD • WORD • WORD • WORD • WORD •WORD • BYTE length length = 2, opcode = SET POSITION length = 0, opcode = BEGIN FILLED FIGURE END LIST terminated, opcode = DRAW LINES ; length = 0, opcode = END FILLED FIGURE A Filled Figure Using DRAW LINES TEXT ATTRIBUTES The following sections describe the PRO/GIDIS that determine the appearance of text. 1.13.1 state variables Alphabets The SET ALPHABET instruction specifies the current alphabet, which is used when drawing characters, defining a new character, or erasing an existing alphabet in preparation for establishing a new alphabet. PRO/GIDIS supports up to 16 alphabets. 1-25 TEXT ATTRIBUTES Each alphabet is a list of characters. Alphabet 0 is the DEC Multinational Character Set (shown in Figure 1-11) and cannot be modified. Alphabets 1 through 15 can contain user-defined characters, which are represented as a two-dimensional raster (bit pattern) with a specific storage size (width and height). .. .. .. .. · o (ill " P .. • 1. A Q a q • .. • A ± •• 4= So 3 1 1 A PI 1 ill ~ a " 3 4 esc Ii • • 0 t. • • " !5 E U e u F v .p v • .. • • ¥ 1 W • • S >c: ... ]0[ 1 Id .. • • :I. :z • • -C .. • a C « » 1 1 '1 1 '1 J4 :t 0 , ( ) T d 7 G W 9 H X h '3 Y i I J Z j + ' ; 1< C , -::: L , - M :J ? N 0 / " k 1 m J n IV o ... .. • • •• 2 ~ 1 fl (:) Ii (:) 0 il 0 .. • . . a :r . . * . . • •. > Figure 1-11: .. 2BRbr •• •• a e. . . ·· ·• • P A 0 iii 0 0 0 .u A 0 A 11 I.e (:) • C (E 9 !: !!: f!: E: ~ .. u e u u • a 0 e U 1 at fZI U. l!t f Y 1 Y ! 1 i 1 1 .L r B :.: • Alphabet 0 Characters within alphabets are referenced as a tuple (alphabet, character index). A character index is a value corresponding to the character's position in the alphabet. The first character has a character index of zero. Thus, an alphabet with 26 characters would have index numbers in the range 0 to 25. Character indexes are unsigned, 16-bit integers. To create a new alphabet of user-defined characters: 1. Use the SET ALPHABET alphabet. 2. Use the CREATE ALPHABET instruction to clear any existing characters and to allocate storage for the new alphabet. No character definition can take place until CREATE ALPHABET executes. 3. Use the LOAD CHARACTER CELL instruction to add characters the alphabet. instruction 1-26 to specify the current to TEXT ATTRIBUTES For example (format described in Chapter 2): = 2, opcode = SET ALPHABET • BYTE •WORD 1.,38 • 1• ilength • BYTE .WORD .WORD • WORD .WORD 4. ,46 • 8. 10. 96 • ilength = 4, opcode = CREATE ALPHABET iwidth (storage pixels) iheight (storage pixels) iextent iwidth-type O. These instructions erase alphabet 1 and create a new alphabet of 96 characters (numbered 0 through 95) with a storage size of 8 by 10. The last parameter value (0) is required for PRO/GIDIS on PIOS 1.7. Figure 1-12: 1.13.2 Character Cell Rotation Cell Rendition The SET CELL RENDITION instruction specifies variations on characters that can be performed without selecting a new alphabet, yet are not related to writing colors or writing modes. The renditions defined for the Professional are back slant and italics. 1-27 TEXT ATTRIBUTES 1.13.3 Cell Rotation The SET CELL ROTATION instruction specifies the angle at which characters are to be drawn, as shown in Figure 1-12. Actual rotation is the nearest possible angle to that requested. Displa'd Size LARGER THAN Unit Size •- - - __ - ______ 1 ~ D i sp 1 a'd Size j.a Unit Size j<l!le------f~ , -- - - - -r---i-r- Displa'd Size SMALLER THAN Unit Size Displa'd Size Figure 1-13: 1.13.4 Character Unit Cell and Display Cell Cell Oblique The SET CELL OBLIQUE instruction specifies the angle between the width and the height of the display cell for a non-rotated character. When the angle is non-zero, display cells are parallelograms, rather than rectangles. 1-28 TEXT ATTRIBUTES 1.13.5 Cell Unit Size The SET CELL UNIT SIZE instruction specifies the actual size of the character pattern. Although you specify cell unit size in GIDIS Output Space coordinates, that size is only an approximation. PRO/GIDIS actually uses the largest integral multiple of the character pattern that is less than or equal to the specified size. 1.13.6 Cell Display Size The SET CELL DISPLAY SIZE instruction specifies the size in GIDIS Output Space coordinates of the rectangle that contains the character pattern. The unit cell and the display cell always are aligned at their upper left corners (see Figure 1-13). If the unit cell is larger than display cell, only a portion of the character is shown. If the unit cell is smaller than the display cell, PRO/GIDIS draws the unused portion of the display cell as if the pattern specified clear bits. 1.13.7 Cell Movement Cell movement attributes specify how the current position changes after each character is drawn. The SET CELL MOVEMENT MODE and the SET CELL EXPLICIT MOVEMENT instructions- specify these attributes. 1.13.7.1 Movement mode - There are two ways to specify movement: implied and explicit, as shown in Figure 1-14. • cell Implied movement means that the current position moves a distance equal to the display cell width in the direction of the cell rotation. If the display cell width value is negative, the current position moves in the direction opposite to the cell rotation. 1-29 TEXT ATTRIBUTES Implied Movement ( E:H:p 1 1 c 1 t i s ;::ero) Movement ExplIcit Movement Imp !led Plus E:x:p lic it ( E:H:p 1 1 c 1 t Movement i s not ;::ero) Figure 1-14: Character Cell Movement 1-30 TEXT ATTRIBUTES • Explicit movement means that the current position moves exactly as specified by your program in GIOIS Output Space coordinates. Explicit movement is not affected by the cell rotation. Implied movement can be disabled; explicit movement cannot. Thus, if implied movement is enabled, the cell movement is equal to the sum of the implied and explicit movements. PRO/GlOIS for P/OS Vl.7 always uses local symmetry for drawing text and cell movement. Local symmetry preserves sizes and distances in the Hardware Address Space to ensure that all cells and spacings are the same. It also implies that the realized (actual) angle at which the character is drawn is used for implied movement. 1.14 AREA OPERATIONS INSTRUCTIONS These instructions perform operations on viewing transformation instructions. • defined by the ERASE CLIPPING REGION Changes entire output clipping region color. • areas to current secondary PRINT SCREEN Prints a portion of the bitmap at the the printer port. 1.15 printer connected to REPORT HANOLING INSTRUCTIONS Report handling instructions return information about the current PRO/GIOlS state as well as success/failure reports for the immediately preceding PRO/GlOIS instructions. The report path from the PRO/GIOIS interpreter to your program can be viewed as a data stream. It is possible to queue several pending reports. (P/OS 1.7 imposes a buffer limit of 18 words.) Your program sends a request instruction to the interpreter, which creates a report and puts it in the queue. Your program then reads the report queue (with a Read SpecialOata QIO system directive) in the order in which the requests are made. For an example of a report-reading routine, refer to Chapter 2. 1-31 REPORT HANDLING INSTRUCTIONS A report is a variable length block of words. The first word is a tag specifying the type of report and the number of words in the report. Your program must keep in synchronization with the report queue so that it is not reading a data word and interpreting it as a tag word. Your program also can set up an asynchronous system trap (AST) to be executed when a report is placed in the report queue. The following instructions request reports: PRO/GIDIS reports the X and position. • Y coordinates of the current REQUEST_STATUS PRO/GIDIS returns a success or instruction executed. failure code for the last PRO/GIDIS returns the standard character parameters (unit width, unit height, display cell width, and display cell height) for the current alphabet at the current rotation angle. 1-32 CHAPTER 2 INTERACTING WITH THE PRO/GIOIS INTERPRETER The P/OS Terminal Driver provides software access to PRO/GIOIS via the Queue I/O Request (QIO) and Queue I/O Request and Wait (QIOW) system directives. This chapter contains descriptions of the directive formats and PRO/GIOIS instruction syntax rules. QIO error messages are listed at the end of each description. Figure 2-1 depicts the instruction between your program and PRO/GIOIS. and parameter data path You can use PRO/GIOIS from MACRO-II or any supported Tool Kit high-level language that supports external MACRO-II routines. The recommended method is to write callable MACRO-II routines that issue QIO and QIOW directives. Tool Kit FORTRAN-77 provides its own callable QIO and WTQIO routines in SYSLIB. For information on calling a MACRO-II routine from one of the Tool Kit high-level languages, refer to the documentation for your programming language. 2.1 THE PRO/GIOIS INTERFACE PRO/GIOIS instructions are sent to the graphics device with a QIO system directive that specifies the Write Special Data (IO.WSO) I/O function code. For low-overhead, high-speed, device interaction, a number of PRO/GIOIS instructions can be passed to the graphics device at one time. Status information returns with the Read Special Oata (IO.RSO) I/O function call. P/OS transfers the instruction data to and from the graphics device according to the request priority and device availability. Programs that use PRO/GIOIS also can use the Professional VTI02 terminal emulator. Normal QIO directives (IO.WLB, IO.WVB, and so forth) are passed to the VTI02 emulator. For more information, refer to the description of the Terminal Oriver in the P/OS System Reference Manual. 2-1 THE PRO/GIDIS INTERFACE ··· Call QIO IO.WSD User Application Program Instruc. Data Block Call QIO IO.RSD Report Buffer : : Professional Operating System {P/OS} I/O Queue Terminal Driver IO.WLB and varia nts 10 • WS D ••• S D • GDS PRO/GIDIS Interpreter Video Display Figure 2-1: VTlO2 Emulator 10 • RS D ••• S D • GDS GIDIS Instructions and Data m Keyboard . . . . . . . .. . . ........... I ........... ........... J " PRO/GIDIS Data Path On a single-plane system, both GIDIS and the VTl02 emulator draw on the same plane and overwrite each other's data. On a three-plane system, the VTl02 emulator only draws on plane three. Thus, if PRO/GIDIS modifies only planes one and two, there will 2-2 THE PRO/GIDIS INTERFACE be minimal interference. The SET PLANE MASK specifies which planes PRO/GIDIS can modify. instruction The VTI02 emulator scrolls all three planes when the scrolling region is set to the entire screen. Any graphics information in any plane scrolls with the text. If the scrolling region is smaller than ,the entire screen, the VTI02 emulator redraws the characters in their new positions . . This does not scroll or otherwise affect graphics information in planes one and two but it erases graphics information in plane three. You can send an RIS (Reset to Initial State <ESC>c) escape sequence to the VTI02 emulator in order to reset both the VTI02 emulator and PRO/GIDIS to their initial states. PRO/GIDIS immediately performs an "INITIALIZE -1" instruction, clears the bitmap, and expects an opcode as the next word in the instruction/data stream. Thus, you can use RIS to ensure that your program and PRO/GIDIS are "in synch" when your program starts up. You cannot use it arbitrarily in the middle of picture generation because of the global initialization effect. The QIO and QIOW directives are described in detail in the P/OS System Reference Manual. The examples in this manual show the $S forms for clarity. The $C and $ forms can be used as well. IO.WSD and IO.RSD are resolved in the normal manner for system symbols: the Application Builder gets them from module QIOSYM in SYSLIB.OLB. This works correctly in MACRO-II but may not work with languages that have symbol naming restrictions. For example, FORTRAN-77 does not permit periods in symbol names. 2.1.1 Write Special Data (IO.WSD) The write-special-data QIO function directs one or more instructions to PRO/GIDIS. The instructions and their associated parameter values are passed in a buffer that must have an even address. The MACRO-II format for the write Special Data QIO (or QIOW) call is shown below. NOTE The punctuation marks and the items in bold are mandatory; non-bold items are optional. Items in upper-case letters must be used exactly as shown. Items in lower-case letters must be replaced as described. 2-3 THE PRO/GIDIS INTERFACE QIOW$S iIO.WSD,lun,efn,pri,isb,ast,<buffer,length,,'SD.GDS) lun is a logical unit number assigned to the terminal. efn is an event flag number (required wait form QIOW). pri is the priority (ignored but must be present) • isb is the address of the I/O status block. ast is the address of the AST service routine entry point. with the containing synchronous buffer is the address of the buffer instructions and parameters. length is the length of the PRO/GIDIS instruction/parameter buffer (specified as an even number of bytes in the range 2 to 8128). SD.GDS is a data type parameter that indicates PRO/GIDIS output. The QIO system directive returns status in a variable called $DSW. Some possible values are: IS.SUC IE.ILU IE.IEF PRO/GIDIS special global Successful completion Invalid logical unit number Invalid event flag number For a full list of error codes, refer to the QIO directive description and the terminal driver section of the P/OS System Reference Manual. When the QIO directive is successful, it can return the following status codes in the I/O status block. IO.SUC IS.PND IE.ABO IE.DNR 2.1.2 Successful completion I/O request pending Operation i aborted Device not ready Read Special Data (IO.RSD) The read-special-data QIO function reads reports placed in the report queue by PRO/GIDIS report-request instructions: REQUEST CURRENT POSITION, REQUEST STATUS, and REQUEST-CELL STANDARD. These instructions are detailed in Chapter-ID. 2-4 THE PRO/GIDIS INTERFACE The MACRO-II format for the Read Special Data QIO or QIOW call is shown below. NOTE The punctuation marks and the items in bold are mandatory. Non-bold items are optional. Items in upper-case letters must be used exactly as shown. Items in lower-case letters must be replaced as described. OIOW$S tIO.RSD,lun,efn,pri,isb,ast,<buffer,length"tSD.GDS) lun .is a logical unit number assigned to the terminal. efn is an event flag number (required wai t form OIOW). with the synchronous pri is the priority (ignored but must be present). isb is the address of the I/O status block. ast is the address of the AST service routine entry point. buffer is the address of the buffer to contain PRO/GIDIS data. length is the length of the PRO/GIDIS report buffer (specified as an even number of bytes in the range 2 to 8128). SD.GDS is a data type parameter that indicates PRO/GIDIS output. report If there is no data available, the 010 waits until enough data to fill the buffer becomes available. During this wait, no IO.WSD (write special data) is peformed, even if the no-wait form was used. To avoid deadlock, the preferred method is to issue a OIO$W for the exact number of bytes expected after the request instruction is sent to PRO/GIDIS. The 010 system directive returns status in a variable called $DSW. Some possible values are: IS.SUC IE.ILU IE.IEF special global Successful completion Invalid logical unit number Invalid event flag number For a full list of error codes, refer to the QIO directive description and the terminal driver section of the P/OS System Reference Manual. 2-5 THE PRO/GIDIS INTERFACE When the QIO directive is successful, it can return the following status codes in the I/O status block. IO.SUC IS.PND IE.ABO IE.DNR 2.2 Successful completion I/O request pending Operation aborted Device not ready PRO/GIDIS INSTRUCTION SYNTAX The PRO/GIDIS interpreter accepts a stream of PRO/GIDIS instructions consisting of operation code (opcode) words and associated parameter blocks. Specific delimiters are not required between PRO/GIDIS instructions. To ensure that the PRO/GIDIS interpreter handles each individual instruction properly, the opcode word for each instruction contains a length value that specifies the number of parameter words that follow it. 2.2.1 high byte low byte opcode length Operation Codes PRO/GIDIS instruction names map to specific numeric operation codes. For example, the INITIALIZE instruction has an opcode of is 21. 1, while the SET PRIMARY COLOR instruction opcode (Appendix A provides a list of PRO/GIDIS instructions and their corresponding numeric opcodes.) Your program can define PRO/GIDIS instruction names constants. For example, in MACRO-II, this could be: G$INIT G$PRIM = 1. = 21. In FORTRAN, this could be: INTEGER*2 GINIT,GPRIM PARAMETER (GINIT = 1, GPRIM 2-6 = 21) as numeric PRO/GIDIS INSTRUCTION SYNTAX In PASCAL, this could be: CONST INITIALIZE = Ii SET PRIMARY COLOR = 2li 2.2.2 Parameter Blocks Most PRO/GIDIS instructions For example, parameters. parameters. require a specific SET POSITION needs number exactly of two A length value in the range 0 to 254 indicates a fixed-length parameter block. For example, if you specify a length value of two, PRO/GIDIS expects two parameter words as shown in Example 2-1. Some PRO/GIDIS instructions accept a variable number of parameters. The instructions in this category are DRAW LINES, DRAW_REL_LINES, DRAW_CHARACTERS, and LOAD CHARACTER CELL. .BYTE 2.,29. .WORD .WORD 100. 350. Example 2-1: iInstruction data block length = 2 iOpcode for SET POSITION instruction = 29 iHorizontal coordinate for current pOSe iVertical coordinate for current pOSe iFollowing execution of this instruction, ithe current position is 100,550. Instruction with Fixed-Length Parameter Block A length value of 255 indicates that the parameter block contains a variable number of parameter words terminated by an END_LIST instruction word (-32768), as shown in example 2-2. Thus, in a variable-length parameter block, a parameter word cannot contain the value -32768. .BYTE •WORD • WORD • WORD • WORD • WORD Example 2-2: 255.,26.iEND-LIST-term.,opcode=DRAW_REL_LINES idxl 10 • -30 • idyl idx2 20 • +60 • idy2 -32768 • iEND_LIST instruction opcode word Instruction with Variable-Length Parameter Block This technique permits the PRO/GIDIS interpreter to handle erroneous or unsupported opcodes without aborting the program or misinterpreting subsequent opcodes. If the interpreter does not recognize an instruction, that instruction and any data following 2-7 PRO/GIDIS INSTRUCTION SYNTAX are ignored. instruction's instruction. After counting data, PRO/GIDIS and discarding the erroneous proceeds to the next sequential NOTE PRO/GIDJS on P/OS Vl.7 sets the status flag to SUCCESS when it fails to recognize an instruction. Future versions may set the status flag to FAILURE. An instruction with insufficient parameters is not executed at all. An instruction with extra parameters is executed as though the extra arguments do not exist; the extra parameters are skipped and not interpreted as new instructions. For example, a SET POSITION instruction with only one argument is ignored, while a SET POSITION with three arguments uses the first two arguments and discards the third. 2.3 SAMPLE MACRO-II PROGRAM IOSB: OBUF: RBUF: . BLKW .BYTE . BLKW 2• 0.,55. ;Length=O REQUEST_CURRENT_POSITION 3• ;SEND INSTRUCTION TO PRO/GIDIS QIOW$S #IO.WSD,#5,#1,,#IOSB,,<#OBUF,#2,,#SD.GDS) BCS ERROR ; DIRECTIVE FAILED TSTB IOSB ;OPERATION FAILED BLE ERROR ;READ THE REPORT QIOW$S #IO.RSD,#5,#1,,#IOSB,,<#RBUF,#6,,#SD.GDS) BCS ERROR ;BRANCH IF DIRECTIVE FAILED TSTB IOSB BLE ERROR ;BRANCH IF OPERATION FAILED NEW CONTENTS OF RBUF: BYTE AT RBUF 2. (LENGTH) BYTE AT RBUF+l 1. (CURRENT POSITION REPORT TAG) RBUF+2: CURRENT X POSITION RBUF+4: CURRENT Y POSITION ERROR: Error handling routine 2-8 SAMPLE FORTRAN PROGRAM 2 .4 SAMPLE FORTRAN PROGRAM INTEGER*2 PARAMETER INTEGER*2 INTEGER*2 SDGDS, IOWSD, IORSD, ISSUC (SDGDS=1), (IOWSD="5410), (IORSD="6030), IOSB(2), IDS, OBUF RBUF(3),PARLST(6) OBUF = 55*256+0 (ISSUC=1) !OPCODE 55=REQUEST CURRENT POSITION !LENGTH=O CALL GETADR(PARLST(1),OBUF) ! ADDRESS PARLST(2) = 2 PARLST(4) = SDGDS !LENGTH=2 BYTES CALL WTQIO(IOWSD,5,1,0,IOSB,PARLST,IDS) IF (IDS.NE.ISSUC) GO TO 999 !DIRECTIVE FAILED IF (IOSB(1).NE.ISSUC) GO TO 999 !I/O REQUEST FAILED CALL GETADR(PARLST(1),RBUF) PARLST(2) = 6 !EXPECTED LENGTH OF REPORT IN BYTES CALL WTQIO(IORSD,5,1,0,IOSB,PARLST,IDS) IF (IDS.NE.ISSUC) GO TO 999 !DIRECTIVE FAILED IF (IOSB(1).NE.ISSUC) GO TO 999 !I/O REQUEST FAILED NEW CONTENTS OF RBUF: RB UF ( 1 ) : 258 REPORT TAG = 1*256+2 1 = THE REPORT TAG AND 2 = LENGTH OF DATA FOLLOWING RBUF(2): CURRENT X POSITION IN GIDIS OUTPUT SPACE RBUF(3): CURRENT Y POSITION IN GIDIS OUTPUT SPACE 999 ERROR FOUND 2-9 CHAPTER 3 CONTROL INSTRUCTIONS This chapter contains a detailed description of each control instruction. Table 3-1 lists the instructions covered in the chapter. Table 3-1: Control Instructions Summary Chart Opcode/Length Instruction/Arguments 1/1 INITIALIZE 6/0 NEW PICTURE 24/0 END PICTURE 28/0 FLUSH BUFFERS 5/6 SET OUTPUT CURSOR alphabet, index, width, height, offset x, offset_y subsystem-mask-value - 0/0 NOP 128/0 END LIST 3.1 INITIALIZE The initialize instruction restores PRO/GIDIS characteristics to their power-on default states. Specifically, this instruction sets up PRO/GIDIS device subsystem characteristics such as the color map, the primary color, secondary color, addressing, writing modes, and so forth. 3-1 INITIALIZE Opcode: 1 Length: 1 Format: INITIALIZE subsystem-mask-value subsystem-mask-value is a word that specifies a set of graphics subsystems as shown in Figure 3-1. Status: SUCCESS The INITIALIZE instruction represents device subsystems by specific bits in a mask value passed to PRO/GIDIS with the instruction. For example, a parameter value of 4 (bit 2 set) restores a device's text subsystem's power-on default conditions. The initialize instruction mask bit settings for the various subsystems are shown in Figure 3-1. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +--+--+--+--+--+--+--+--+--+--~--+--+--+--+--+--+ I I I I I I I I I I I I I I I I I 1--- Addressing +--+--+--+--+--+--+--t--+--+--+--+--+--+--+--+--+ I--- Global Attributes ----- Text 1----- (reserved) ------Co1or Map -------Alphabet Storage -------(reserved) -------(reserved) -------Cursor (Bits 8-15 are reserved) Figure 3-1: INITIALIZE Subsystem Initialization Bit Mask The PRO/GIDIS subsystems that can be selected for are listed in Table 3-2. Table 3-2: initialization InitialIzation Subsystems Subsystem Description Bit -~------~-----~----------------------------------~---- ----------- Addressing Resets the viewing transformation o Global Attributes Reinitializes writing mode, primary color, secondary color, line and area texture, planes selected, and pixel size 1 3-2 INITIALIZE Text Resets the current alphabet, unit size, display size, cell rotation, cell rendition, implicit cell movement flag, and explicit cell movement 2 Color map Reinitializes the color map 4 Alphabet Clears all user-defined alphabets 5 Cursor Resets the output cursor 8 Notes: • You can OR (logical inclusive) mask values together initialize multiple subsystems in one instruction. • A mask of -1 decimal (177777 all subsystems. • The order of initialization is: (1) addressing, (2) global attributes, (3) text, (4) color map, (5) alphabet storage, and (6) cursor. • Regardless of the mask word, the INITIALIZE instruction aborts any blocks begun with BEGIN_FILLED_FIGURE. • Table 3-3 lists all of the state variables affected and their values after initialization. • Some state variables are included in more than one subsystem. octal) explicitly to initializes Example: .BYTE • WORD Table 3-3: 1.,1. 1.12.14 . ;length=l,opcode for INITIALIZE ;addressing, global attributes, iand text subsystems mask bits Initialization Variable States ---------------------------------------------------------------Reset State Variable -------~-----~~---~--------------------~-------------- ---------- Addressing Subsystem default ids width (960) default ids height (600) output ids width output ids height 3-3 INITIALIZE output output output output viewport viewport viewport viewport gidis gidis gidis gidis output output output output output output output output clipping clipping clipping clipping x origin y origin width height space space space space 0 0 default ids width (960) default ids height (600) x origin y origin width height 0 0 default ids width (960) default ids height (600) x origin y origin width height 0 0 default ids width (960 ) default ids height ( 600 ) current position x current position y 0 0 output cursor width output cursor height standard unit width standard unit height output cursor x offset output cursor y offset 1/2 standard unit width 1/2 standard unit height line texture size line texture length area texture width area texture height standard unit width standard unit height pixel pixel pixel pixel o (1 hardware pixel) o (1 hardware pixel) a o logical logical logical logical width height x offset y offset cell movement mode flag cell explicit movement dx cell explicit movement dy o o cell cell cell cell standard standard standard standard * implied movement display size width display size height unit size width unit size height * converted to new GOS coordinates 3-4 display width display height unit width unit height INITIALIZE Global Attributes Subsystem primary color secondary color plane mask writing mode logical logical logical logical 7 o 7 overlay o (1 hardware pixel) o (1 hardware pixel) o o pixel width pixel height pixel x offset pixel y offset line texture pattern line texture length line texture size solid (all ones) 16 (bits) 16 hardware pixels area area area area -1 texture texture texture texture alphabet char width height * o standard unit width standard unit height * converted to new GOS coordinates Text Subsystem o current alphabet cell display size width cell display size height standard display width standard display height cell unit size width cell unit size height standard unit width standard unit height cell rotation cell oblique cell rendition o o cell movement mode flag cell explicit movement dx cell explicit movement dy implied movement none o o 3-5 INITIALIZE Color Map Subsystem -------------------R G M B name ------------------color map color map color map color map color map color map color map color map [0 ] [1 ] [2 ] [3 ] [4] [5 ] [6 ] [7 ] .0, .2, .7, .2, .6, .6, .6, .6, .0, .2, .2, .7, .6, .6, .6, .6, .0, .6, .2, .2, .6, .6, .6, .6, .0 .2 .3 .4 .7 .7 .7 .7 black blue red green white white white white (dark) (dark gray) (light gray) (light) (light) (light) (l ight) (light) Alphabet Storage Subsystem o alphabet extent [1 to 16] alphabet height [1 to 16] alphabet width [1 to 16] o o Cursor Subsystem output output output output output output 3.2 cursor alphabet cursor character index cursor width cursor height cursor x offset cursor y offset -1 o standard unit width standard unit height 1/2 standard unit width 1/2 standard unit height NEW PICTURE The NEW PICTURE instruction prepares the video display for a new picture-by clearing the screen. This instruction sets the entire screen to the current secondary color. (The SET SECONDARY COLOR instruction is described in the chapter on global-attributes.) Opcode: 6 Length: 0 Format: NEW PICTURE Status: SUCCESS For device-independent programs, it is recommended that you use NEW PICTURE and END PICTURE to enclose any picture-drawing instructions. Place instructions for pausing or requesting operator interaction after the END PICTURE instruction and before another NEW PICTURE instruction. 3-6 NEW PICTURE Notes: PRO/GIDIS ignores any arguments specified with a • NEW PICTURE instruction. • The secondary color is written to the bitmap subject to the plane mask in effect at the time NEW PICTURE executes. (Refer to the SET PLANE MASK instruction in the chapter on global attributes:) PICTURE clears all pixels in the bitmap including those • NEW outside the clipping region. In particular, it clears the 32-pixel bands on both sides of the bitmap that are not of HAS and not normally used. part Example: .BYTE 3.3 o • ,6. ilength=O,opcode for NEW PICTURE END PICTURE The END PICTURE instruction causes all internally buffered data to be sent to the output device. (Refer to the FLUSH BUFFERS instruction). Any required device output processing of a-picture occurs here (top-of-form, wait for interactive response, and so forth). Opcode: 24 Length: 0 Format: END PICTURE Status: SUCCESS For device-independent programs, it is recommended that you use NEW PICTURE and END PICTURE to enclose any picture-drawing instructions. Place instructions for pausing or requesting operator interaction after the END_PICTURE instruction and before another NEW PICTURE instruction. Notes: • END PICTURE's effect on the video display is the same as FLUSH BUFFERS instruction (for PIOS Vl.7). 3-7 the END PICTURE Example: • BYTE O. ,6 • ilength=O,opcode for NEW_PICTURE ;drawing instructions .BYTE 0.,24. ;length=O,opcode for END_PICTURE , ;wait for operator response .BYTE ilength=O,opcode for NEW_PICTURE O. ,6. imore drawing instructions 3.4 FLUSH BUFFERS FLUSH BUFFERS forces execution of all buffered instructions. Opcode: 28 Length: 0 Format: FLUSH BUFFERS Status: SUCCESS Notes: • PRO/GIDIS ignores any FLUSH BUFFERS instruction. arguments • Issue a FLUSH BUFFERS instruction prior to any delay or wait for operator response so that all drawing instructions are executed before the wait. specified with a Example: • BYTE 3.5 O. ,28 . ilength=O,opcode for FLUSH BUFFERS SET OUTPUT CURSOR The SET OUTPUT CURSOR instruction selects a specific character to be used as the program/s output cursor. The output cursor is a visible indication of the current output position. 3-8 SET OUTPUT CURSOR Opcode: 5 Length: 6 Format: SET OUTPUT CURSOR alphabet, index, width, height, offset-x, offset-y alphabet specifies the alphabet containing the the special cursors indicator (-1). character or index specifies the character or special cursor. width specifies the width of the cursor in GIDIS Output Space coordinates (greater than or equal to zero). height specifies the height of the cursor in GIDIS Output Space coordinates (greater than or equal to zero). offset-x specifies the X offset from the top left corner of the cursor to the current position (range 0 to width). offset-y specifies the Y offset from the top left corner of the cursor to the current position (range 0 to height). Status: SUCCESS if the requested character (alphabet, index) is defined, and width and height and coordinates are in range; otherwise FAILURE. Notes: • The width and height (in PRO/GIDIS Output Space) are treated as a unit cell size; there is no equivalent of a display cell. When width and height are adjusted automatically to an integral multiple of the storage size of the character, the x and y offsets are adjusted by the same ratio. alphabet code of -1 specifies that one of the special • An built-in cursors is to be used. For P/OS 1.7 these cursors are: -1 o 1 2 No cursor Implementation default (same as 1) Tracking Cross (small cross) Crosshairs (full screen width and height) User-specified width and height are ignored when the tracking is used. All other values are reserved. 3-9 SET OUTPUT CURSOR • If the chosen cursor is not predefined (either a special cursor or a character in alphabet 0, your program must first define the character and then execute a SET OUTPUT CURSOR instruction. If the character is redefined after the SET OUTPUT CURSOR, the appearance of the cursor is unchanged untIl another SET OUTPUT CURSOR executes. • Once the SET OUTPUT CURSOR instruction executes, appearance of the cursor changes immediately. the Example: .BYTE .WORD .WORD 6. ,5. l. 2. • WORD . WORD • WORD . WORD 30 . 30 • 15 • • BYTE .WORD . WORD • WORD . WORD • WORD • WORD 6. ,5 • -l. -1 • O• O• 3• O• ilength=6,opcode for SET OUTPUT CURSOR iAlphabet 1 (user-defined alphabet) iCharacter index value i(Assume that Alphabet 1, character-index ;2, is defined as an arrow pointing istraight upward iWidth of 30 iHeight of 30 iX offset iY offset iThe arrow is the new cursor with the tip being at the current position. Example: 3.6 4. ilength=6,opcode for SET OUTPUT_CURSOR iPRO/GIDIS Cursor Alphabet iNo cursor iWidth value of zero (ignored) iHeight value of zero (ignored) iX offset (ignored) iY offset (ignored) NOP The NOP instruction performs no operation. Execution of a NOP has no effect on the current state of PRO/GIDIS, other than to set the status flag to SUCCESS. Opcode: 0 Length: 0 Format: NOP Status: SUCCESS 3-10 NOP Notes: • PRO/GIDIS ignores instruction. any arguments included with a NOP Example: .BYTE 0.,0. ;length=O,opcode for NOP . BYTE . WORD .WORD 2 • ,0 • 1540. 71. ;length=2,opcode for NOP iprivate data (ignored by PRO/GIDIS) iprivate data (ignored by PRO/GIDIS) Example: 3.7 END LIST The END LIST instruction indicates the end of a variable argument list. This instruction follows the last argument in the list. Those PRO/GIDIS instructions often used with a variable-length argument list that terminates with an END LIST instruction include the following: DRAW_LINES, DRAW_REL_LINES, DRAW_CHARACTERS, and LOAD CHARACTER CELL. Opcode: 128 Length: 0 Format: END LIST Status: SUCCESS Notes: • PRO/GIDIS ignores any arguments specified instruction. • The code for this instruction (-32768) is invalid for any data in any variable argument list. Your program must ensure this value is never sent in a variable argument list; however, the code is valid as an argument for fixed-length instructions. When this value appears as an opcode, no operation is performed. For example, the point [-32768,0] could not be sent in a DRAW LINES instruction that terminates with an END LIST instruction, but could be sent in a DRAW LINES instruction with counted arguments. 3-11 with an END LIST END LIST Example: .BYTE .WORD .WORD .WORD 255.,25. ilength=END_LIST,opcode for DRAW LINES 100. iDRAW LINES data 110. iDRAW-LINES data -32768. iEND LIST iNote that the length = 255 is a special value and does not indicate 255 data words following, but that there is an unknown number of words following, to be terminated with the END LIST code 3-12 CHAPTER 4 VIEWING TRANSFORMATION INSTRUCTIONS This chapter contains a detailed description of each of viewing transformation instructions. Table 4-1 lists instructions covered in the chapter. Table 4-1: Viewing Transformation Instructions Summary Chart Opcode/Length Arguments Instruction 12/2 SET OUTPUT IDS width, height 13/4 SET OUTPUT VIEWPORT ulx, uly, width, height 9/4 SET GIDIS OUTPUT SPACE ulx, uly, width, height 4/4 SET OUTPUT CLIPPING REGION ulx, uly, width, height 4.1 the the SET OUTPUT IDS The SET OUTPUT IDS instruction specifies the width and height of Imposed Device Space (IDS). It also sets the window, clipping region, and viewport to be identical with IDS, and resets all global attributes to their default values as shown in Table 4-2. Opcode: 12 Length: 2 Format: SET OUTPUT IDS width, height The parameters are integers greater than or equal to zero. width specifies the width of IDS. height specifies the height of IDS. 4-1 SET OUTPUT IDS Status: SUCCESS if width and height are greater than otherwise. Of FAILURE Notes: • The upper left corner of IDS is always [0,0] • The coordinates of the lower-right corner is [width - 1, height 1] . • When the picture aspect ratio of IDS space is not equal to the picture aspect ratio of the hardware address space, only a portion of the view surface is used. • No drawing is done by the SET OUTPUT IDS instruction. .. It is recommended that width and height be less than or equal to 16384 (2 to the 14th power). This limitation ensures sufficient off-screen address space for accurate clipping. • Table 4-1 lists all of the state variables affected and their reset values after the SET OUTPUT IDS executes. All sizes are reset. Example: Table 4-2: See SET GIDIS OUTPUT SPACE description. State Variables Affected by SET_OUTPUT_IDS Variable Reset State IDS width IDS height as specified as specified viewport same as IDS GIDIS output space same as IDS clipping region same as IDS current position x current position y o o cursor width cursor height cursor x offset cursor y offset standard unit width standard unit height 1/2 standard unit width 1/2 standard unit height line texture size line texture length area texture width area texture height standard unit width standard unit height 4-2 * SET OUTPUT IDS logical pixel x offset logical pixel y offset logical pixel width logical pixel height o a o (1 hardware pixel) o (1 hardware pixel) cell movement mode flag cell explicit movement dx cell explicit movement dy implicit, local o o cell cell cell cell standard display width standard display height standard unit width standard unit hei t display size width display size height unit size width unit size height * converted to new GOS coordinates 4.2 SET OUTPUT VIEWPORT The SET OUTPUT VIEWPORT instruction specifies the v Opcode: 13 t. Length: 4 Format: SET OUTPUT VIEWPORT ulx, uly, width, hei The parameters are integer values representing IDS coordinates. ulx specifies the x (horizontal) address of the origin of the viewport. uly specifies the y (vertical) address of the origin viewport. of width specifies the width greater than zero). of the viewport (value must be height specifies the height greater than zero). of the vi (value must be Status: SUCCESS if width and height are greater than otherwise. 0, FAILURE Notes: • No drawing is done by the SET OUTPUT VIEWPORT instruction. • If the picture aspect ratios of the window and viewport not equal, only a portion of the viewport is used. 4-3 are SET OUTPUT VIEWPORT • Unlike SET OUTPUT IDS and SET GIDIS OUTPUT SPACE, this instruction does not change any.of the-state variables that depend on the definition of GIDIS Output Space (cell unit size, line texture size, and so forth). The GOS values are preserved. Example: 4.3 See SET GIDIS OUTPUT SPACE description. SET GIDIS OUTPUT SPACE The SET GIDIS OUTPUT SPACE instruction specifies the bounds of the window in GIDIS Output Space. It also sets the output clipping region to coincide with the window and resets all global attributes to their default values as shown in Table 4-3. Opcode: 9 Length: 4 Format: SET GIDIS OUTPUT SPACE ulx, uly, width, height The parameters are integer values representing GIDIS Output Space coordinates. ulx specifies the x (horizontal) address of the origin of the window. uly specifies the y (vertical) address of the origin window. of width specifies the width of the window (value must be than zero). greater height specifies the height of the window (value must be greater than zero). Status: SUCCESS if width FAILURE otherwise and height are greater than the zero, Notes: • No drawing is done when SET_GIDIS_OUTPUT_SPACE executes. It is recommended that a maximum absolute value of 16384 (2 • to the 14th power} be used for the following: ulx, uly, ulx + width, and uly + height. This will allow off-screen address space for accurate clipping. 4-4 sufficient SET GIDIS OUTPUT SPACE • Table 4-3 lists all of the state variables affected and their reset values after the SET GIDIS OUTPUT SPACE instruction executes. All sizes are reset~ Example: .BYTE • WORD .WORD 2.,12. 960 . 600. ilength=2,opcode for SET OUTPUT IDS iwidth -iheight (upper left corner is [0,0] and lower right corner is [959,599]) • BYTE • WORD • WORD . WORD • WORD 4.,13 • il ength=4,opcode for SET_OUTPUT_VIEWPORT • BYTE • WORD • WORD .WORD • WORD 4. ,9 • Table 4-3: O• O• 480 • 600 • O• O• 2400. 4000 • iSets the viewport to the left half of the screen ilength=4,opcode SET GIDIS OUTPUT SPACE iSets GaS to 0-to-2399 in X and 0-to-3999 in Y (all within the left half of the screen) State Variables Affected by SET_GIDIS_OUTPUT_SPACE Variable Reset State GIDIS output space as specified clipping region same as window current position x current position y o o output cursor width output cursor height output cursor x offset output cursor y offset standard unit width standard unit height 1/2 standard unit width 1/2 standard unit height line texture size line texture length area texture width area texture height standard unit width standard unit height logical logical logical logical o pixel pixel pixel pixel x offset y offset width height o o (1 hardware pixel) o (1 hardware pixel) 4-5 * SET GIDIS OUTPUT SPACE cell movement mode flag cell explicit movement dx cell explicit movement dy o o cell cell cell cell standard display width standard display height standard unit width standard unit height implied display size width display size height unit size width unit size height * converted to new GOS coordinates 4.4 SET OUTPUT CLIPPING REGION The SET_OUTPUT CLIPPING_REGION instruction specifies the output clipping region in PRO/GIDIS output space coordinates. The output clipping region is the rectangle within which the PRO/GIDIS interpreter is permitted to draw on the view surface. Opcode: 4 Length: 4 Format: SET OUTPUT CLIPPING REGION ulx, uly, width, height The parameters are GIDIS Output Space coordinates. ulx specifies the X (horizontal) coordinate of the upper left corner of the clipping region. uly specifies the Y (vertical) coordinate upper of the clipping region. width specifies the width of the clipping region. height specifies the height of the clipping region left corner Status: SUCCESS if width and height are greater than or equal 0, FAILURE otherwise to Notes: • The SET OUTPUT CLIPPING REGION instruction does drawing. • You cannot set the clipping region to an area larger than the output device. An attempt to do so reduces the clipping region to the portion that maps to the output device. If no portion maps, the clipping region width and height are set to 0, and all drawing is clipped to nothing. 4-6 not do any SET OUTPUT CLIPPING REGION • Clipping affects all drawing primitives, including those generating intermediate points that might be outside the spaces specified. For example, circles are drawn only within the specified clipping region. If width or height are zero, • clipped to nothing. all drawing instructions are clipping region includes • The following instructions: the borders. Therefore, the SET OUTPUT CLIPPING REGION 100, 100, 300, 300 SET POSITION 50, 100 DRAW_LINES 100, 100 draw the pixel at [100,100], assuming this the visible area. point is within SET_POSITION 100, 150 DRAW_LINES 500, 150 draws pixels from [100,150] to [400,150] inclusive. Example: .BYTE • WORD • WORD • WORD • WORD 4. ,4. 100 • 100 . 400 • 100 • ilength=4,SET OUTPUT CLIPPING REGION iSets output clipping region to rectangle iwith the upper left corner at 100,100 ;and the lower right corner at 500,200. 4-7 CHAPTER 5 GLOBAL ATTRIBUTES INSTRUCTIONS This chapter contains a detailed description of each global attribute instruction. Table 5-1 lists the instructions covered in the chapter. Table 5-1: Global Attribute Instructions Summary Chart Opcode/Length Instruction/Arguments 21/1 SET PRIMARY COLOR color-value 15/1 SET SECONDARY COLOR color-value 16/6 SET COLOR MAP ENTRY map, index, red, green, blue, mono 20/1 SET PLANE MASK plane-masK 22/1 SET WRITING MODE mode-value 19/4 SET PIXEL SIZE width, height, offset-x, offset-y 17/3 SET LINE TEXTURE length, pattern, size 14/2 SET AREA TEXTURE alphabet, char-index 3/2 SET AREA TEXTURE SIZE width, height 69/2 SET AREA CELL SIZE width, height ---------------------------------------------------------------------5.1 SET PRIMARY COLOR The primary color generally indicates the presence of an image. On a three-plane bitmap system, SET PRIMARY COLOR specifies an 5-1 SET PRIMARY COLOR index into the color map. On a single-plane SET PRIMARY COLOR instruction specifies light or dark. Opcode: 21 Length: 1 Format: SET PRIMARY COLOR color-value system, color-value A word that specifies a color map entry (range 0 to 7) or a monochrome value (0 = dark, any other value = white). Status: SUCCESS Notes: • Refer to the INITIALIZE instruction in Chapter 3 for of the power-on default colors. a list • This instruction does not draw anything on the screen or affect the bitmap. It affects objects drawn in primary color after the instruction executes. Example: . BYTE • WORD 5.2 1.,21 • 4• ;length=l,opcode for SET PRIMARY COLOR ;defines primary color as color number 4 SET SECONDARY COLOR The secondary color generally indicates the absence of an image. On a three-plane bitmap system, SET SECONDARY COLOR specifies an index into the color map. On- a single-plane system, SET SECONDARY COLOR instruction specifies light or dark. Opcode: 15 Length: 1 Format: SET SECONDARY COLOR color-value Status: color-value A word that specifies a color map entry (range 0 to 7) or a monochrome value (0 = dark, any other value = white). SUCCESS 5-2 SET SECONDARY COLOR Notes: • Refer to the SET_COLOR_MAP_ENTRY description in this for a list of the power-on default colors. chapter • This instruction does not draw anything on the screen or affect the bitmap. It affects objects drawn in the secondary color after the instruction executes. Example: .BYTE • WORD 5.3 1.,15. 1. ;length=l,opcode for SET SECONDARY COLOR ;defines secondary color-as number-l SET COLOR MAP ENTRY The SET COLOR MAP ENTRY instruction specifies the contents of a particular color map entry, assuming that the EBO is present. All images that were drawn using that color map entry are immediately affected. Opcode: 16 Length: 6 Format: SET COLOR MAP ENTRY map index map, index, red, green, blue, mono For the an integer representing a specific color map. Professional, this value must be 0 to represent the Professional's only map. an integer in the range 0 to 7 representing eight color map entries. one of the red an integer in the range of 0 to proportion of red. 65535 representing the green an integer in the range of 0 to proportion of green. 65535 representing the blue an integer in the range of 0 to proportion of blue. 65535 representing the mono an integer in the range of 0 to proportion of monochrome. 65535 representing the Status: SUCCESS if map = 0 and index is in the range 0 to 7. 5-3 SET COLOR MAP ENTRY For convenience, the following table shows proportional values in the form of octal fractions. Because programming languages vary, the equivalents are shown as octal, unsigned decimal, and signed decimal constants. Table 5-2: Color Map Values for the Professional Octal Fraction* Octal Integer Decimal Integer (Unsigned) Decimal Integer (Signed) 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0 20000 40000 60000 100000 120000 140000 160000 0 8192 16384 24576 32768 40960 49152 57344 0 8192 16384 24576 -32768 -24576 -16384 -8192 * Only the even numbers are useful for blue values: (0.0,0.2,0.4, and 0.6). Notes: • This instruction is not useful (non-EBO) device. with a single-plane bitmap change occurs in the bitmap when SET COLOR MAP ENTRY • No executes, but every pixel drawn with the-specified-index changes color instantly. Example: • BYTE • WORD •WORD .WORD • WORD • WORD • WORD 5.4 ;length=6,opcode for SET COLOR MAP ENTRY ;PRO's bitmap (value must be 0) ;Color index 1 1• ;Red is one-eighth (octal) 20000 40960 • ;Green is five-eighths (unsigned decimal) 16384 • ;Blue is one-quarter -32768 • ;Monochrome is one-half (signed decimal) 6.,16 . O• SET PLANE MASK The SET PLANE_MASK instruction specifies which bitmap planes are accessible to the PRO/GIDIS interpreter. The interpreter cannot modify a plane unless that plane has been designated modifiable with a SET PLANE MASK instruction. 5-4 SET PLANE MASK Opcode: 20 Length: 1 Format: SET PLANE MASK plane-mask plane-mask An integer bit mask representing a bitmap planes (as shown below). indicates an accessible plane. combination of A set (l) bit Status: SUCCESS The following table shows all combinations that can be represented by plane mask en) values. It also shows the effective writing indexes for each combination, assuming that all "write-locked" planes are clear. Table 5-3: n Plane Mask Values Plane 3 Plane 2 Plane 1 ° Writing Indexes none x 1 2 x 3 x 4 X 5 X 6 X X 7 x x 0, 1 0, 2 x 0, 1, 2, 3 0, 4 0, 1, 4, 5 X 0, 2, 4, 6 x 0, 1, 2, 3, 4, 5, 6, 7 X = accessible to PRO/GIDIS = not accessible to PRO/GIDIS Notes: • SET PLANE MASK does not affect the video display. • Write-locked planes change the effects of the writing See SET WRITING MODE for details. modes. Professional VTI02 emulator uses plane 3 for text. Refer • The to Chapter 2 of this manual and the Terminal Subsystem Manual for more information. 5-5 SET PLANE MASK • The color map can be used in combination with the color mask to prepare separate images in separate planes for switching back and forth quickly. For example: ~Set .BYTE .WORD all color map entries to dark 1.,20. ~len=l,opcode 1. ~plane ~draw ~Set for SET PLANE MASK 1 image A in plane 1 map entries 1, 3, 5, and 7 to light A appears ~Image .BYTE .WORD 1. ,20. 2• ~len=l,opcode ~plane ~draw for SET PLANE MASK 2 image B in plane 2 iSet map entries 1, 3, 5, and 7 to dark iImage A disappears iSet map entries 2, 3, 6, and 7 to light iImage B appears Although drawing image B might take a while, depending on the complexity of the image, it will appear all at once. You can continue flipping images A and B very quickly. In other words, you can draw B while A is being viewed and so forth. This technique requires careful coordination of the color map. In order for the contents of one or more planes to have no effect on the visible image, certain color map entries must be set identically: "Invisible" Planes none 1 2 3 1,2 1,3 2,3 1,2,3 Color Map Entry Sets (O) (I) (2) (3) (4) (5) (O,l) (2,3) (4,5) (6,7) ( 0 , 2) (1, 3) (4 , 6) (5 , 7 ) (0,4) (1,5) (2,6) (3,7) ( 0 , 1 , 2 , 3) (4 , 5 , 6 , 7 ) ( 0 , 1 ,4, 5) (2, 3 , 6 , 7 ) (0,2,4,6) (1,3,5,7) (0,1,2,3,4,5,6,7) 5-6 (6) (7) SET PLANE MASK Example: .BYTE .WORD 5.5 1. ,20. "'Ball ilength=l,opcode for SET_PLANE_MASK iEnables GIDIS access to planes 1 and 2 iPlane 3 is write-protected SET WRITING MODE The SET WRITING MODE instruction defines how PRO/GIDIS writes images to the bitmap. See Chapter 1 for a description of the writing modes. Opcode: 22 Length: 1 Format: SET WRITING MODE mode-code mode-code Specifies one of the following integer values: a 1 2 3 4 5 6 7 8 9 = = = = = = = = = = TRANSPARENT TRANSPARENT NEGATE COMPLEMENT COMPLEMENT NEGATE OVERLAY OVERLAY NEGATE REPLACE REPLACE NEGATE ERASE ERASE NEGATE Status: SUCCESS if a valid mode is requestedi FAILURE otherwise. Notes: • No drawing is executes. done when the SET WRITING MODE instruction Example: . BYTE • WORD 5.6 1. ,22 • 6• ilength=l,opcode for SET_WRITING_MODE iSpecifies REPLACE writing mode SET PIXEL SIZE The SET PIXEL SIZE instruction permits you to increase of the logical pixel used for drawing lines. 5-7 the size SET PIXEL SIZE Opcode: 19 Length: 4 Format: SET PIXEL SIZE width, height, offset-x, offset-y The parameters are GIDIS Output Space coordinates. width specifies the logical drawing pixel width. height specifies the logical drawing pixel height. offset-x specifies the X offset from the top left corner of pixel to the current position. the offset-y specifies the Y offset from the top left corner of pixel to the current position. the Status: SUCCESS if width and height are greater than or equal to zero, offset x is greater than or equal to zero and not less than width, and offset y is greater than or equal to zero and not greater than height. Notes: • The default drawing point is one physical default, lines are drawn one pixel wide. pixel, and, • Any value that maps to a size smaller than a hardware pixel is set to a hardware pixel size. In particular, width = 0 and height = 0 always sets the drawing pixel to the hardware pixel size. • The drawing pixel is always a rectangle orthogonal to and Y axes. • Complement writing mode can produce unexpected can replace mode using line texture. • No drawing is done when the SET PIXEL SIZE function executes. • SET_PIXEL_SIZE is used in drawing lines and arcs and WRITE PIXEL ARRAY instruction. the results, in Example: .BYTE • WORD • WORD • WORD .WORD 4.,19. 6• 6• 3• 3. ilength=4,opcode for SET_PIXEL_SIZE iwidth in GIDIS output space units iHeight in GIDIS output space units iCentered horizontally iCentered vertically 5-8 by X as the SET LINE TEXTURE 5.7 SET LINE TEXTURE The SET_LINE TEXTURE instruction defines the line texture, a pattern that is repeated in drawing lines and arcs. Opcode: 17 bit Length: 3 Format: SET LINE TEXTURE length, pattern, size length the length (in bits) of the selected pattern. length parameter must be less than or equal to 16. pattern a binary line pattern (ones and zeroes). PRO/GIDIS begins the pattern by using the low-order (rightmost) bit 0 first. size specifies the length (in GIDIS output space coordinates) of one repetition of the pattern. Size must be greater than zero. Status: SUCCESS if length in a range of 1 to 16, and if greater than 0, FAILURE otherwise. size The is Notes: • Size is used in a similar manner as the unit size for characters is used for text. Effective size is an integral multiple of the pattern length in physical pixels. • The pattern length is repeated every size units in the display. The low-order bit is used first, then successively higher order bits. The pattern is rotated as lines are drawn, so that the pattern is preserved around corners and bends. • For the Professional, the size given is used for horizontal and vertical lines. Diagonal lines have a size that is larger by a factor of the square root of 2 (1.414 ..• ) • Pixel size does not change the 'size' in which the pattern repeats, although the appearance of the line does change. • The only way to reset the texture to the original is to issue another SET LINE TEXTURE instruction. • No drawing is done by the SET LINE TEXTURE. 5-9 SET LINE TEXTURE l~xample : .BYTE .WORD .WORD .WORD 5.8 3.,17 8. ilength=3., opcode for SET_LINE_TEXTURE iLength of pattern ~B10001111 iON, ON, ON, ON, OFF, OFF, OFF, ON iBits are used in order low to high 100. iSize of one repetition of pattern in iGIDIS output space SET AREA TEXTURE ET AREA TEXTURE specifies a two-dimensional bit pattern that Area texture is defines -the appearance of filled figures. specified as a character in an alphabet. Any arbitrary pattern (up to the maximum character size) can be used for area texture. Opcode: 14 Length: 2 Pcrmat: SET AREA TEXTURE alphabet char-index alphabet, char-index Specifies the number of the alphabet containing the texture character. It can be the DEC Multinational character set (alphabet 0), a user-defined alphabet, or the special texture indicator "-1". The index texture. of the specific character or special Status: SUCCESS if the specified character (alphabet, char-index) is defined. lJotes • The alphabet number is explicitly specified and does not depend on the current alphabet selected by the SET ALPHABET instruction. • If the character is re-defined after this function, the appearance of future filled areas is according to the old definition. In other words, the current pattern is copied to a special area texture cell at the time SET AREA TEXTURE executes. • Alphabet -1 is reserved for implementation-defined area textures. Alphabet -1 char-index 0 is derived from the line texture (the pattern is drawn vertically and replicated horizontally) when the instruction executes. The texture size is taken from the line texture size, not from the area texture width and height. 5-10 SET AREA TEXTURE • The pattern always appears orthogonal to the axes; no way to rotate the pattern. there is • Area textures are self-aligning. When two adjacent or overlapping areas are filled, the appearance shows no seams. An exception occurs in complement and complement-negate modes where overlapping areas collide. Areas that overlap are drawn twice in these modes. • Pixel size is not used when filling areas. • No drawing is done when SET AREA TEXTURE executes. Example: .BYTE • WORD .WORD 5.9 2.,14 8• 23. ;length=2., opcode for SET AREA TEXTURE ;User-defined alphabet 2 ;23rd character SET AREA TEXTURE SIZE The SET AREA TEXTURE SIZE instruction specifies the actual size of texture character displayed; the size is specified in GIDIS output space. Character pattern is mapped completely to this size. Opcode: 3 Length: 2 Format: SET AREA TEXTURE SIZE width, height The parameters are GIDIS Output Space coordinates. width specifies the width of one repetition of the area texture pattern. height specifies the height texture pattern. Status: SUCCESS if width and FAILURE otherwise. of one height repetition are of greater the area than zero, Notes: • The area size is restricted to an integral multiple of the texture pattern. PRO/GIDIS uses the largest available size that is not larger than the size specified. If no available size is small enough, the smallest available is used. 5-11 SET AREA TEXTURE SIZE • This instruction does not affect the pattern used. • No drawing is done when SET AREA TEXTURE SIZE executes. Example: .BYTE . WORD .WORD 5.10 2. ,3 12 • 8. ;length=2., SET AREA TEXTURE SIZE iArea texture width ~ 12 units iArea texture height = 8 units SET AREA CELL SIZE The SET AREA CELL SIZE instruction allows you to specify a particular size for the area texture cell, the source for the area texture. Opcode: 69 Length: 2 Format: SET AREA CELL SIZE width, height width The width (in storage pixels) for the area width value must be in a range of 1 to 16. cell. The height The height of the area cell in storage pixels. height value must be in a range of 1 to 16. The Status: SUCCESS if both width and height are in the otherwise, FAILURE. 1-16 range, Notes: • When a character cell is loaded into the area cell, PRO/GIOIS clears the remainder (if any) of the area cell bits. Thus, if a subsequent SET AREA CELL SIZE instruction increases the area cell size, the-new pattern is all zeros. • The SET- AREA- TEXTURE instruction sets the area cell size from that of the character cell, overriding any previous SET AREA CELL SIZE specification. • No drawing is done when this instruction executes. 5-12 SET AREA CELL SIZE Example: .BYTE • WORD .WORD 2.,14. 2• 23 • BYTE • WORD • WORD 9• 9• 2.,69 • iLength=2, opcode for SET_AREA_TEXTURE iUser-defined alphabet 2 (assume 8 by 10) iCharacter 23 i Area Cell Size is now 8 by 10 iLength=2, opcode for SET AREA CELL SIZE iarea cell width = 9 storage plxelsiarea cell heighth = 9 storage pixels iArea cell size is now 9 by 9, padded on ithe right, with one column of OFF's, and iwith the bottom row of the character icell removed 5-13 CHAPTER 6 DRAWING INSTRUCTIONS This chapter contains a detailed description of each PRO/GIDIS drawing instruction. Table 6-1 lists the instructions covered in the chapter. Table 6-1: Drawing Instructions Summary Chart Opcode/Length Instruction/Arguments 29/2 SET POSITION x, y 30/2 SET REL POSITION dx, dy 25/n DRAW LINES x, y 26/n DRAW REL LINES dx, dy 23/3 DRAW ARC x, y, angle 27/3 DRAW REL ARC dx, dy, angle ------------------------------------------------------ --------------6.1 SET POSITION The SET POSITION instruction specifies a new current position an absolute position in GIDIS Output Space. Opcode: 29 Length: 2 Format: SET POSITION x as x, Y Specifies the new X (horizontal) position in GIDIS output space 6-1 value of the current SET POSITION y Specifies the new Y (vertical) position in GIDIS output space value of the current Status: SUCCESS Notes: • No drawing is done when SET POSITION executes. Example: • BYTE .WORD .WORD 6.2 2.,29 • 100. 350. ;Length=2, opcode for SET POSITION ;New current position ;is [100,350] SET REL POSITION The SET REL POSITION instruction specifies a new current position as an offset from the old current position in GIDIS Output Space. Opcode: 30 Length: 2 Format: SET REL POSITION dx, dy dx Specifies an offset from the position in GIDIS output space current X (horizontal) dy Specifies an offset from the position in GIDIS output space current Y (vertical) Status: SUCCESS, provided no arithmetic overflow overflow, FAILURE (position does not change) occurs; on Notes: • No drawing is done when SET POSITION executes. symmetry is preserved; SET REL POSITION [Dx,Dy] is • Global always same as a 'SET POSITION [Current_x + Dx,Current_y + Dy] , • Example: • BYTE • WORD • WORD 2.,30 • 100 • -50 . iCurrent position is [100,350] ;Length=2, opcode for SET REL POSITION ;Relative position is ; [+100,-50] ;New current position is [200,300] 6-2 DRAW LINES ( 6.3 DRAW LINES The DRAW LINES instruction draws a series of straight line segments, starting at the current drawing position. The end point of each line segment is specified as absolute coordinate pairs, expressed in GIDIS output space. Opcode: 25 Length: n Format: DRAW LINES xl, yl, x2, y2, ••• xl Specifies the X (horizontal) value of end point in GIDIS output space. the first yl Specifies the Y (vertical) value of the first line's point in GIDIS output space. x2 Specifies the X (horizontal) value of the end point in GIDIS output space. y2 Specifies the Y (vertical) value of the second line's end point in GIDIS output space. second line's end line's Status: SUCCESS, provided no filled figure table overflow occurs; on overflow, FAILURE (position does not change) Notes: • The coordinates can be specified either in a counted argument list (with the count supplied with the opcode word, or in an END LIST terminated list with 255 in the opcode word, as described in Chapter 2 of this manual. • If there is an X coordinate with no Y coordinate, the lone coordinate is ignored with no error indication. X DRAW LINES instruction is affected by the following • The global attributes: writing mode, primary color, plane mask, secondary color, pixel size, line texture, and filled flag. (See Note 4.) • figure The way the coordinate parameters are used depends on the filled figure flag. When the filled figure flag yields FALSE, this instruction draws a straight line from the current position to the specified point. Then, the current position is changed and the specified point becomes the new current position. The next line is drawn from this new position to the location. specified by the next parameter pair. 6-3 DRAW LINES • In complement and complement negate mode, common points (last pixel in one line, first pixel in the next) are drawn only once. The first pixel of a line is skipped and the last pixel is drawn. If the first pixel is the last pixel, the pixel is drawn. • When the filled figure flag yields TRUE, this instruction saves the given points in the filled figure table. No drawing is done; however, current position changes and is set to each specified (x, y) point. When the instruction completes, the current drawing position is located at the point indicated by the last parameter pair. When the filled figure table is full, coordinate pairs are ignored, and status is set to FAILURE. • DRAW LINES modifies region. the bitmap only inside the clipping Example: • BYTE • WORD • WORD 2.,25 • 150 • 200 • iNot in a filled figure definition i(filled figure flag is FALSE) iCurrent position is [200,300] iLength=2, opcode for DRAW LINES iDraw a line from [200,300] ito [150,200] iNew current position is [150,200] Example: . BYTE .WORD .WORD .WORD .WORD 4.,25 • 600. -10. 300. +10. icurrent position is [150,200] inot in a filled figure definition iLength=4, opcode for DRAW LINES ix1 iy1 ix2 iy2 iDraw lines from [150,200] to [600,-10] ithen from [600,-10] to [300,10] iNew current position is [300,10] iNote that both the -10 and the +10 are iabso1ute coordinates. 6-4 DRAW LINES Example: .BYTE • WORD .WORD .WORD . WORD icurrent position is [300,10] inot in a filled figure definition 255.,25.iEND LIST-terminated,opcode = DRAW LINES 400. ixl 40. iyl 700. ix2 -32768. iENDLIST terminator value iDraws a line from [300,10] to [400,40] iNew current position is [400,40] i(Note that PRO/GIDIS ignores the x2 icoordinate with no corresponding y2.) Example: • BYTE .WORD • WORD • WORD • WORD 6.4 4.,25 • 300. 200 . 300 . 300 • iInside a filled-figure definition i (Filled figure flag is TRUE) iCurrent position is not used i by this instruction iLength=4, opcode for DRAW LINES ixl iyl ix2 iy2 i The points [300,200] and [300,300] are ;added to the filled figure table ;new current position is [300,300] DRAW REL LINES The DRAW REL LINES instruction draws a series of connected line segments, starting at the current drawing position. The end point of the first line segment is specified relative to the current position, and the end points of any following line segments are relative to the preceding segment's end point. Opcode: 26 Length: n Format: DRAW REL LINES dxl, dyl, dx2, dy2, dxl Specifies the X offset (horizontal) value line's end point in GIDIS output space. of the first dyl Specifies the Y offset (vertical) value line's end point in GIDIS output space. of the first dx2 Specifies X offset (horizontal) value line's end point in GIDIS output space. of the second 6-5 DRAW REL LINES dy2 Specifies the Y offset (vertical) value line's end point in GrDIS output space. of the second Additional coordinate pairs specify relative for additional lines. end points Status: SUCCESS, provided no last pair arithmetic overflow or filled figure table overflow occurs; on overflow, FAILURE (position is indeterminate). Notes: Please refer to the notes for DRAW LINES. Example: ;Not in a filled figure definition ;(filled figure flag is FALSE) ;Current position is [100,100] ;Length=4, opcode for DRAW REL LINES :dxl ;dyl ;dx2 ;dy2 ;Draw lines from [100,100] to [110,90] ;and from [110,90] to [140,105] ;New current position is [140,105] • BYTE •WORD •WORD . WORD .WORD 4.,26 • +10 • -10 • +30 • +15 .BYTE •WORD .WORD .WORD .WORD •WORD ;Current position is [140,105] ;not in a filled figure definition 255.,26. ;END-LIST-term.,opcode=DRAW REL LINES 10. ;dxl -30. idyl 20. ;dx2 +60. ;dy2 -32768. ;END LIST ;Draw lines from [140,105] to [150,75] ;then to [170,135] ;New current position is [170,135] Example: 6-6 DRAW REL LINES Example: • BYTE • WORD • WORD .WORD .WORD • WORD 6.5 5.,26. 100 • o• o. 100. 79 • iInside a filled-figure definition i (Filled figure flag is TRUE) iCurrent position is [100,100] iLength=5, opcode for DRAW REL LINES . idx1 idyl idx2 idy2 idx3 iAdds the points [200,100] and [200,200] ito the filled figure table ;New current position is [200,200] ;since there is no dy3, dx3 is ignored DRAW ARC The DRAW ARC instruction draws a circular arc from the current position around the specified center. Direction of the arc is determined by the sign of the angle parameter. For example, a DRAW ARC 105,105,-90 instruction would draw a quarter-circle starting at the current position, using location 105,105 as the center of the arc's circle. Because the angle's sign is negative, the arc drawn would be clockwise from the current position. Opcode: 23 Length: 3 Format: DRAW ARC x, y, angle x Specifies the X (horizontal) value of point in GIDIS output space. the arc's center y Specifies the Y (vertical) value point in GIDIS output space. of the arc's center angle The angle is given in degrees, with a positive value meaning counter-clockwise with respect to the physical screen. Status: SUCCESS provided angle is within a range of -360 to +360 and there is no filled figure table overflow, otherwise FAILURE. 6-7 DRAW ARC Notes: • An angle of zero means no drawing is donei +/- 360 means a full circle. Values greater than 360 (or less than -360) are errors, and no arc is drawn. • If the filled figure flag is TRUE then, instead of drawing the arc, all internally calculated interpolation points are added to the filled figure table. • The current position is left at the end of the arc. • DRAW ARC is affected by the following global attributes: writing mode, primary color, plane mask, secondary color, pixel size, line texture, and filled figure flag. P/OS 1.7, the PRO/GIDIS interpreter calculates one • In interpolation point per 10 degrees of arc (or portion), regardless of the size of the circle. • Full quadrant arcs always end at the exact point expected. Fractional quadrant arcs end at the closest available point, which might not be precisely correct. Multiple fractional quadrant arcs are not guaranteed to end at the exact point predicted by your program. For example, a full circle of a 103 degree arc and a 257 degree arc is not guaranteed to leave the current position exactly where it started. • DRAW ARC modifies the bitmap only inside the clipping region. Example: • BYTE • WORD • WORD • WORD 3.,23 • 400 • 300 • 180 • iNot in a filled figure definition i(filled figure flag is FALSE) iCurrent position is [500,300] iLength=3, opcode for DRAW ARC :x coordinate of center iY coordinate of center i180 degrees is one-half a circle i (counter-clockwise) iDraws the top half of the circle icentered at [400,300] with radius 100 iMiddle of the arc is [400,200] iNew current position is [300,300] 6-8 DRAW ARC Example: • BYTE • WORD • WORD .WORD 3.,23 • 400 • 300 • -90. ilnside a filled-figure definition i (Filled figure flag is TRUE) iCurrent position is [500,300] iLength=3, opcode for DRAW ARC iCenter is [400,300] i90 degrees = 1 quadrant iAdds nine interpolation points i(internally calculated) ito the filled figure table iLast point added is [400,400] iNew current position is [400,400] 6.6 DRAW REL ARC The DRAW REL ARC instruction draws a circular arc from the current -posItion around the center, specified relative to the current position. Length of the arc is specified by an angle in degrees. Direction of the arc is determined by the sign of the angle parameter. Opcode: 27 Length: 3 Format: DRAW REL ARC dx, dy, angle dx Specifies the offset X (horizontal) value center point in GIDIS output space. of the arc's dy Specifies the offset Y (vertical) value center point in GIDIS output space. of the arc's angle The angle is given in degrees, with a positive value meaning clockwise with respect to the physical screen. Status: SUCCESS, provided angle within a range of -360 to +360 and there is no filled figure table overflow or arithmetic overflow, otherwise FAILURE. Notes: Please refer to the notes for DRAW ARC. 6-9 DRAW REL ARC Example: • BYTE • WORD • WORD • WORD 3.,27 • -100 . +30 • -90 • ;Current position is [400,300] ;Filled figure flag is FALSE ;Length=3,opcode is DRAW REL ARC ;Center is [-100,+30] ; relative to current position ;90 degrees = one quadrant (clockwise) ;Draws one quadrant from [400,300] to ; [330,430] centered at [300,330] ;New current position is [330,430] 6-10 CHAPTER 7 FILLED FIGURE INSTRUCTIONS This chapter contains a detailed description of each filled figure instruction. Table 7-1 lists the instructions covered in the chapter. Table 7-1: Filled Figure Summary Chart Opcode/Length Instruction/Arguments 31/0 BEGIN FILLED FIGURE 32/0 END FILLED FIGURE 7.1 BEGIN FILLED FIGURE This instruction starts the definition of a closed figure to be filled by the END FILLED FIGURE instruction. Filling a figure occurs according to the current attributes in effect. A corresponding END FILLED FIGURE instruction is required to actually fill the fTgure. Opcode: 31 Length: 0 Format: BEGIN FILLED FIGURE Status: SUCCESS The following PRO/GIDIS instructions are invalid (set status to failure and do nothing) when used between a BEGIN_FILLED_FIGURE instruction and its corresponding END FILLED FIGURE. BEGIN FILLED FIGURE DRAW CHARACTERS SET GIDIS OUTPUT SPACE 7-1 BEGIN FILLED FIGURE SET OUTPUT IDS SET OUTPUT VIEWPORT SET POSITION SET REL POSITION Notes: e The current position is saved in the filled-figure are the first and last poi t of the figure. • If a filled invalid. • BEGIN FILLED__ FIGURE sets the filled-figure flag to TRUE. • Use DRAW LINES f DRAW__REL _LINES I DRAy,I_ARC r and DRAW REL ARC to enter positions in the filled-figure table. e No drawing is done by the BEGIN FILLED FIGURE function. e To abort a filled-figure definition, send the INITIALIZE instruction with any argument (including 0). An INITIALIZE 0 instruction aborts a filled-figure definition without affecting anything else. Example: 7.2 figure is in progress, this table as instruction is (See END FILLED FIGURE.) END FILLED FIGURE The END FILLED FIGURE instruction terminates the definition of a closed -figure-and fills the figure. This instruction is used in conjunction with the BEGIN FILLED FIGURE instruction, described in the preceding paragraph~. Opcode: 32 Length: 0 Format: END FILLED FIGURE Status: SUCCESS if there is a corresponding otherwise, FAILURE. BEGIN _FILLED __FIGURE, Notes: • The filled-figure table contains the vertices of to be filled. the figure END FILLED FIGURE • The edges of the filled figure are the mathematically ideal lines through the positions in the filled-figure table, but one "extra" pixel is included to ensure that no gap occurs between two adjacent areas. The edge is not guaranteed to be identical to a line drawn (outside of a filled-figure definition) through the same points due to differences in drawing direction and round-off errors. • The current position is unchanged by the END FILLED FIGURE. Current position is left at the last position given. Note that if table overflow occurred, the last point might not be the last vertex in the filled-figure table. • This instruction modifies region. • If too many positions are specified, only the first 256 vertices are used, and a straight line connects the 256th point with the first point. (256 is the maximum number of vertices in the filled-figure table for Pies 1.7.) the bitmap inside the clipping primary writing attributes used in the fill are: • Global color, secondary writing color, writing mode, plane mask, area texture cell, area cell size, and global attributes are: pixel size. • area size. Unused Complement and complement-negate writing modes can give unexpected results when filled figure areas overlap or abut. 7-3 END FILLED FIGURE Example: .BYTE .WORD .WORD .BYTE .BYTE .WORD .WORD .WORD .WORD .BYTE .WORD .WORD .WORD .BYTE 2.,29. 100. 100. 0.,31. ;Length=2,opcode for SET POSIT10N ;Current position is [100,100] ;Length=O,opcode for BEGIN FILLED FIGURE ;Filled-figure table now has [100;100] 4.,26. ;Length=4,opcode for DRAW REL LINES +100. ;dxl +0. ;dyl +0. ;dx2 +100. ;dy2 ;Adds points [200,100] and [200,200] to the filled-figure table 255.,25. ;END LIST terrninated,opcode = DRAW LINES 100. ;xl200. ;x2 -32768. ;END LIST ;Adds point [100,200] to the filled-figure table 9.,32. ;Length=O,opcode for END FILLED FIGURE ;The area defined by [100,100],[200,100], [200,200], [100,200], and [100,100] (a square) is filled with the current area texture (modified by whatever current global attributes are in effect.) 7-4 CHAPTER 8 TEXT INSTRUCTIONS This chapter instruction. chapter. Table 8-1: contains a detailed description of each text Table 8-1 lists the instructions covered in the Text Instructions Summary Chart Opcode/Length Instruction/Arguments 38/1 SET ALPHABET alphabet-number 46/4 CREATE ALPHABt::T width, height, extent, width-type 34/n LOAD CHARACTER CELL char-index, width, dO, dl, ••• ,dn 43/1 SET CELL RENDITION cell-rendition 44/1 SET CELL ROTATION dx, dy 65/1 SET CELL OBLIQUE dx, dy 45/2 SET CELL UNIT SIZE width, height 40/2 SET CELL DISPLAY SIZE width, height 42/1 SET CELL MOVEMENT MODE flag 41/2 SET CELL EXPLICIT MOVEMENT dx, 35/n DRAW CHARACTERS char- indexl, char- index2, 8-1 dy ••• SET ALPHABET 8.1 SET ALPHABET The SET ALPHABET instruction selects a specific alphabet to be used as the current alphabet. Any alphabet-related operations, except as noted, act on the currently selected alphabet. Opcode: 38 Length: 1 Format: SET ALPHABET alphabet alphabet is an integer value in a range specifies the current alphabet. of 0 to 15 that Status: SUCCESS if the alphabet number is valid (from 0 FAILURE otherwise. to 15), Notes: • Valid alphabet numbers for the Professional (P/OS 1.7) are 0 through 15. Alphabet 0 is the DEC Multinational Character Set. • Alphabet 0, the DEC Multinational font, is a read-only alphabet and cannot be changed through PRO/GIDIS. Control characters (indices 0 through 31 and 128 through 159 decimal) are not included, and, if requested with DRAW CHARACTERS, appear as an error ("blob" or "checkerboard")- character. Some indices are resevered and appear as a reversed question mark. • The current alphabet can be reset to the power-on default (0) by the PRO/GIDIS INITIALIZE instruction's text subsystem option. • No drawing is done by the SET ALPHABET instruction. Example: • BYTE • WORD 8.2 1.,38 • 2• iLength=l, opcode for SET ALPHABET iSelects alphabet #2 as current alphabet CREATE ALPHABET CREATE ALPHABET erases the current alphabet and reserves resources for an alphabet with the specified storage size (width by height by extent). 8-2 CREATE ALPHABET Opcode: 46 Length: 4 Format: CREATE ALPHABET width, height, extent, width-type width is an integer in the range (0 to 16) that specifies the number of horizontal bits in a character pattern. height is an integer in the range (0 to 16) that specifies the number of vertical bits in a character pattern. extent is an unsigned integer that specifies the number of characters in the alphabet. Character indices can range from to extent - 1. ° width-type is reserved for future use. this value must be 0. For the Professional, Status: SUCCESS if width and height are greater than or equal to zero, the width type is zero, the current alphabet number is a valid user definable alphabet (not 0), and there are sufficient resources to create the alphabeti FAILURE otherwise. Notes: • Character indices are 16-bit numbers and do not necessarily correspond to DEC Multinational codes (except for alphabet °). • For the Professional, all characters in an alphabet have same storage size. the • To reclaim alphabet space, CREATE ALPHABET 0,0,0,0 erases the existing alphabet and returns all of the alphabet's resources. Example: • BYTE • WORD • WORD .WORD • WORD 4.,46 • 10 • 16 • 32. °. iCurrent alphabet is alphabet number 2 i Length=4, opcode for CREATE ALPHABET iwidth iheight iextent iwidth-type (Note: MUST BE ZERO) iErases alphabet 2 and creates an empty alphabet with the specified characteristics 8-3 LOAD CHARACTER CELL 8.3 LOAD CHARACTER CELL The LOAD CHARACTER CELL instruction loads a character cell from the raster data given as parameters. This instruction acts on the currently selected alphabet. Opcode: 34 Length: variable Format: LOAD_CHARACTER_CELL char-index, width, dO, dl, ••• ,dn char-index The index of the character cell to be loaded. This value must be in a range of 0 to extent - 1, where extent is the total character count for the alphabet • width The width value must be in a • b.i-12; range of 0 to the width value given with the CREATE ALPHABET instruction that established the alphabet. (P/OS 1.7 does not use this value. However, it still must be in the appropriate range.) dO, dl, ••• Zero to 16 words of data to be loaded into the character cell. The top character cell row is loaded from the first data word (dO), the second row from the second data word (dl), and so forth. Status: SUCCESS if character index is in a range of 0 to extent - 1, and width is in a range of 0 to alphabet width; otherwise, FAILURE. Notes: • The leftmost pixel in a row comes from the low-order the appropriate data word. bit in • Characters cannot be loaded into any alphabet with an value of zero. extent Example: • BYTE • WORD • WORD • WORD .WORD .WORD .WORD 6.,46 • 9• 4• -BlOll -B10l0 -BlOOO .... BOOOI ;Alphabet 2 has width of 4, height of 5, and extent of 10 ;Length=6, opcode for LOAD CHARACTER CELL ;Character index (last cell in alphabet) ;Width OFF ON ON ON ;Pattern: OFF ON OFF ON OFF OFF OFF ON (Note the OFF OFF OFF bit reversal) ON OFF OFF OFF OFF ; ;Last row not given,cleared automatically 8-4 SET CELL RENDITION 8.4 SET CELL RENDITION The SET CELL RENDITION instruction specifies the renditions to be added to characters written following execution of this instruction. Renditions are variations on characters that could be performed without selecting a new alphabet, yet are not related to writing colors or writing modes. Renditions defined for the Professional are: backslant and italics. Opcode: 43 Length: 1 Format: SET CELL RENDITION mask-value mask-value A mask representing one or more of the cell renditions. The mask value corresponds to one or more rendition bits set. (See Figure 8-1). Status: SUCCESS if the requested rendition is implementation, FAILURE otherwise. supported by the This instruction specifies a bit-mask value indicating which renditions are to be added. Certain mask bits are reserved for future PRO/GIDIS enhancements. Figure 8-1 illustrates the defined rendition bits that can be selected. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ I I I I I I I I I I I I I I I I I +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ I -- Back Slant I -- Italics I -- (Reserved) Figure 8-1: SET CELL RENDITION Bit Mask Notes: ~BOOOll) • Setting both backslant and italics (mask value error. In this case, rendition is undefined. is an • Italics and backslant (reverse italics) are generated. by oblique angles of -23 and +23 degrees, respectively. Requesting italic or backslant rendition overrides any specific oblique angle requested previously. Requesting an oblique angle after an italic rendition request nullifies the italic request. Example: .BYTE .WORD 1.,43. 2• iLength=l, opcode for SET CELL RENDITION ;Requests italics rendition 8-5 SET CELL ROTATION 8.5 SET CELL ROTATION The SET CELL ROTATION instruction defines the angle of rotation at which the character is to be displayed. The character is rotated about the current position (upper left corner of the display cell) to the available rotation angle nearest to the angle specified. Table 8-2 shows the angles available. Opcode: 44 Length: 1 Format: SET CELL ROTATION angle angle The requested angle in degrees. A positive angle indicates counter-clockwise from normal text. value Status: SUCCESS Notes: • No drawing takes place when the SET CELL ROTATION instruction executes. Example: .BYTE • WORD 1. ,44. -90 . Requested 8.6 Actual o o 45 51 90 129 180 232 270 309 90 135 180 225 270 315 Table 8-2: ;Length=l, opcode for SET_CELL_ROTATION ;Text to go down the screen Cell Rotation Angles SET CELL OBLIQUE An obliqued character cell is slanted away from a true rectanglular orientation. The SET CELL OBLIQUE instruction specifies the angle from vertical of the side of the display cell. A positive angle parameter results in a back-slanted character; a negative angle yields a forward, italic-type slant. Oblique angles always are set for unrotated characters. The oblique angle rotates with the specified rotation. 8-6 Opcode: 65 angle Length: 1 The requested angle in degrees. A positive angle value indicates a backward slant; a negative angle indicates a forward slant. Status: SUCCESS Notes: ~ No drawing takes place when SET_CELL_OBLIQUE executes • • PRO/GrDIS (P/OS VI.7) uses an approximation algorithm to oblique text which is accurate for small angles (less than ten degrees), less accurate for medium angles (up to 25 degrees), and inaccurate for large angles. Increasing the argument value will always increase the text oblique. Example: • BYTE • WORD 8.7 1.,65 • -23 • ;Length=l, opcode for SET CELL OBLIQUE ,Regular italics (slanting right) SET CELL UNIT SIZE The SET CELL UNIT SIZE instruction specifies the actual size of character(s) displayedi the size is specified in GIDIS output space. The stored character pattern is mapped completely to the unit size. Opcode: 45 th: 2 Format: SET CELL UNIT SIZE width, height width A width value in GIDIS output space. greater than zero. height A height value in GIDIS output space. greater than zero. Status: SUCCESS if width FAILURE otherwise and height are The width must be The height must be greater than zero, For PRO/GIDrS, the unit size is restricted to an integral multiple of the character pattern (storage size). PRO/GIDIS uses the largest available size that is not larger than the size specified. If no available size is small enough; the smallest 8-7 SET CELL UNIT SIZE available is used. Refer to the SET CELL DISPLAY SIZE to the size of the area in which the cell unIt is displayed. define Notes: requested unit size does • The alphabet changes, but the not change when the current adjustment described above is recalculated. • The unit cell and the display their upper-left corners. cell always are aligned • No drawing is done when the SET CELL UNIT SIZE executes. at Example: • BYTE . WORD . WORD 8.8 1.,45 . 10 . 30 • ;Length=l, opcode for SET CELL UNIT SIZE iWidth iHeight SET CELL DISPLAY SIZE SET CELL DISPLAY SIZE defines a character's display cell, the rectangular area of the display modified when a character is drawn. Opcode: 40 Length: 2 Format: SET CELL DISPLAY SIZE width, height width A width value in GIDIS output space. height A height value in GIDIS output space. Status: SUCCESS Notes: • The origin of the display cell is always the upper left corner of the cell and is aligned with the unit cell at that corner. • The unit cell can be larger than the display celli if so, the character is clipped to the display cell. If the unit cell is smaller than the display cell, then all of the character is drawn and the rest of the display cell is treated as if the character pattern specified OFF. 8-8 SET CELL.DISPLAY SIZE • Negative values in width or height produce a mirroring in X and Y, respectively. This mirroring or reflection always is done about the origin (the upper-left corner of the cell). Implied movement always goes across the display cell, so implied movement for a display cell mirrored in X is in the opposite direction from the rotation angle. • No drawing is done when the SET CELL DISPLAY SIZE executes. • If either the width or the height is zero, no character is drawn. portion of a Example: • BYTE • WORD • WORD 8.9 2.,40 . 12. 28 • iLength=2, opcode=SET_CELL_DISPLAY_SIZE iWidth iHeight SET CELL MOVEMENT MODE The SET CELL MOVEMENT MODE instruction specifies the manner in which the current position moves after each character is drawn by a DRAW CHARACTERS instruction. Opcode: 42 Length: I Format: SET CELL MOVEMENT MODE flag flag specifies one of the following movement modes: o 2 Explicit cell movement, local symmetry Explicit and implied movement, local symmetry (All other values are reserved.) Status: SUCCESS if Flag is 0 or 2, FAILURE otherwise. Notes: • When using local symmetry, the current position after a DRAW CHARACTERS instruction could be different from that calculated by your program. It is suggested that all DRAW CHARACTERS instructions be followed with a SET POSITION instruction or a REQUEST POSITION instruction unless the exact end of the string is the desired position for the next instruction. 8-9 SET CELL MOVEMENT MODE • No drawing occurs when the SET CELL MOVEMENT MODE instruction executes. • If the flag specified is not 0 or 2, the flag does not change from its previous state. Example: .BYTE • WORD 8.10 1.,42. o. ;Length=l, opcode=SET_CELL_MOVEMENT_MODE ;Explicit local mode symmetry SET CELL EXPLICIT MOVEMENT The SET CELL EXPLICIT MOVEMENT instruction specifies the relative distance that the current position is to move after a character is drawn. The relative distance is specified in GIDIS output space. Opcode: 41 Length: 2 Format: SET CELL EXPLICIT MOVEMENT dx, dy dx Specifies the horizontal distance in GIDIS to move the current position. output space dy Specifies the vertical distance in GIDIS output space move the current position. to Status: SUCCESS The explicit value is the total movement when the cell movement mode is O. The value represents the inter-character spacing when the mode is 2. (Refer to the preceding SET CELL MOVEMENT MODE description for details on implied movement.) The default mode is 2, default explicit movement is [0,0]. Notes: the SET CELL EXPLICIT MOVEMENT • No drawing occurs when instruction executes. • When using local symmetry, the current position after a DRAW CHARACTERS instruction could be different from that calculated by your program. It is suggested that all DRAW CHARACTERS instructions be followed with a SET POSITION instruction or a REQUEST POSITION instruction unless the exact end of the string is the desired position for the next instruction. 8-10 SET CELL EXPLICIT MOVEMENT • The explicit movement is used exactly as specified. not adjusted according to the rotation angle. It is Example: .BYTE .WORD .WORD 8.11 2.,41. 12. iLength=2,SET_CELL_EXPLICIT_MOVEMENT idx O. idy DRAW CHARACTERS The DRAW CHARACTERS instruction displays each of the characters specified by each character index in the parameter list. The characters are taken from the currently selected alphabet. Opcode: 35 Length: n Format: DRAW CHARACTERS char-index char-index, an unsigned 16-bit word Status: SUCCESS if the current alphabet number is the last character-index is valid in FAILURE otherwise. valid and if the alphabet, Characters can be specified either in a counted argument list (with the count supplied with the opcode word) or in an END LIST terminated list with 255 in the opcode word. The rules for variable-length argument lists for PRO/GIDIS are described in Chapter 2 of this manual. Notes: • The current position is updated after each character display, according to the cell movement controls. (See the descriptions of the SET_CELL_MOVEMENT MODE and SET CELL EXPLICIT MOVEMENT instructions.) • This instruction uses implied and explicit cell movement, unit and display size, cell rotation, rendition mask, current alphabet, and writing mode. • DRAW CHARACTERS modifies the bitmap (only inside the clipping region) and the current position. 8-11 DRAW CHARACTERS Example: .BYTE 3.,35. .WORD • WORD .WORD 65. 66. 67. ;Current alphabet = 0 (DEC Multinational) ;Unit size, display size, etc. are set up properly ;Length=3, opcode for DRAW CHARACTERS ;Counted form 'A' 'B' 'C I Example: .BYTE • WORD • WORD • WORD • WORD .WORD ;Current alphabet = 1 (user-defined) ;Unit size( display size, etc. are set up properly 255.,35. ;END_LIST Term.,opcode = DRAW CHARACTERS o. 13 • 7• 45 • -32768. ;END LIST ;Displays 4 characters from alphabet 1, which are user-defined characters 8-12 CHAPTER 9 AREA OPERATION INSTRUCTIONS This chapter contains a detailed description of each of the area operation instructions. Table 9-1 lists the instructions covered in the chapter. Table 9-1: Area Operations Summary Chart Opcode/Length Instruction/Arguments 48/0 ERASE CLIPPING REGION 141/6 PRINT SCREEN 9.1 x, y, width, height, hx, hy ERASE CLIPPING REGION The ERASE CLIPPING REGION instruction sets every pixel inside the current output clipping region to the secondary color that is currently in effect. This instruction erases data currently displayed within the region. ERASE CLIPPING REGION can be used to clear a rectangular area without implying the end of a picture or the beginning of a new picture. Opcode: 48 Length: 0 Format: ERASE CLIPPING REGION Status: SUCCESS 9-1 ERASE CLIPPING REGION Notes: • To erase the entire screen, use the END_PICTURE/NEW PICTURE combination, not the ERASE CLIPPING REGION. • This instruction sets region. • The current writing mode, current area texture, color do not affect this instruction. the bitmap in the output clipping and primary Example: . BYTE 9.2 0.,48 . iLength=O, opcode=ERASE_CLIPPING_REGION PRINT SCREEN The PRINT SCREEN instruction sends a specified portion of the bitmap to a printer connected to the printer port, generally an LA50 or LAlOO. Parameters permit you to indicate the portion of the data to be printed and the relative point on the paper for the printer to start printing. Opcode: 141 Length: 6 Format: PRINT SCREEN x, y, width, height, hx, hy x Specifies the upper left horizontal point of the bitmap data to be printed. This location is given in GIDIS output units. y Specifies the upper left vertical point of the bitmap data to be printed. This location is given in GIDIS output units. width Width of the area output units to be printed, specified in GIDIS height Height of the area to output units be printed, specified in GIDIS hx Specifies the horizontal offset from the current printhead location to begin printing the screen data. This point corresponds to the upper left horizontal coordinate (x) of the data to be printed. The value is given in GIDIS Output Space coordinates. hy Specifies the vertical offset from the current printhead location to begin printing the screen data. This point 9-2 PRINT SCREEN corresponds to the upper left vertical coordinate (y) of the data to be printed. The value is given in GaS coordinates. Status: SUCCESS Notes: • In a single plane system, a pixel value of 0 is mapped to a skip (leaves paper white) and a 1 is mapped to a strike (prints on the paper). On multi-plane systems, the monochrome value of the color map is tested. If 0, the point is skipped (white), if not zero, the point prints. • If the printer port does not have an LA50 or LAI00 connected, nothing occurs. Example: .BYTE • WORD • WORD • WORD .WORD • WORD .WORD 6.,141. iLength=6, opcode for PRINT SCREEN 100 • jUpper left bitmap corner 100 . is [100,100] 400. jData to be printed is 400 units wide 200. by 200 units high o• iBegin printing at current printhead O. location 9-3 CHAPTER 10 REPORT HANDLING This chapter contains a detailed description of each of the report handling instructions. Table 10-1 lists the instructions and report tags covered in the chapter. Table 10-1: Report Handling Summary Chart Opcode/Length Tag Name Instruction Data Record 55/0 REQUEST_CURRENT_POSITION CURRENT POSITION REPORT x, Y 58/0 REQUEST STATUS STATUS REPORT code CELL STANDARD_REPORT uw, uh, dw, dh 10.1 REQUEST_CURRENT_POSITION The REQUEST CURRENT POSITION instruction reports the absolute location of the current position. The current position is the display location at which the next character, line, or arc would be drawn. Opcode: 55 Length: 0 Format: REQUEST_CURRENT_POSITION Status: SUCCESS The reported information takes the following form: CURRENT POSITION REPORT, 10-1 x, Y REQUEST CURRENT POSITION - - The X and Y values reported are the coordinates of the current position. PRO/GIDIS output space Notes: • The current position is not necessarily the same as the last position given to SET POSITION or DRAW LINES; DRAW CHARACTERS and DRAW_ARC instructIons also move the current position. • The REQUEST CURRENT POSITION instruction is most useful following a DRAW ARC or a DRAW CHARACTERS (local symmetry), since your program-cannot determIne precisely where PRO/GIDIS leaves the current position after these instructions. Example: .BYTE 0.,55. ;Lgth=O, opcode=REQUEST_CURRENT_POSITION ;This instruction causes the following report to be placed in the report queue if there is sufficient room. Byte Byte Word Word 2. (Data words following) 1. (Current POSe Rpt. Tag) x (PRO/GIDIS coordinates y for current position) ;The report can be read using a QIO with the function code IO.RSD. Refer to Chapter 2 for more information. 10.2 REQUEST_STATUS REQUEST STATUS reports the success or failure of a PRO/GIDIS instruction. All PRO/GIDIS instructions set the status variable. Opcode: 58 Length: 0 Format: REQUEST STATUS Status: SUCCESS Status is reported in the following format: STATUS REPORT, status where the low-order bit of the variable status indicating SUCCESS or 0 indicating FAILURE. 10-2 is either 1 REQUEST STATUS Notes: • No other codes are defined. reserved for future use.) (Codes other than 0 • FAILURE status is not saved. If your program needs information about the success or failure of every instruction, you must place a REQUEST STATUS instruction after each PRO/GIDIS instruction. • Testing is recommended only following instructions, such as CREATE ALPHABET. major or 1 are PRO/GIDIS Example: .BYTE 0.,58. iassumes previous instruction failed iL9th=0, opcode=REQUEST_STATUS Byte 1. (Data words following) Byte 4. (Current Stat. Rpt. Tag) Word 0 (FAILURE status) iFor additional examples, refer to ;Chapter 2. The REQUEST_CELL_STANDARD instruction reports cell and display cell sizes. Opcode: 54 the current unit Length: 0 Format: REQUEST CELL STANDARD - - Status: SUCCESS The report takes the following form: CELL STANDARD REPORT, unit-wd, unit-ht, display-wd, display-ht where unit-wd and unit-ht are the unit cell width and height of the standard size character in GIDIS space. Display-wd and display-ht are the display cell width and height. 10-3 Notes: • This instruction takes into account the storage size of the current alphabet and the character rotation currently in effect. The standard size for alphabet 0 (DEC Multinational) is not necessarily the same as the standard size for alphabet 1• • Rounding could take place 'converting from device coordinates to GIDIS space. If your program requests 'n' times the size of the standard, the characters actually formed might not be precisely 'n' times the standard. Example: .BYTE 0.,54. :Lgth=O, opcode=REQUEST_CELL_STANDARD Byte Byte Word Word Word Word 4. 5. 9. 20. 8. 20. : (Data words following) (Cell Standard Rpt. Tag) (Unit width) (Unit height) (Display width) (Display height) additional examples, refer to iChapter 2. iFor 10-4 APPENDIX A PRO/GIDIS INSTRUCTION SUMMARIES This chapter contains a PRO/GIDIS instruction summary in three different orders: by function, in ascending opcode order, and in alphabetic order. The opcode and parameter block length values are shown as a word value as well as separate byte .values. A.I INSTRUCTIONS GROUPED BY FUNCTION Opcode Instruction and Arguments Length Opcode Word Function 0 1 5 6 24 28 128 0 1 6 0 0 0 0 0 257 1286 1536 6144 7168 -32768 NOP INITIALIZE mask SET OUTPUT CURSOR a, c, w, h, ox, oy NEW-PICTURE END-PICTURE FLUSH BUFFER END LIST - control control control control control control control 4 9 12 13 4 4 2 4 1028 2308 3074 3332 SET_OUTPUT_CLIPPING_REGION x, y, w, h SET GIDIS OUTPUT SPACE x, y, w, h SET-OUTPUT IDS w~ h SET-OUTPUT-VIEWPORT x, y, w, h transform transform transform transform 3 14 15 16 17 19 20 21 22 69 2 2 1 6 3 4 1 1 1 2 770 3586 3841 4102 4355 4868 5121 5377 5633 17666 attributes SET AREA TEXTURE SIZE w, h attributes SET-AREA-TEXTURE-a, c attributes SET-SECONDARY COLOR color " SET-COLOR MAP-ENTRY m, color, r, g, b, mono SET-LINE TEXTURE length, pattern, size attributes attributes SET PIXEL SIZE w, h, ox, oy attributes SET-PLANE~ASK mask attributes SET-PRIMARY COLOR color attributes SET-WRITING-MODE mode attributes w, h SET-AREA CELL SIZE A-I INSTRUCTIONS GROUPED BY FUNCTION 23 25 26 27 29 30 3 N N 3 2 2 5891 6400+N 6656+N 6915 7426 7682 DRAW_ARC x, y, angle DRAW LINES x, y, ••• DRAW-REL LINES dx, dy, DRAW-REL-ARC dx, dy, angle SET POSITION x, y SET-REL POSITION dx, dy drawing drawing drawing drawing drawing drawing 31 32 0 0 7936 8192 BEGIN - FILLED- FIGURE END FILLED FIGURE - filled figures filled figures 33 34 35 36 38 40 41 42 43 44 45 46 65 2 N N 0 1 2 1 1 1 2 4 1 8450 8704+N 8960+N 9216 9729 10242 10498 10753 11009 11265 11522 11780 16641 BEGIN - DEFINE - CHARACTER c, w d15 LOAD CHARACTER CELL c, w, dO, DRAW-CHARACTERS c, ••• END DEFINE CHARACTER SET-ALPHABET a SET-CELL DISPLAY SIZE w, h SET-CELL-EXPLICIT MOVEMENT dx, dy SET-CELL-MOVEMENT-MODE flag SET-CELL-RENDITION flags SET-CELL-ROTATION angle SET-CELL-UNIT SIZE w, h CREATE ALPHABET w, h, extent, type SET_CELL_OBLIQUE angle text text text text text text text text text text text text text 48 141 0 6 12288 -29434 ERASE CLIPPING REGION PRINT SCREEN x, y, w, h, hx, hy area area 54 55 58 0 0 0 13824 14080 14848 REQUEST CELL STANDARD REQUEST-CURRENT POSITION REQUEST-STATUS reports reports reports A.2 2 ... = INSTRUCTIONS IN OPCODE ORDER Opcode Instruction and Arguments Length Opcode Word 0 1 3 4 5 6 9 12 13 14 15 0 1 2 4 6 0 4 2 4 2 1 0 257 770 1028 1286 1536 2308 3074 3332 3586 3841 NOP INITIALIZE mask SET AREA TEXTURE SIZE w, h SET-OUTPUT CLIPPING REGION x, y, w, h SET-OUTPUT-CURSOR a, c, w, h, ox, oy NEW-PICTURE SET-GIDIS OUTPUT SPACE x, y, w, h SET=OUTPUT_IDS w~ h SET OUTPUT VIEWPORT x, y, w, h SET-AREA TEXTURE a, c SET-SECONDARY COLOR color A-2 Function control control attributes transform control control transform transform transform attributes attributes INSTRUCTIONS IN OPCODE ORDER 16 17 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 40 41 42 43 44 45 46 48 54 55 58 65 69 128 141 4102 SET_COLOR_MAP_ENTRY m, color, r, g, b, mono " 4355 SET LINE TEXTURE length, pattern, size attributes SET-PIXEL SIZE w, h, ox, oy attributes 4 4868 SET-PLANE-MASK mask 1 5121 attributes SET PRIMARY COLOR color attributes 1 5377 SET-WRITING-MODE mode attributes 1 5633 DRAW ARC x,-y, angle drawing 3 5891 o 6144 END PICTURE control 6400+N DRAW LINES x, y, ••• N drawing N 6656+N DRAW-REL LINES dx, dy, drawing DRAW-REL-ARC dx, dy, angle 6915 3 drawing o 7168 FLUSH BUFFER control 2 7426 SET POSITION x, Y drawing 2 7682 SET-REL POSITION dx, dy drawing filled figures BEGIN FILLED FIGURE o 7936 o 8192 filled figures END FILLED FIGURE 8450 2 BEGIN DEFINE CHARACTER c, w text N 8704+N LOAD CHARACTER CELL c, w, dO, ••• dIS text 8960+N DRAW-CHARACTERS c, ••• text N o 9216 text END DEFINE CHARACTER 1 9729 SET ALPHABET a text 2 10242 SET-CELL DISPLAY SIZE w, h text SET-CELL-EXPLICIT MOVEMENT dx, dy 2 text 10498 SET-CELL-MOVEMENT-MODE flag text 1 10753 SET-CELL-RENDITION flags text 1 11009 SET-CELL-ROTATION angle text 1 11265 SET-CELL-UNIT SIZE w, h text 2 11522 text CREATE ALPHABET w, h, extent, type 11780 4 area o 12288 ERASE CLIPPING REGION reports o 13824 REQUEST CELL STANDARD reports REQUEST-CURRENT_POSITION o 14080 reports REQUEST STATUS o 14848 text SET CELL OBLIQUE angle 1 16641 attributes SET-AREA-CELL SIZE w, h 2 17666 control END-LIST-o -32768 area 6 -29434 PRINT SCREEN x, y, w, h, hx, hy A.3 INSTRUCTIONS IN ALPHABETIC ORDER 6 3 ----------------------------------------------------------------Instruction and Arguments Opcode Length Opcode Word Function ----------------------------------------------------------------.LT 33 31 46 23 2 0 4 3 8450 7936 11780 5891 BEGIN DEFINE CHARACTER c, w BEGIN-FILLED-FIGURE CREATE ALPHABET w, h, extent, type DRAW ARC x, y, angle A-3 text filled figures text drawing INSTRUCTIONS IN ALPHABETIC ORDER 35 25 27 26 36 32 128 24 48 28 N N 3 N o o o o o o 1 1 34 N 8960+N 6400+N 6915 6656+N 9216 8192 -32768 6144 12288 7168 257 8704+N 1536 6 o o o o 141 54 55 58 38 69 14 3 40 41 42 65 43 44 45 16 6 o o o 1 2 2 2 2 2 1 1 1 1 2 6 9 4 17 3 4 5 4 6 2 4 4 1 2 1 2 1 1 12 13 19 20 29 21 30 15 22 -29434 13824 14080 14848 9729 17666 3586 770 10242 10498 10753 16641 11009 11265 11522 4102 2308 4355 1028 1286 3074 3332 4868 5121 7426 5377 7682 3841 5633 DRAW CHARACTERS c, .•. text DRAW-LINES x, y, .•• drawing DRAW-REL ARC dx, dy, angle drawing DRAW-REL-LINES dx, dy, drawing END DEFINE CHARACTER text END-FILLED-FIGURE filled figures END LIST control END-PICTURE control ERASE CLIPPING REGION area FLUSH BUFFER control INITIALIZE mask control LOAD CHARACTER CELL c, w, dO, .•• d15 text NEW PICTURE control NOP-control PRINT_SCREEN x, y, w, h, hx, hy area REQUEST CELL STANDARD reports REQUEST-CURRENT POSITION reports REQUEST-STATUS reports SET ALPHABET a text SET~REA CELL SIZE w, h attributes SET-AREA-TEXTURE a, c attributes SET AREA TEXTURE SIZE w, h attributes SET-CELL-DISPLAY-SIZE w, h text SET-CELL-EXPLICIT MOVEMENT dx, dy text SET-CELL-MOVEMENT-MODE flag text SET-CELL-OBLIQUE angle text SET-CELL-RENDITION flags text SET-CELL-ROTATION angle text SET-CELL-UNIT SIZE w, h text SET-COLOR MAP-ENTRY m, color, r, g, b, mono " SET-GIDIS-OUTPUT SPACE x, y, w, h transform SET-LINE TEXTURE-length, pattern, size attributes SET-OUTPUT CLIPPING REGION x, y, w, h transform SET-OUTPUT-CURSOR a~ c, w, h, ox, oy control SET-OUTPUT-IDS w, h transform SET-OUTPUT-VIEWPORT x, y, w, h transform SET-PIXEL SIZE w, h, ox, oy attributes SET-PLANE-MASK mask attributes SET=POSITION x, y drawing SET PRIMARY COLOR color attributes SET-REL POSITION dx, dy drawing SET-SECONDARY COLOR color attributes SET-WRITING MODE mode attributes = A-4 REPORT TAGS A•4 REPORT TAGS ----------------------------------------------------------------Opcode Report Tag Length Opcode Word 1 4 5 2 1 4 258 1025 1284 Arguments CURRENT POSITION REPORT x, Y STATUS REPORT code CELL STANDARD REPORT uw, uh, dw, dh A-5 Function report tags report tags report tags APPENDIX B DEC MULTINATIONAL CHARACTER SET B-1 DEC MULTINATIONAL CHARACTER SET DEC Multinational Character Set (CO and GL Codes) o COLUM" BITS 118 1 o 117 o o 4 :3 5 o o o o 0 o 0 1 0 NUL i 0 0 ~ o 0 3 a 4 a 1 0 1 1 0 STX 0 EOT a o 1 6 o 1 7 o 1 ~ 0 J 3 ,XOFFI 4 DC4 1 5 5 5 ENC 1 6 6 ACK 0 A a 2 B 102 66 42 R 22 62 50 32 122 82 52 43 35 23 3 63 51 33 C 103 67 43 I ~ 4 :~ 0 1: 42 34 " 23 DC3,19 i 13 NAK ! I 24 20 14 4 5 1 101 "5 . 41 24 25 21 15 SYN I 26 22 ETB 27 23 % 48 34 45 37 25 5 6 66 54 1 I 55 17 47 39 27 CAN 30 24 18 ( 50 40 28 8 EM 31 25 19 ) 51 4I 29 9 SUB 32 26 1A "* & 46 38 65 53 35 I, F 105 69 45 106 70 P 80 50 ! 112 70 I 121 I 161 141 97 61 81 51 I 113 , 71 b 142 98 62 S 123 83 53 C 143 99 63 163 115 1 73 T 1~; d ~~ I 164 64 , 145 101 65 1.1" 117 54 44 E ~ 160 lW P 61 49 31 41 33 21 22 18 12 100 @ 64 40 11 DC2 W 30 17 IXONI 0 32 20 21 DC1 2 2 ETX 1 ~ SP 10 SOH! 1 20 ! OLE I 16 2 2 o o o ROW o 7 6 125 85 55 U 126 86 V e 146 102 f , r 162 I 114 72 i 116 74 I 165 75 166 II 118 __~________-+______~6~+-____-+_'~6-+______+-2~6-+______+-~~4-_____'4-~~~~____~~~=-~__.__~_6~6~____~r-~76~ 7 8 1 0 1 0 BEL 1 0 7 7 BS 10 8 8 9 I 0 0 I HT 11 9 9 10 I 0 1 0 IF 12 10 " 13 11 12 I 0 1 I 1 0 VT 1 FF 0 II 33 ESC I '1 I I 8 27 18 10 34 'C2 FS + 0 107 71 47 W 127 87 57 9 147 103 67 W 167 119 77 H 1 10 72 48 X 130 88 58 h 150 104 68 )( 170 120 78 71 57 39 1 111 73 49 Y 131 89 59 i 151 105 69 y 52 42 2A 72 58 3A J 172 j 53 73 59 38 173 1C • 44 2C _ ~~ 13 I 1 0 I CR i:; OS ~~ 14 1 1 0 SO 16 ,'4 I E RS 36 30 IE 15 I 37 70 ~ 38 43 28 54 28 67 ; < =: K )4 60 3C "2 4A 5A 152 106 6A 1 13 133 153 )4 75 48 132 Z 90 [ 91 58 ,,4 l 76 4C ~~ M ';~ 76 62 3E N 116 78 4E 77 63 0 117 79 k 107 68 134 \ ] I J 92 5C 154 1 108 6C "I';; m :~~ 136 94 5E n 156 110 6E 171 121 )9 122 7A { I 123 78 1)4 I 124 7e } I 175 ~__~________-+______~_D--+_____-+__'~04-____-+~2~D4-____~__3:~D~____~__4_0~____~__5_D~____~__6~D~____~!__'~;~~ I I 1 1 US 1 56 ~ > 2E 37 31 I 1F 57 47 2F ';' 3F A 4F'- 1'37 95 5F 1 0 .... II 176 126 ,7E 157 I 177 6F 7F 1"1 DEL I '21 CODES J r--- CO CODES--"'-.1-I - - - - - - - - - ( A S C IGLI GRAPHICS)-----------ll 1_ KEY CHAR'>'CTER Q EJJsc 33 :7 OCTAL OECIMAL 18 HE x 8-2 DEC MULTINATIONAL CHARACTER SET DEC MultJnaliOnal Character Set (C1 and GR Codes) 8 10 9 , 1 0 0 I I no DCS 144 90 i 129 81 PU1 221 145 91 ! ~~~ PU2 222 146 92 STS 223 147 93 I 201 82 i 203 i 131 I INO I 0 0 83 204 1.32 84 0 0 ~ I 161 ¢ 242 162 A2 £ 224 205 SSA 206 134 86 SPA ESA 207 135 87 EPA 225 149 95 Al 243 163 A3 0 + 2 3 244 164 A4 CCH 148 94 MW NEL I 133 85 I 241 i -r. 226 150 96 216 142 8E PM SS3 217 143 8F APC f- 0 - e 253 171 A8 » 234 156 9C 254 172 AC 1/4 2]5 157 90 255 173 AD 1/2 ~36 158 9E 256 174 AE 237 159 9F 257 175 AF i. 273 187 BB •E• 274 lB8 BC I 275 189 BD , , I 276 190 BE II 277 191 8F •I• I 312 202 CA 313 203 CB , U A U 314 204 CC •• ]15 205 CD •• Y U 316 206 CE 317 207 CF 218 332 1 DA 1 333 [219 08 ! ]34 I 220 DC [335 221 DO 336 222 1, DE .n E~ I 342 12~~ I 343 -, n 0 , I 230 331 217 D9 II 225 345 229 E5 ~ E 1 a 330 216 08 272 186 8A I 341 325 213 D5 310 200 C8 U 1 360 :40 0 E 311 201 C9 EO 344 228 E4 270 184 88 ", i a <r , c6 :)5 340 224 1 00 327 215 07 . 233 SS2 324 212 D4 CE ! 213 OSC II C7 E " BITS 1 , 0 307 199 271 185 89 "8 227 E3 C; , COlu\'" 1 a 267 183 87 8A 215 141 8D 0 - 247 167 A7 Q RI 304 196 C4 211 03 ae 252 170 AA ST •A• 0 326 214 06 232 154 9A 140 8C 264 180 84 , 323 A •• 0 VTS 1212 138 i 214 A a 306 198 C6 1 PLU - I 322 210 D2 , Ie 251 169 A9 « 179 83 303 195 C3 ! 263 , a 266 182 86 © PLO 1'39 CSI 1,55 98 i 88 0 1 . 321 209 01 ~ 231 153 99 II 302 194 C2 II N 246 166 A6 HTJ i 137 89 A 1 Cl - 301 I '93 a 305 197 C5 250 168 A8 ! 211 262 178 82 , , , 320 208 DO A :ri 88 A ]00 192 CO 265 181 85 230 152 98 210 , 261 177 81 15 , .-4 ,.] J.l § 1 '36 1 0 A , c , 0 260 176 80 I , 245 165 AS . 227 151 97 HTS 1 1 0 24C 160 AO 1 , 14 13 12 , 1 1 0 200 128 80 11 337 223 DF 346 i E6 ! 347 , ~ I 231 I E7 350 232 E8 1 351 233 E9 i ]52 ' 234 EA I . 353 00 e , I 1 I 00 I 0 0 I i EC ]55 2], ED J 0 0 0 0 0 1 1 0 0 1 0 2 i 243 0 0 1 I 3 244 364 F4 0 I 0 0 4 . 1 I 245 I F5 I 365 0 I S 366 246 F6 0 I , 0 a I 1 I 7 370 248 F8 1 0 0 0 8 371 249 F9 I 0 0 1 9 1 a I a 10 1 0 , I 11 I I c; 0 12 375 253 FD I 1 0 1 13 376 254 FE 1 1 1 0 14 1 1 1 1 15 ! ]6' i 241 I F1 I 362 ! 242 I F2 ; 363 i F3 1 367 247 q (,1 , u , ! 372 1 250 FA 1 373 251 F8 " J u I 00 U 00 Y EE ~ 1 377 255 0, GR CODES 1 - - - - - - ( D E C SUPPLEMENTAL GRAPHICS)--------i C1 CODES--'+-' 8-3 5 374 II 252 oc 356 238 357 239 EF ROW a 00 oe U ~ 0 j 00 i ]54 i 236 , Ii I A 235 EB " ., : i 6 DEC Special Graphics Set Mapped Into GL "' ~ --:---T--r---'- I ""1-"-- t' ~,I:~ c.. '. , '."'. I · '. I ' _-t------..--fL-, l. ,_~ I~"_~,~_.--+------~ _~. o 1 2 ! 3 ! 4 5 .! 6 I---ROW+-B4_ 882-..+-8' 3 o 0 0,0 NUL·, 0 o 20 OLE 0 I I >0 I SP 6 i 32 1 0 I i " 00 ~----<~_ _ _--If--_ _~';~f--_ _-r--'_O-+-____iI--2_0+ _,--nt3~ " I 4' i 6' 1 0 0 SOH 0' 17~, 33 DC1 xo,," I ~ ~--If-------If----r---,,---jf----t---:c2'-=-~--i 2 2 0 0 , STX 0 I "I I DC2 I '8 I !2 2 2 1 2' 1 42 ,1 34 22 I :2 ---:~' i~, 49 60 , 12' '41 4I 62 , B ,50 32 , I 021 I 66 42 1-3--1f--o-o-,-,--Ir-E-T-X-~:-:~--Ir-8-f-F-~-t---::!:::-~-1r--#--+-[-:~::-~-11- -3--+-:-~.:..~-ilf--~l' ~~ . ",' 1 a I, 81 I B I :~ "1 '22 i R ! 32 j ~ ! 524-- SCA,~ 3 ,j' 97 6' , I4 2 I II S n~ I ~ 98 I '3 SCA \ 5 ' ,I 2 I .'4 62 1 SCA~ ) ':~ ,~~ I! 4 :' i~ ,i:: ~'-Ti;~t!-"-~ I:~ SCAr~ '~~ 1---+----+-E-IU-a-tI.-5o::-5-+,--~,---:::2;5--I!---+-:-'45--1 I 1<---- i05r--"T 25 i ---1i451~65 5 NAK % i :5 .,'. IE I u 4 o ' 0 Eo;I' 4 ~ I DC4 I ~~ I '4C 40 _ _ _ ' SO 65 i J' I I '20 481@i64·P',.8.0.·96·'21 C $ ';: 9 24 34 i 44 J I 65 I 37 53 25 I , ~--if------if-----~---r--~f---+--"T--r , 6 26 ! 46 . ! 66 0 1 ' 0 6 22 i 38. I 54 0 I 0 I ,--. ACt( i 6 SYN 2' I 15 j 69 I 85· ~ 6 I , 06 70 I F ' ' 26 I ,00 V j , I 0 57! : 86 64 '46 102 ~~! -;--~~-~~I-;--I '!~ t-± '[ :~~ 2 7 I . I :; I I 1----+----+---+--'o-----4l-c-A-N---+I-3-0--+---+-~ -~ri'50 8 ' BS ~ :;: ( ~~ I 8 ~ I H ) Lx ~~ I ~ i '~: 7 o 1 1 BEL 1 I; ETe I 0 0 0 ,', I 17 7 -+--H-T---II'-'9'-+--E-M-~ 1--9---+-'-0-0-' I 37 I 70! I 9 I ~h~· 1---+------+---+-!1-1.2---11-----I!-32 10 I 0 I] LF '0 1---+_ _ _ _+ __+-1 11 , SUB ,1 26.. I VT!:~ 0 :! ESC I 3 I ~1-2-+-1--'-o-o-t--F-F-t-I-;-~ ~~ ... t-' : 58 '. I " I 1 '; 3.1 I .19 ! " 2: I 36 K :I!- ! ! +_C_R_t-:~_~+_G_5_+-II--,-,~~+_-_-+_!::.::~~;~ M i 14 "'0 501,4 15 ," SI I 1 1............i1....._ _ _ _I1.-__ RS IE) I 1"5 ~~ US I 31 F '2C I 1_ IF I I[! I~ I > i 62 N: 78 ',7i ? 1 63 0 79.IBLANKII I 3F ~~ j CrlARACTEREJJSC . 33 OCTAL 27 DECIMAL 18 HE x I - 66 - 8 '6~ • I -, !"1 I I 1 ;~ 69 J L 2 !'9 ~ I " I 6A 1 68 ! oC _ 551" : '06 I i .~ ., n:~ '8 ;i : ::~! £ t 11101 :~ .~ t-----t-fr ----ht-,--; 951~---=---I ::~ ~~ 2Fl " 94 1 ' ,,6 153E7 1 1 ~:,1: .1 GL CODES r--- CO CODES~------'----(DEC SPECIAL GRAPHiCS) KEY I 58 I L T i 152 '--~sr- III I" I 67 :'~c;~ I r I: ~~ ,4~~ ~ j ~ I:;~ ~ I :~: 59 I;~ I 461 ~~ ' : : II .~ : I [i 1~~}---1-1 !~~ '4;8~ 4C I-~-------: 115 55 30 4A I 1 i 74 I Z I 3C !C ° J I < ! ;:," 0' ;~ 28' :: 1 39 .2M 3A ;;~. I~; I 42 '. 18 ~~f-----~--~'-5+--135 f-1_3+_' __0_ _' ~; IfT-r---1-7-2 -, *. I --+--F-5-+1-30-:2::-+ i C I 29 I -A-------l-==-t,2-i; I ~: I 9 ) 1"0 '4 10' 65 i 3~---r--~ 45 I ~' , & ~~ I 11 ,1 DEL Sf I ',;) 'f I '"I APPENDIX C GLOSSARY The words in this glossary are used throughout this manual. These definitions are not absolute and might differ somewhat in other contexts. Where possible, the most common computer industry usage is the basis of the definition. ALPHABET An alphabet is a collection of characters. The component characters are numbered O,l, ••. n-l, where n is the extent of the alphabet. ALPHABET ATTRIBUTE An attribute that applies supports storage width attributes. PRO/GIDIS to an entire alphabet. and height as its only alphabet ANISOTROPIC Not isotropic. In an anisotropic coordinate space, one unit the X direction is not equal to one unit in the Y direction. in AREA TEXTURE A binary pattern used to shade areas. In PRO/GIDIS this is selected from a normal character alphabet. Area texture includes size parameters (specified independently) to determine the appearance of the pattern. ASPECT RATIO The ratio of the width of an object to its height. Objects whose aspect ratio are important in graphics include video displays, rectangular extents (picture aspect ratio), and addressing spaces. C-l GLOSSARY ATTRIBUTE (output A particular property that applies to a display element primitive), such as character height, line texture, and so forth. BITMAP The rectangular array of pixels (picture elements) that is displayed on the Professional's video screen. Also known as raster or frame buffer. The Professional has a bitmap 960 pixels wide by 240 pixels high, and either one or three planes deep. CHARACTER A character is a two-dimensional pattern made up of two "colors" or pixel states. A character is an element in an alphabet and is specified by an identifying tuple (alphabet number, character number). CHARACTER CELL (See display cellar unit cell.) CLIPPING The drawing of only those parts of display inside a given extent (the clipping region). elements that lie COLOR A "real color" is a particular shade of light described in terms of its red, green, blue, and monochrome components. The color map can contain up to eight different real colors at one time. A "logical color" is a value that represents an index into the color map. PRO/GIDIS draws images by storing either the primary or secondary logical color in pixels. COLOR MAP A table with entries that contain the values of the red, green and blue intensities of a particular color. This table is used to convert logical color to real color. CURRENT POSITION The position from which lines, arcs, and drawn. C-2 characters are to be GLOSSARY CURSOR A visual representation of the current position. DISPLAY CELL In text processing, the display cell is that area of the screen that a character should take up. The character pattern itself resides within a unit celli any portion of the display cell not covered by the unit cell is treated as though the pattern is OFF for that area. If the unit cell is larger than the display cell, the unit cell is clipped at the display cell borders. DISPLAY ELEMENT A basic graphic element that can be used to construct a display image. (also known as a graphic primitive). The display elements for PRO/GIDIS are: lines, characters, filled figures, and arcs. FILLED FIGURE A GIDIS display element consisting of a polygon which with a two-color pattern. is filled GIDIS OUTPUT SPACE (GOS) An application-specified coordinate space used by all drawing and report operations in PRO/GIDIS. A location within the PRO/GIDIS output space maps to a location within the viewport on the screen. GLOBAL SYMMETRY Preservation of GIDIS Output Space relationships at the expense of Hardware Address Space relationships. For example, suppose that a ten-unit distance in GOS maps to 7.S units in HAS. With global symmetry, repeatedly moving ten GOS units results in a move of seven HAS units, then eight has units, then seven, and so forth. Local symmetry always would move seven HAS units each time. PRO/GIDIS, version 1.7, supports global symmetry for the SET_REL_POSITION, DRAW_REL_LINES, and DRAW REL ARC instructions. HARDWARE ADDRESS SPACE (HAS) A coordinate space (possibly anisotropic) used by the graphic hardware device. GIDIS hides' this space from your program, and addresses the hardware through an Imposed Device Space or GIDIS Output Space. C-3 GLOSSARY IMPOSED DEVICE SPACE (IDS) A coordinate space imposed on the hardware by your program. An Imposed Device Space requests PRO/GIDIS to simulate the requested device in terms of aspect ratio and addressing space. IDS is used only to set the viewport. All other coordinates and sizes are in GIDIS Output Space. ISOTROPIC In an isotropic coordinate space one unit in the X equal to one unit in the Y direction. direction is LINE TEXTURE A linear pattern used to help distinguish lines. Examples are solid, dashed, dotted, and so forth. PRO/GIDIS supports a two-color (binary) up to 16 units in length. LOCAL SYMMETRY Preservation of Hardware Address Space relationships at the expense of GIDIS Output Space relationships. For example, assume a ten-unit distance in GIDIS output space maps to 7.5 units in hardware coordinate space. Local symmetry always would move seven hardware units each time. With global symmetry, repeatedly moving ten GIDIS output space units results in a move of seven hardware units, then eight hardware units, then seven, and so forth. PRO/GIDIS supports local symmetry for unit cells, display cells, and cell movement (implicit and explicit). ORIGIN The origin of an address space is the point [0,0]. In PRO/GIDIS, the origin of IDS space is always the upper left corner of the screen. The origin of GIDIS output space is set by your program. The origin of a character cell (either display cell or unit cell) is the point in the cell placed over the current position. This is also the point about which the cell rotates. For P/OS, Vl.7, the character cell origin always is the upper left corner. OUTPUT SPACE (See GIDIS output space.) C-4 GLOSSARY PICTURE ASPECT RATIO The ratio of the width of a picture to the height. This is normally expressed as two small numbers, such as 4:3. The picture aspect ratio on the Professional 350 monitor is 8:5. In this context, "picture" means a rectangular extent in an address space. PIXEL (PICTURE ELEMENT) The smallest element of a display surface that can be assigned color or intensity. a PIXEL ASPECT RATIO The ratio of the width of a pixel to the height. The width is the horizontal distance between adjacent pixels and the height is the vertical distance. Pixel aspect ratio is normally expressed as two small numbers, e.g. 1:2. The pixel aspect ratio on the Professional 350 monitor is 1:2.5 or 2:5. PLANE A plane is a portion of a bitmap that contains one bit for each pixel. The Professional 350 has either one plane (without EBO) or three planes (with EBO). PRIMARY COLOR The primary color is that logical indicate the presence of an image. color generally used to color generally used to SECONDARY COLOR The secondary color is that logical indicate the absence of an image. STANDARD DISPLAY SIZE The standard display size is normally equal to the standard unit size. However, for alphabet 0, rotation 0, the standard display size is slightly smaller (horizontally) than the standard unit size. This is for increased compatibility with the VT125. STANDARD UNIT SIZE The standard unit size depends on the alphabet width and height and the rotation angle. It is the size in GIDIS Output Space coordinates of the character displayed when one bit of the character pattern maps to exactly one pixel in the bitmap. C-s GLOSSARY UNIT CELL In text processing, the unit cell is the area in which a character pattern is drawn. If the display cell is smaller that the unit cell, the unit cell is clipped at the display cell borders. If the unit cell is larger, the remainder of the display cell is treated as though the pattern is specified OFF for that area. PRO/GIDIS automatically shrinks the unit cell to the closest possible size and, if there is no size small enough, uses the smallest possible size. VIEWING TRANSFORMATION The process where user-specified coordinates space) are changed into hardware coordinates. as the "graphics pipeline". (in GIDIS output This is also known VIEWPORT The viewport is an extent within Imposed Device Space. viewing transformation maps the window to the viewport. The WINDOW The window is an extent within GIDIS Output Space. transformation maps the window to the viewport. C-6 The viewing INDEX -AAddress space in Viewing Transformation, 1-6 Alphabet and REQUEST CELL STANDARD, 10-3 creating, 1=25 definition, C-l description, 1-24 reset state, 3-5 to 3-6 user-defined, 1-24 Alphabet attribute definition, C-l Anisotropic definition, C-l Arc drawi '1~i, 6-7, 6-9 Area cell size setting, 5-12 Area operation description, 1-29 purpose, 1-5 Area texture affected by SET GIDIS OUTPUT SPACE, 4-5 affected by SET OUTPUT IDS, 4-2 definition, C-ldescription, 1-20 reset state, 3-4 to 3-5 setting, 5-10 taken from line texture, 5-10 Area texture cell size description, 1-21 Area texture size description, 1-20 setting, 5-11 Aspect ratio definition, C-l description, 1-7 Attribute definition, C-l -BBackslant see cell rendition BEGIN FILLED FIGURE aborted by-initialization, 3-3 general description, 1-13 reference description, 7-1 Bitmap and NEW PICTURE, 3-7 definitIon, C-2 description, 1-14 -CCartesian Coordinate System use of, 1-6 Cell display size affected by SET GIOIS OUTPUT SPACE, 4-6 affected by SET OUTPUT IDS, 4-3 description, 1-27 reset state, 3-4 to 3-5 Cell movement affected by SET GIOIS OUTPUT SPACE, 4-5 affected by SET OUTPUT IDS, 4-3 description, 1-27 reset state, 3-4 to 3-5 Cell oblique description, 1-27 reset state, 3-5 Cell rendition description, 1-26 reset state, 3-5 Cell rotation description, 1-26 reset state, 3-5 Cell unit size affected by SET GIOIS OUTPUT SPACE, 4-6 affected by SET OUTPUT IDS, 4-3 description, 1-27 reset state, 3-4 to 3-5 CGL relationship to PRO/GIDIS, 1-2 when to use, 1-3 Character definition, C-2 Character cell definition, C-2 Index-l INDEX Character rotation and REQUEST CELL_STANDARD, 10-3 Clipping definition, C-2 Clipping region affected by SET GIDIS OUTPUT SPACE, 4-5 affected by SET OUTPUT IDS, 4-2 and window, 1-10 description, 1-9 erasing, 9-1 in viewing transformation, 1-7 reset state, 3-4 setting, 4-6 Color attributes, 1-.14 definition, C-2 Color map and complement mode, 1-17 definition, C-2 description, 1-15 interaction with plane mask, 5-6 reset state, 3-6 setting, 5-3 values, 5-4 Complement mode description, 1-16 effect on filled figure, 1-21, 7-3 effect on line texture, 1-19 effect on lines, 6-4 effect on pixel size, 5-8 Complement negate mode description, 1-17 effect on filled figure, 7-3 effect on lines, 6-4 Control instruction purpose, 1-4 CORE Graphics Library see CGL CREATE ALPHABET in alphabet creation, 1-25 reference description, 8-2 Current pattern description, 1-15 Current position affected by SET GIDIS OUTPUT SPACE, 4-5 affected by SET OUTPUT IDS, 4-2 after DRAW ARC,-6-8 - Current position (Cont.) definition, C-2 description, 1-12 reporting, 1-30, 10-1 reset state, 3-4 setting, 6-1 to 6-2 Cursor affected by SET GIDIS OUTPUT SPACE, 4-5 affected by SET OUTPUT IDS, 4-2 definition, C-2purpose of, 1-12 reset state, 3-4, 3-6 selecting built-in, 3-9 setting, 3-8 Curve attribute description, 1-18 -D- DEC Multinational Character Set as alphabet 0, 1-24 Display cell definition, C-3 reporting, 10-3 Display element definition, C-3 DRAW ARC and REQUEST CURRENT POSITION, 10-2 general description, 1-13 reference description, 6-7 DRAW CHARACTERS and END LIST, 3-11 and REQUEST CURRENT POSITION, 10-2 general description, 1-14 invalid in filled figure, 7-2 parameter block, 2-7 reference description, 8-11 DRAW LINES and END LIST, 3-11 general-description, 1-13 parameter block, 2-7 reference description, 6-3 DRAW REL ARC general description, 1-13 reference description, 6-9 DRAW REL LINES and END LIST, 3-11 general-description, 1-13 Index-2 INDEX DRAW REI. LINES (Cont.) pa~ame r block, 2-7 reference description, 6-5 Drawing instruction general description, 1-12 purpose, 1-4 $DSW vari values of, 2-4 to 2-5 -EEBO description, 1-15 END FILLED FIGURE gineral ~escription, 1-13 reference description, 7-2 END LIST and DRAW LINES, 6-3 function-of, 2-7 general description, 1-6 reference description, 3-11 END PICTURE gineral description, 1-5 reference deseri ion, 3-7 use of, 3-6 Erase mode description, 1-18 Erase negate mode description, 1-18 ERASE CLIPPING REGION geniral desc~i ion. 1-29 reference description, 9-1 Error in instruction stream, 2-7 Explicit movement description, 1-29 Extended Bitmap Option see EBO Extent and picture aspect ratio, 1-8 descri ion, 1-7 Filled figure (Cont.) instructions 1-13 purpose, 1-5 shading to line or point, 1-21 Filled figure attri te description, 1-19 FLUSH BUFFERS and-END PICTURE, 3-7 general-description, 1-5 reference description, 3-8 FORTRAN-77 PRO/GIDIS instruction names in, 2-6 sample program, 2-9 symbol name restrictions, 2-3 use of with PRO/GIDIS, 2-1 -GGIDIS Output Space see GOS GIG! and ReGIS, 1-2 Global attribute affected SET GIOIS OUTPUT SPACE, 4-5 and SET""-OUTPUT IDS, 4-1 purpose ~ 1-4 -Global symmet.ry and SET REL POSITION, 6-2 definitTon,-C-3 GOS affected by SET OUTPUT IDS, 4-2 bounds of, 1-8 definition, C-3 description, 1-8 in viewing transformation, 1-6 reset state, 3-4 setting, 4--4 unit aspect ratio, 1-7 to 1-8 -H- -F- Fil f re and DRAW LINES, 6-3 defining~ 7-1 definition, C-3 effect on DRAW ARC, 6-8 ending, 7-2 in complement mode, 1-17 Hardware Address Space see HAS HAS definition, C-3 general description, 1-10 in viewing transformation, 1-6 unit aspect ratio, 1-7 Index-3 INDEX -1- I/O Status Block values of, 2-4, 2-6 IDS definition, C-3 description, 1-9 in viewing transformation, 1-6 reset state, 3-3 setting, 4-1 unit aspect ratio, 1-7, 1-9 Implied movement description, 1-27 Imposed Device Space see IDS INITIALIZE and RIS, 2-3 effect on filled figure, 7-2 general description, 1-5 reference description, 3-1 Instruction syntax description, 2-6, 2-8 IO.RSD function code format, 2-5 in QIO, 2-1 use of, 1-29, 2-4, 2-6 IO.WLB function code and VTl02 Emulator, 2-1 IO.WSD function code format, 2-4 in QIO, 2-1 use of, 2-3 to 2-4 IO.WVB function code and VTI02 Emulator, 2-1 Isotropic definition, C-4 Isotropic mapping description, 1-8 IDS to HAS, 1-9 window to viewport, 1-8 Italic see cell rendition -LLine drawing, 6-3, 6-5 Line attribute description, 1-18 Line texture affected by SET GIDIS OUTPUT SPACE, 4-5 affected by SET OUTPUT IDS, 4-2 definition, C-4description, 1-18 to 1-19 reset state, 3-4 to 3-5 setting, 5-9 LOAD CHARACTER CELL and END LIST~ 3-11 in alphabet creation, 1-25 parameter block, 2-7 reference description, 8-3 Local symmetry definition, C-4 in character cell movement, 1-29 -M- MACRO-II PRO/GIDIS instruction names in, 2-6 sample program, 2-8 use of with PRO/GIDIS, 2-1 -NNEW PICTURE general description, 1-5 reference description, 3-6 NOP general description, 1-6 reference description, 3-10 -0- Opcode function of, 2-6 Opcode word format, 2-6 Origin definition, C-4 Output space definition, C-4 Overflow avoiding, 1-8 Overlay mode description, 1-17 Overlay negate mode description, 1-17 Index-4 INOEX -PParameter block fixed length, 2-7 format, 2-7 variable length, 2-7 PASCAL PRO/GIOIS instruction names in, 2-6 Picture aspect ratio definition, C-4 description, 1-8 Pixel addressing individual, 1-12 definition, C-4 Pixel aspect ratio definition, C-5 Pixel size description, 1-19 setting, 5-7 Plane definition, C-5 description, 1-14 Plane mask reset state, 3-5 setting, 5-4 Primary color definition, C-5 description, 1-15 reset state, 3-5 setting, 5-1 PRINT SCREEN general description, 1-29 reference description, 9-2 ReGIS relationship to PRO/GIOIS, 1-2 when to use, 1-4 Remote Graphics Instruction Set see ReGIS Replace mode description, 1-17 effect on line texture, 1-19 effect on pixel size, 5-8 Replace negate mode description, 1-17 Report format, 1-30 Report handling description, 1-29 Report instruction purpose, 1-5 REQUEST CELL STANDARD and IO.RSO-; 2-4 general description, 1-30 reference description, 10-3 REQUEST CURRENT POSITION and 15. RSO, i=4 general description, 1-30 reference description, 10-1 REQUEST STATUS and IO.RSO, 2-4 general description, 1-30 reference description, 10-2 Reset to Initial State (RIS) use of, 2-3 RIS (Reset) escape sequence use of, 2-3 -S-Q- QIO access to PRO/GIOIS, 2-1, 2-9 expansion forms, 2-3 FORTRAN-77 routine, 2-1 QIOW see QIO Queue I/O Request see QIO -RRead Special Data see IO.RSO Screen printing, 9-2 Scrolling by VTI02 Emulator, 2-3 SD.GDS parameter use of, 2-4 to 2-5 Secondary color definition, C-5 description, 1-15 reset state, 3-5 setting, 5-2 Secondary color and NEW PICTURE, 3-6 SET ALPHABET general description, 1-24 Index-5 INDEX SET ALPHABET (Cont.) in alphabet creation, 1-25 reference description, 8-2 SET AREA CELL SIZE general description, 1-21 reference description, 5-12 SET AREA TEXTURE effect-on area cell size, 5-12 general description, 1-20 reference description, 5-10 SET AREA TEXTURE SIZE general description, 1-20 reference description, 5-11 SET CELL DISPLAY SIZE general description, 1-27 reference description, 8-8 SET CELL EXPLICIT MOVEMENT general description, 1-27 reference description, 8-10 SET CELL MOVEMENT MODE general description, 1-27 reference description, 8-9 SET CELL OBLIQUE general description, 1-27 reference description, 8-6 SET CELL RENDITION general description, 1-26 reference description, 8-4 SET CELL ROTATION general description, 1-26 reference description, 8-6 SET CELL UNIT SIZE general description, 1-27 reference description, 8-7 SET COLOR MAP ENTRY general-description, 1-15 reference description, 5-3 SET GIDIS OUTPUT SPACE effect on clipping region, 1-9 invalid in filled figure, 7-2 purpose, 1-8 reference description, 4-4 SET LINE TEXTURE qeneral description, 1-18 reference description, 5-9 SET OUTPUT CLIPPING REGION general description, 1-9 reference description, 4-6 SET OUTPUT CURSOR general description, 1-5 reference description, 3-8 SET OUTPUT IDS general description, 1-9 invalid in filled figure, 7-2 reference description, 4-1 SET OUTPUT VIEWPORT general description, 1-10 invalid in filled figure, 7-2 reference description, 4-3 SET PIXEL SIZE effect on line texture, 1-19 general description, 1-19 reference description, 5-7 SET PLANE MASK and VTI02 Emulator, 2-3 general description, 1-15 reference description, 5-4 SET POSITION general description, 1-13 invalid in filled figure, 7-2 reference description, 6-1 SET PRIMARY COLOR general description, 1-15 reference description, 5-1 SET REL POSITION general description, 1-13 invalid in filled figure, 7-2 reference description, 6-2 SET SECONDARY COLOR general description, 1-15 reference description, 5-2 SET WRITING MODE reference-description, 5-7 Standard display size definition, C-5 reporting, 1-30 Standard unit size definition, C-5 reporting, 1-30 Status in error condition, 2-7 reporting, 1-30, 10-2 SYSLIB as source of QIO routine, 2-1 module QIOSYM, 2-3 -TTerminal emulator see VTI02 Emulator see VT125 Emulator Index-6 INDEX Text instruction, 1-14 Text attribute description, 1-24 Text instruction purpose, 1-5 Transparent mode description, 1-16 Transparent negate mode description, 1-16 -UUnit aspect ratio description, 1-7 of GOS, 1-7 to 1-8 of HAS, 1-7 of IDS, 1-7 Unit cell definition, C-5 reporting, 10-3 -VVideo monitor color, 1-11 monochrome, 1-10 Viewing transformation definition, C-6 description, 1-6, 1-12 process, 1-11 purpose, 1-4 Viewport affected by SET OUTPUT IDS, 4-2 definition, C-6 description, 1-10 in viewing transformation, 1-7 reset state, 3-4 setting, 4-3 VTI02 Emulator interaction with PRO/GIOIS, 2-2 to 2-3 use of planes, 5-5 use of with PRO/GIDIS, 2-1 VT125 Emulator use of, 1-4 VT125 terminal and ReGIS, 1-2 -WWindow and clipping region, 1-10 definition, C-6 descrjption, 1-8 in Viewing Transformation, 1-7 Write Special Data see IO.WSD Writing mode see also individual modes description, 1-15, 1-18 interaction with plane mask, 5-5 reset state, 3-5 setting, 5-7 Index-7 PRO/GIDIS Manual AA-Y660A-TK READER'S COMMENTS NOTE This form IS for document comments only. DIGITAL will use comments submitted on this form at the company's discretion. If you reqUire a written reply and are eligible to receive one under Software Performance Report (SPR) serVice, submit your comments on an SPR form. Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement. OJ C £'" 0\ C Did you find errors In thiS manual? If so, specify the error and the page number. o tii S u OJ <J) <U OJ a: Please Indicate the type of reader that you most nearly represent. Assembly language programmer Higher-level language programmer Occasional programmer (experienced) User with little programming experience Student programmer Other (please specify) - - - - - - - - - - - - - - - - - - - - - - - - - o o o o o o Name _________________________ Date _______________ Organization ______________________________________ Street _________________________________________ City _________________ State ___________ lip Code - - - - - - - - or Country . - - - Do Not Tear - Fold Here and Tape - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - III ~amaDmD No Postage Necessary If Mailed in the Unlte"d States BUSINESS REPLY MAIL FIRST CLASS PERMIT NO. 33 MAYNARD MASS. POSTAGE WILL BE PAID BY ADDRESSEE Professional 300 Series Publications DIGITAL EQUIPMENT CORPORATION 146 MAIN STREET MAYNARD, MASSACHUSETTS 01754 I I - - - - Do Not Tear - Fold H e r c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I I I I I I I I I I I I I I I I ::l U
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies