home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.update.uu.se
/
ftp.update.uu.se.2014.03.zip
/
ftp.update.uu.se
/
pub
/
rainbow
/
msdos
/
decus
/
RB140
/
grlibfor.arj
/
GRAPHICS.DOC
< prev
next >
Wrap
Text File
|
1988-12-11
|
53KB
|
1,353 lines
Scribblers Notes for Graphics Toolkit
=====================================
Copyright (c)
1984 Digital Equipment Co. ALL RIGHTS RESERVED.
Introduction
------------
o These libraries are in the process of development and no respo
nsibility can
be taken for results.
o In lieu of proper doc
umentation, use RAINBOW GRAPHICS OPTION, PROGRAMMER'S
REFERENCE GU
IDE o/n AA-AE36A-TV as a reference. The Library is based on the
sou
rce examples shewn in this manual.
o The libraries were developed
on Rainbow 100B's and although support
has been put in for 100a's
there is a differences in that the number
of colours and monocrome
intensities that can be simultaneously
displayed and the number th
at are available to be displayed.
Any feedback is welcome. Help
always is.
Usage
-----
o COORDINATES:
The c
oordinate system is based from the bottem left corner (0,0).
Th
e X-axis is measured in pixels (0- 383 medium resolution)
(0- 799
high resolution)
The Y-axis is measured in pixels (0-239)
Be aware, though, that the both Line & Graphic text writing is done by a
'cell' concept.
A Graphic Text cell is 10 x 8 pixels
oriented to the bottom LH corner.
A basic Text cell is 7 x 8 pixels
oriented to the upper right quadrant
therefore descenders (e.g the
hook of the letter y) will appear below the
general base line of
the text string.
To convert from NDC coordinates as used by GSX
, use the following
factors:-
X coordinate (high resolution)
= X divided by 41
X coordinate (medium resolution) = X divided by
86
Y coordinate = Y divided by 137
o CHARACTER SCALING:
Text writes can be scaled. The minimum dimension of a character
is 7 x 8
pixels. The scale factor is temporary and will be refined
later.
The width is calculated to match the height and so avoid t
he long spindly
characters one sees with GSX.
Odd number
scale values give a multiple of 7 scan lines, even values are 3
sc
an lines higher than the nearest lower odd value.
e.g. scale
value height width
t_sca_ (scan lines) (pixels)
-----------
----------- --------
1 7 8
2 10
3 14
4 17
5 21
6 24
7 28
8 31
9 35
o C
OLOUR SCALING:
The colour mixer (hue) scale for RGB intensities
is measured in (0-15)
To convert from NDC colour scale values
as used by GSX, use the following
factor:-
colour_scale = N
DC_colour_scale divided by 63
o MARKER TYPES:
Polymarker
s are vector drawn shapes and the default size is that of a graphic
character cell.
<m_col_> colour number of Marker colour
<m_type_> marker type, see table below.
<m_sca_> Marker scale,
see graphic text characters.
<m_tab_> table of Marker shapes (stro
ked characters)
Polymarker types are predefined in <m_tab_> as
:-
Number shape Description
\|/
0 -
*- Star shape
/|\
|
1 -+- Crosshair
|
\ /
2 X Tracking Cross
/ \
3 up chevron (point on centre line)
/\
\/
4 down chevron (point on centre line)
\
5
> right chevron (point on centre line)
/
/
6 < left chevron (point on centre line)
\
7 [] open box (1 cell size)
/\
8 \/
slanted open box
9 indescribable (place with LA
50 graphics)
10 indescribable (place with LA50 grap
hics)
/\
11 /||\ up arrow
||
||
12 \||/ down arrow
\/
13 <=
= left arrow
14 ==> right arrow
;ASSER
T.ASM
;********************************************************************
;* *
;* f u n c t i o n gdc_nb() *
;* *
;* gdc_not_busy will put a harmless command into the GDC and *
;* wait for the command to be read out of the command FIFO. *
;
* This means that the GDC is not busy doing a write or read *
;*
operation. *
;* *
;* entry: none *
;* exit: ax =
0 if more than approx 74ms elapsed *
;* without "gdc not busy"
*
;********************************************************************
;********************************************************************
;* *
;* f u n c t i o n g_off_() *
;* *
;* purpose: disable graphics output *
;* *
;********************************************************************
;********************************************************************
;* *
;* f u n c t i o n g_on_() *
;*
*
;* purpose: enable graphics output *
;* *
;********************************************************************
;********************************************************************
;* *
;* f u n c t i o n s a_mode_() *
;* *
;* purpose: set mode register to the value held in *
;* gbm
od *
;* *
;********************************************************************
;*****************************************************************************
;* *
;* f u n c t i o
n a_fgbg_() *
;* *
;* purpose: Load the Foreground;Back
ground Register *
;* *
;*****************************************************************************
;*****************************************************************************
;* *
;* F U
N C T I O N a_alups_() *
;* *
;* purpose: Set the ALU ;
Plane Select Register *
;* *
;*****************************************************************************
;*****************************************************************************
;* *
;*
F U N C T I O N a_gbmsk_() *
;* *
;* purpose: Set the gr
aphics board mask to values held *
;* in gbmskl_ and gbmskh_ *
;* *
;*****************************************************************************
;*****************************************************************************
;* *
;* F U N C T I O N a_wmode
_() *
;* *
;* purpose: Juggle fgbg reg. & alups reg. t
o make GDC *
;* write the correct colours in the correct *
;
* manner to the bit map. *
;* *
;*****************************************************************************
;CIRCLE.ASM
;
************************************************************************
;* *
;* F U N C T I O N circle_(centre_x, centre_y, radi
us) *
;* *
;* purpose: draw a circle in either high or med
ium res *
;* by computing 'xy' points and then use *
;* po
lyfill[] to join them all up. *
;* *
;* entry: 8[bp] 'x' c
entre co-ordinate. *
;* 10[bp] 'y' centre co-ordinate. *
;*
12[bp] radius of circle on the 'y' axis. *
;* *
;************************************************************************
;************************************************************************
;* *
;* F U N C T I O N arc_(x, y, radius, start_deg, end_d
eg) *
;* *
;* purpose: draw the ARC specified. Start & end
degrees *
;* are specified as integers in the range: *
;*
0 to 359 *
;* *
;* entry: 8[bp] centre 'x' *
;* 10
[bp] centre 'y' *
;* 12[bp] radius *
;* 14[bp] arc star
ting vector *
;* 16[bp] arc ending vector *
;* *
;************************************************************************
;************************************************************************
;* *
;* F U N C T I O N segment_(x, y, radius, st
art_deg, end_deg) *
;* *
;* purpose: draw the SEGMENT as i
n arc() above but join *
;* the ends of the arc to the centre poi
nt. *
;* *
;************************************************************************
;COLOR.ASM
;************************************************************************
;* *
;*
f u n c t i o n color_(index, red, green, blue) *
;* *
;* p
urpose: change a color in the colormap. *
;* entry: 8[bp] colour
index -- 0 to 15 *
;* 10[bp] red value 0 to 15 *
;* 12[
bp] green value 0 to 15 *
;* 14[bp] blue value 0 to 15 *
;* *
;* exit: none *
;* *
;************************************************************************
;************************************************************************
;* *
;* f u n c t i o n grey_(index, value) *
;* *
;* purpos
e: Change the colour maps grey scale. This is provided for *
;* d
ual monitor systems which need to vary the grey scale *
;* indepe
ndently from the colour scales. *
;* Also used to set grey levels
on monochrome only systems. *
;* *
;* entry: 08[bp] colour
index....0 to 15 *
;* 10[bp] grey value......0 to 15 *
;* *
;************************************************************************
;********************************************************************
; *
; s u b r o u t i n e a s s e r t _ c o l
o r m a p *
; *
; colormap is located at clmpda which is de
fined in *
; openws() *
; *
; entry: clmpda holds n
ew colour data to be loaded *
; exit: none *
; *
;********************************************************************
PROCDEF a_cmap_
;************************************************************************
;* *
;* s u b r o u t i
n e chk_col_ *
;* *
;* purpose: check and set line, tex
t, fill or marker *
;* colours. *
;* *
;* entry: al
contains colour to be set to. *
;* *
;************************************************************************
/************************************************************************/
/*
*/
/* F U N C T I O N ld_font_(font_fn, font_number) */
/*
char *font_fn; */
/* int font_number; */
/* */
/* pu
rpose: load data in a file into one of the graphics */
/* font
arrays. */
/* */
/* entry: font_fn is the name of the file
. */
/* font_number number to be loaded. [0 to 3] */
/* */
/* exit: NULL if font loaded OK. */
/* EOF if font data f
ile could not be found. */
/* */
/************************************************************************/
/************************************************************************/
/* */
/* F U N C T I O N ld_wsdets_() */
/* */
/* purpose: l
oad workstation data from file */
/* */
/* entry: <ws_numb
er_> number to be loaded. [1 to 6] */
/* */
/* exit: NULL
workstation loaded OK. */
/* EOF if workstation file could not be
found. */
/* */
/************************************************************************/
/************************************************************************/
/* */
/* F U N C
T I O N malloc_(bytes) */
/* int bytes; */
/* */
/*
purpose: allocate temp memory in stack space */
/* */
/* e
ntry: bytes #bytes to alloc */
/* */
/* exit: NULL no
core. */
/* offset (in DS) of allocated memory. */
/* */
/************************************************************************/
/************************************************************************/
/* */
/* F U N C T I O N free_(
area) */
/* */
/* purpose: release stack space memory afte
r malloc_ call */
/* */
/* entry: area mem pointer of are
a given by malloc_ */
/* */
/* exit: none. */
/* */
/************************************************************************/
/************************************************************************/
/* */
/* F U N C T I O N cono
ut_(char) */
/* */
/* purpose: output character to console
*/
/* */
/* entry: char to be output */
/* */
/
* exit: none. */
/* */
/************************************************************************/
;CXY2CP.ASM
;UPDATE
HISTORY
;********************************************************************
;* *
;* f u n c t i o n s cxy2cp_() a_cur_
() *
;* *
;* CXY2CP takes the x_start and y_start values and
converts *
;* them to a GDC cursor position and sends it to the
GDC. *
;* The computed values are stored at curl0 to curl2. *
;* *
;* A_CUR takes the values at curl0 to curl2 and sends them
*
;* to the GDC. *
;* *
;* entry: x_start = x pixe
l location *
;* y_start = y pixel location *
;* exit: cu
rl0 to curl2 set to GDC cursor values *
;* *
;********************************************************************
;FILL
.ASM
;************************************************************************
;* *
;* F U N C T I O N polyfill_(count, ar
ray) *
;* int count, *array; *
;* *
;* purpose: Fil
l an area with a pattern specified by *
;* f_type and f_style whi
ch is defined as a *
;* series of 'xy' points [array] whose lengt
h *
;* is 'count' 'xy' pairs. *
;* *
;* entry: 8[bp
] number of 'xy' pairs in 'array'. *
;* 10[bp] pointer to the 'xy
' pairs. *
;* *
;************************************************************************
;************************************************************************
;* *
;* F U N C
T I O N bar_(array) int *array; *
;* *
;* purpose: set
a user defined screen rectangle to a user *
;* defined color. *
;* entry: 6[bp] has the pointer to the 'xy' array *
;* *
;* 0[array] has the start x in pixels *
;* 6[array] has the s
tart y in scan lines *
;* 4[array] has the stop x in pixels *
;* 2[array] has the stop y in scan lines *
;* f_col is the co
lor to fill the bar with. *
;* *
;* NOTE: both 'y' values
are relative to a bottom left origin *
;* *
;************************************************************************
+ARCHI
VE+ getkey.c 703 11/16/1984 13:07:26
;GOPT.ASM
;********************************************************************
; *
; p r o c e d u r e gropt_() *
; *
; purpose: test if
Graphics Option is present. *
; entry: none. *
; exit:
ax = 0 option present. *
; dax = -1 option not present. *
; register usage: ax *
; the following globals are set:- *
; swisg_ 1 = graphics option present *
; 0 = no *
;
sw100a_ 1 = this is Rainbow model 100a *
; 0 = no, 100b *
; gintvect_ = appropriate hardware interrupt vector *
;********************************************************************
;
GTEXT.ASM
;************************************************************************
;* *
;* F U N C T I O N gtext_(x, y, s
tring) *
;* int x, y; *
;* char *string; *
;* *
;* purpose: print a string of text at a specific 'xy' *
;* po
sition. X & Y are defined as pixel locations *
;* at the bottom le
ft of the character cell. *
;* *
;* entry: 6[bp] 'x' posit
ion *
;* 8[bp] 'y' position *
;* 10[bp] pointer to NULL te
rminated string *
;* *
;************************************************************************
;************************************************************************
;* *
;*
f u n c t i o n gchar_(char) *
;* *
;* purpose: write gra
phics text *
;* entry: 6[bp] character to be written *
;*
*
;* conditions: 1) text cursor is correctly placed *
;* 2) f
gbg and alups already defined *
;* 3) text font has been selected
*
;************************************************************************
;******************************************************************
;* *
;* stroke font character set *
;* *
;******************************************************************
;
;the following tables are vertice information
for a stroked character
;set the x,y coordinate information is repre
sented by 4 bit 2's
;complement numbers in the range of +-7 x, +-7 y
. end of character
;is represented by -8 x, -8 y and dark vector is r
epresented by -8 x,
; 0 y.
;
; bit 7 6 5 4 3 2 1 0
; |
| | |
; \ ; \ ;
; x y
;
;characters are cur
rently mapped into the positive quadrant,
;with the origin at the low
er left corner of an upper case character,
;therfore, lowercase chara
cters will descend below the line specified
;for the character.
;************************************************************************
;* *
;* F U N C T I O N ltext_(x, y, string) *
;
* int x, y; char *string; *
;* *
;* entry: 8[bp] 'x' co
-ordinate *
;* 10[bp] 'y' co-ordinate *
;* 12[bp] pointer
to string array. *
;* *
;************************************************************************
;MARKER.ASM
SEGDEF D
ATA
;The x,y coordinate information is represented by 3 bit 2's
;
complement numbers in the range of +-3 x, +-3 y. end of character
;is
represented by bit 8 being set on the last vector byte.
;
; bit
7 6 5 4 3 2 1 0
; | | | | |
; | \ / \ /
;
end x y
;************************************************************************
;* *
;* F U N C T I O N polymark_
(count, array) *
;* int count, *array; *
;* *
;* entr
y: 8[bp] number of markers to show *
;* 10[bp] pointer to array
of 'xy' points at *
;* which to place markers. *
;* *
;************************************************************************
;The x,y coordinate information is represented by 3 bit 2's
;complement numbers in the range of +-3 x, +-3 y. end of character
;i
s represented by bit 8 being set on the last vector byte.
;
; bi
t 7 6 5 4 3 2 1 0
; | | | | |
; | \ / \ /
;
end x y
;**************************************************************************
;* *
;* F U N C T I O N
rq_locator_(dev, x_strt, y_strt, char, x_end, y_end) *
;* int dev,
x_strt, y_strt; *
;* char *char; *
;* int *x_end, *y_end
; *
;* *
;* purpose: Place a moveable cross_hair on the di
splay at *
;* [x_strt, y_strt] and move it around with the *
;* arrow keys until a character is typed or a *
;* Function key
pressed (not arrow or SEL). *
;* The keystroke and the final 'xy
' positions are *
;* returned in 'char', 'x_end' & 'y_end'. *
;* The cross_hair is then removed. *
;* The cross_hair is ass
umed to be marker type 1 *
;* *
;* entry: 8[bp] included f
or GSX86MWC.OLB compatibility. *
;* 10[bp] starting 'x' co-ordina
te *
;* 12[bp] starting 'y' co-ordinate *
;* 14[bp] pointe
r to returned character *
;* 16[bp] pointer to ending 'x' co-ordi
nate *
;* 18[bp] pointer to ending 'y' co-ordinate *
;* *
;**************************************************************************
;************************************************************************
;* *
;* F U N C T I O N st_locator_(x
, y) *
;* int *x, *y; *
;* *
;* purpose: Updates '
x' &;or 'y' if an arrow key was *
;* pressed. Updates Lmul if SEL
ECT was pressed. *
;* Returns '\0' in AX if SELECT or no characte
r *
;* was typed, otherwise, returns the character. *
;* *
;************************************************************************
/*************************************************/
/* MSOPEN */
/* msopen(device,control_pack
et,buffer, */
/* buffer_byte_size,mouse_type); */
/* returns
TRUE if mouse avail, else FALSE */
/*************************************************/
msopen(device,mptr,bpt
r,bcnt,mtype)
/***********************************************/
/* Mouse close */
/***********************************************/
msclose(mptr
)
MOUSE_PACKET *mptr;
/*****************************************************/
/* Serial Microsoft Mouse har
dware dependent code */
/*****************************************************/
/*-------------------------- Microsoft Mouse 3 byte p
acket
;
;
; First byte
;
; +----+----+----+----+----+----+----
+----+
; | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
; +----+----+----
+----+----+----+----+----+
; | | | | | | | |
; |
| | | | | | +---- X6 Delta X
; | | | | | |
+--------- X7 Delta X
; | | | | | +-------------- Y6 Delta Y
; |
| | | +------------------- Y7 Delta Y
; | | | +------------------------ Right Mouse Button
; | | +----------------------------- Left Mouse Button
; | +---------------------------------- 1 = first byte
(synchronize)
; +--------------------------------------- 7 bit ascii (MUST MASK)
; Second byte
;
; +----+----+----+----+----+----+----+----+
; | D7 | D6 | D5 | D4
| D3 | D2 | D1 | D0 |
; +----+----+----+----+----+----+----+----+
; |
| | | | | | |
; | | | | | | | +---- X0 D
elta X
; | | | | | | +--------- X1 Delta X
; | |
| | | +-------------- X2 Delta X
; | | | | +------------------- X3 Delta X
; | | | +------------------------ X4 Delta X
; | | +----------------------------- X5 Delta X
;
| +---------------------------------- 0 = data byte (not first)
; +--------------------------------------- 7 bit ascii (MUST MA
SK)
; Third byte
;
; +----+----+----+----+----+----+----+----+
; | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
; +----+----+----+----+----+
----+----+----+
; | | | | | | | |
; | | | |
| | | +---- Y0 Delta Y
; | | | | | | +--------- Y1
Delta Y
; | | | | | +-------------- Y2 Delta Y
; | | |
| +------------------- Y3 Delta Y
; | | | +------------------------ Y4 Delta Y
; | |
+----------------------------- Y5 Delta Y
; | +---------------------------------- 0 = data byte (not first)
; +---------------------------------------
7 bit ascii (MUST MASK)
;
*/
/***********************************************/
/* Microsoft Mo
use packet decode */
/***********************************************/
CONDITION_PACKET *msdecode(mptr)
M
OUSE_PACKET *mptr;
;OPENWS.ASM
;**************************************************************** [1]
;* * [1]
;*
Workstation definitions * [1]
;* * [1]
;**************************************************************** [1]
; PRESERVE ORDER - SEE LD_WSDETS_ [1]
; =============================== [1]
ws_d
ata_ DQ 0,0,0
DD 0
p1_ DQ 0,0
ws_number_ DB 1
;workstation number (see ld_wsdets_) [1]
ws_wmo_ DB 1 ;write
mode [1]
gbmod_ DB 1 ;graphics bd mode register [1]
f
gbg_ DB 1
alups_ DB 1
gbmskl_ DB 1 ;graphics bd mas
k register - low byte [1]
gbmskh_ DB 1 ; " " " - high by
te [1]
gdcml_ DB 1 ;GDC mask register bits - low byte [1]
gdcmh_ DB 1 ; " " - high byte [1]
curl0_ DB 1 ;cu
rsor - low byte [1]
curl1_ DB 1 ; location - middle b
yte [1]
curl2_ DB 1 ; storage - high bytes & dot addr [
1]
ymax_ DW 1
xmax_ DW 1
twdir_ DB 1 ;direction
for text mode writing [1]
nmritl_ DB 1 ;number of GDC writes
- low byte [1]
nmrith_ DB 1 ; " " - high byte [1]
sh
_p_lin_ DW 1 ;shift factor for one line of words [1]
wd_p_lin_
DW 1 ;words/scan line for curr resolution [1]
x_start_ DW
1
y_start_ DW 1
x_stop_ DW 1
y_stop_ DW 1
g_strt
x_ DW 1
scr_top_ DB 1
scr_bot_ DB 1
;scroll map
shadow area [1]
scrltb_ DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
clmpda_ DQ 0,0,0,0
pat
tbl_ DQ 0,0,0,0
;------------------------ [1]
; LINE DRAWING CONSTANTS [1]
;------------------------ [1]
l_col_ DB 1 ;colour [1]
l_type_ DB 1
;line type [1]
l_wid_ DB 1 ;line width [1]
;------------------------ [1
]
; AREA FILL CONSTANTS [1]
;------------------------ [1]
f_col_ DB 1
;colour [1]
f_type_ DB 1 ;fill type [1]
f_style_ DB
1 ;fill style [1]
f_patrn_ DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0
;------------------------ [1]
; TEXT WRITE CONSTANTS [1]
;------------------------ [1]
t_col_ DB 1 ;colour [1]
t_font_ DB 1 ;font index
[1]
t_sca_ DB 1 ;sizing scale [1]
t_dir_ DB 1 ;wr
iting direction [1]
t_x_ DW 1
t_y_ DW 1
;------------------------ [1]
; MARKER CONSTANTS [1]
;------------------------ [1]
m_col_ DB 1 ;colou
r [1]
m_type_ DB 1 ;marker type (index 0-14 to m_tab_) [1]
m_sca_ DB 1 ;marker sizing scale [1]
m_tab_ DQ 0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;------------------------ [1]
; TEXT FONT TABLES [1]
;------------------------ [1]
tfonts
_ DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
D
Q 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;------------------------ [
1]
; WORK AREAS [1]
;------------------------ [1]
old_int_off DW 1
old_
int_seg DW 1
int_done DB 1
gintvect_ DW 288h ;graphi
cs hardware int vector location [1]
;------------------------ [1]
; SWITCHES [1]
;------------------------ [1]
swisg_ DB 0 ;1 = graphics option present [1]
sw100a_ DB 0 ;1 = 100a, 0 = 100b [1]
swgopen_ DB 0 ;1
= workstation opened [1]
swgon_ DB 0 ;1 = graphics open fo
r business [1]
;------------------------ [1]
;4k general purpose storage for xy
points etc.,
;gives a max of 1024 'xy' points for polylines.
;[Wh
y not, we've got lots of room in the D seg]
;------------------------ [1]
gp_buff_
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
D
Q 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DQ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;********************************************************************
;* *
;* f u n c t i o n openws_(number) *
;* *
;* purpose: initialize the graphics option *
;* *
;*
entry: 8[bp] graphics display type *
;* 1 medium res monochrom
e *
;* 2 high res monochrome *
;* 3 medium res colour
*
;* 4 high res colour *
;* 5 medium res dual monitor *
;* 6 high res dual monitor *
;* *
;* exit: all shadow
bytes initialized *
;* NULL if work_station open *
;* othe
rwise EOF *
;* *
;********************************************************************
;*****************************************************************************
; *
; f u n c
t i o n a_patrn_() *
; *
; purpose: Load the Pattern Mul
tiplier and Pattern Register *
; for line drawing. *
; *
; caution: You must load the Pattern Multiplier before *
;
loading the Pattern Register *
; *
;*****************************************************************************
;
;The following
are some register values and the corresponding output patterns
;whe
n the repeat factor is:
;
; 1 2 3
; 0FFh |--------| |----------------
| |------------------------|
; 0AAh |- - - - | |-- -- -- -- | |--- --- ---
--- |
; 0F0h |---- | |-------- | |------------ |
; 0CDh |-
- -- -| |---- ---- --| |------ ------ ---|
;
;********************************************************************
;* *
;* f u n c t i o n s init_scrol_(), a_scrmap_() *
;* *
;*
purpose: initialize the scroll map *
;* assert scroll map as
defined in scrltb *
;* *
;********************************************************************
;******************************************************************************
; *
;
f u n c t i o n hscroll_(direction, count) *
; *
; move th
e current entire screen to right or left a WORD address. *
; *
; entry: 4[bp] = direction [0 = left, anything else = right] *
;
6[bp] = count inDWs [16 pixels] *
; exit: g_strtx updated to
new start position WORD boundary *
; *
;******************************************************************************
;******************************************************************************
;*
*
;* f u n c t i o n vscroll_(direction, count) *
;* *
;* entry: 8[bp] direction 0 = DOWN anything else = UP *
;*
10[bp] number of times to scroll the region *
;* *
;******************************************************************************
;*****************************************
;si = scrltb cx = no. of lines to scroll
;*****************************************
;******************************************************************************
;* *
;* F U N C T I O N polyline_(pnts, array) *
;* int pnts,
*array; *
;* *
;* purpose: Draw a line joining the points
defined in 'array' *
;* *
;* entry: 4[bp] number of points
to join *
;* 6[bp] array containing 'xy' points *
;* *
;******************************************************************************
;******************************************************************************
; *
; F U N C T I O N line_(array) in
t *array; *
; *
; purpose: Draw a vector *
; *
;
entry: 8[bp] points to xy array layed out as: *
; *
; L
x_st = starting x location *
; Ly_st = starting y location *
; Lx_sp= ending x location *
; Ly_sp= ending y location *
; *
;******************************************************************************
;*****************************************************************************
;* *
;* F U N C T I O N point_(x,
y) *
;* *
;* purpose: Draw a pixel *
;* *
;* e
ntry: 4[bp] x location *
;* 6[bp] y location *
;* *
;
*****************************************************************************
;************************************************************************
;* *
;* F U N C T I O N rectangle_(array) int *
array; *
;* *
;* purpose: draw a rectangle by defining the
top right and *
;* bottom left points. *
;* entry: 6[bp]
has the pointer to the 'xy' array *
;* *
;* 0[array] bottom
left 'x' *
;* 2[array] bottom left 'y' *
;* 4[array] top r
ight 'x' *
;* 6[array] top right 'y' *
;* *
;* NOTE:
both 'y' values are relative to a bottom left origin *
;* *
;************************************************************************