Chapter 3
General Commands
The general commands let you set up and customize windows.
They also let you set up and access image buffers and select
colors for the screen.
3-1
OS-9 Windowing System
BColorBackground Color
Function:
Lets you choose a color palette register to use as the
background color. See the Palette command for setting up the
actual colors.
Code: 1B 33
Parameters: PRN
3-2
General Commands / 3
BoIdSW
Bold Switch
Function: Enables or disables boldfacing for text on graphics
screens. If boldface is on, the screen displays subsequent char
acters in bold. If boldface is off, the screen displays subsequent
characters in the regular font.
Code: 1B 3D
Parameters:
BSW
BSW = switch
00 = off (Default)
01 = on
Notes:
· You can use BoldSw with any font.
· Boldface is not supported on hardware text screens (Screen
Types 1 and 2).
3-3
OS-9 Windowing System
Border
soraer Color
Function:
Lets you change the palette register used for the
screen border. See the Palette command for setting up the
Code: 1B 34
Parameters: PRN
Notes:
0
You set the border by selecting a palette register to use for
the border register. When the actual color is changed in the
palette register selected by the command, the color of the
screen border changes to the new color. In general, the bor
der register usually matches the background palette
3-4
General Commands / 3
CWAreaChange
Working Area
Function:
Lets you alter the working area of the window. Nor
mally, the system uses this call for high-level windowing, but
you can use it to restrict output to a smaller area of the win
Code: 1B 25
Parameters: CPX CPY SZX SZY
Notes:
· You cannot change a window's working area to be larger
than the predefined-area of the window as set by DWSet or
· All drawing and window updating commands are done on
the current working area of a window. The working area
defaults to the entire size of the window. Scaling, when in
'~ use, is also performed relative to the current working area
of a window. The CWArea command allows users to restrict
the working area of a window to smaller than the full win
dow size. Functions which might be done by opening a non
saved overlay window to draw or clear an image and then
closing the overlay can be accomplished by using this com
mand to shorten execution time where an actual overlay
window is not needed.
3-5
OS-9
Windowing
System
DefCoIrDefault Color
Function:
Sets the palette registers back to their default val
ues. The actual values of the palette registers depend on the
type of monitor you are using. (See montype in OS-9
Level
Two Commands.)
Code: 1B 30
Parameters:
None
Notes:
· The default color definitions apply only to high-resolution
graphics and text displays.
· The system sets the palette registers to a proper compati
bility mode when switching to screens using the older VDG
emulation modes. See the table below:
Window System VDG-Compatible atible Modes
Color Modes p
Palette Color P# Color P# Color
00 & 08 White 00 Green 08 Black
01 & 09 Blue 01 Yellow 09 Green
02 & 10 Black 02 Blue OA Black
03 & 11
Green
03
Red OB Buff
04 & 12 Red 04 Buff OC Black
05 & 13
Yellow
05
Cyan OD Green
06 & 14 Magenta 06 Magenta OE Black
07 & 15 Cyan 07 Orange OF Orange
· The SetStat call lets you change the default color palette
definition when using the windowing system. Default colors
in the VDG-Compatible Mode cannot be changed. See the
OS-9 Level Two Technical Reference
manual for information
· The system's default colors are used whenever you create a
new window.
3-6
General Commands / 3
DfnGPBufDefi-ne GET/PUT Buffer
Function:
Lets you define the size of the GET/PUT buffers for
the system. Once you allocate a GET/PUT buffer, it remains
allocated until you use the Ki1Buf command to delete it.
OS-9 allocates memory for GET/PUT buffers in 8K blocks that
are then divided into the different GET/PUT buffers. Buffers
are divided into buffer groups. Therefore, all commands deal
ing with GET/PUT buffers must specify both a group number
and a buffer number within that group.
Code:
1B 29
Parameters:
GRP BFN HBL LBL
Technical:
The buffer usage map is as follows:
Group Buffer
Number Number' Use
0 1 - 255 Internal use only (returns errors)
1 - 199 1 - 255 General use by applications2
200 - 254 1 - 255 Reserved (Microware use only
)3
255 1 - 255 Internal use only (returns errors)
1
Buffer Number 0 is invalid and cannot be used.
2 The application program should request its user ID via
the GetID system call to use as its group number for
3
The standard group numbers are defined as follows:
Note: The names, buffer groups, and buffer numbers are
defined in the assembly definition file. The decimal num
ber you use to call these are in parentheses next to the
name. For example, to select the Arrow pointer,
Grp-Ptr and Ptr-Arr, you use 202,1 as the group/buffer
-- number.
3=7
OS-9 Windowing System
Grp-Fnt(200) = font group for system fonts
Fnt-S8x8(1) = standard 8x8 font
Fnt_S6x8(2) = standard 6x8 font
Fnt-G8x8(3) = standard graphics font
The standard fonts are in the file SYS/
StdFonts.
Grp-Clip(201) = clipboarding group (for Multiview)
Grp_Ptr(202) = graphics cursor (pointer) group
Ptr_Arr(1) = arrow pointer (hp = 0,0)
Ptr-Pen(2) = pencil pointer (hp = 0,0)
Ptr_LCH(3) = large cross hair pointer
(hp = 7,7)
Ptr_Slp(4) = sleep indicator (hourglass)
Ptr_Ill(5) = illegal indicator
Ptr-Txt(6) = text pointer (hp = 3,3)
Ptr_SCH(7) = small cross hair pointer
(hp = 3,3)
hp
hit point, the coordinates
of the actual point on the
object at which the cursor
should be centered.
The standard pointers are in the file SYS/
StdPtrs.
Grp-Pat2(203) = two color patterns _
Grp_Pat4(204) = four color patterns
Grp_Pat6(205) = sixteen color patterns
Pat_Dot(1) = dot pattern
Pat_Vrt(2) = vertical line pattern
Pat_Hrz(3) = horizontal line pattern
Pat_XHtc(4) = cross hatch pattern
Pat_LSnt(5) = left slanted lines
Pat_RSnt(6) = right slanted lines
Pat_SDot(7) = small dot pattern
Pat_BDot(8) = large dot pattern
Each pattern is found within each of the
pattern groups.
Standard patterns are in the files
SYS/StdPats_2, SYS/StdPats_4, and
SYS/StdPats-16.
3-8
General Commands / 3
All files have GPLoad commands imbedded in file, along with
the data. To load fonts, pointers, or patterns, simply merge them
to any window device: For example:
merge SYS/StdFonts ENTER
sends the standard font to standard output which may be redi
rected to another device if the current output device is not a win
dow device (such as when term is a VDG screen).
You only need to load fonts once for the entire system. Once a
Get/Put buffer is loaded, it is available to all devices and pro
cesses in the system.
3-9
OS-9 Windowing System
DWEndDevice
Window End
Function:
Ends a current device window. DWEnd closes the
display window. If the window was the last device window on
the screen, DWEnd also deallocates the memory used by the
window. If the window is an interactive window, OS-9 auto
matically switches you to a new device window, if one is
available.
Code: 1B 24
Parameters:
None
Notes:
0
DWEnd is only needed for windows that have been attached
via the iniz utility or the I$Attach system call. Non
attached windows have an implied DWEnd command that is
executed when you close the path.
3-10
General Commands / 3
DWProtSW
Device Window Protect Switch
Function: Disables and enables device window protection. By
default, device windows are protected so that you cannot over
lay them with other device windows. This type of protection
helps avoid the possibility of destroying the contents of either
or both windows.
Code: 1B 36
Parameters: BSW
BSW = switch
00=off
01 = on (Default)
Notes:
We recommend that you not turn off device window protec
tion. If you do, however, use extreme discretion because you
might destroy the contents of the windows. OS-9 does not
return an error if you request that a new window be placed
over an area of the screen which is already in use by an
unprotected window.
3-11
OS-9 Windowing System
DWSetDevice Window Set
Function:
Lets you define a window's size and location on the
physical screen. Use DWSet after opening a path to a device
window.
Code:
1B 20
Parameters:
STY CPX CPY SZX SZY PRN1 PRN2 PRN3
PRN 1 = Foreground
PRN2 = Background
PRN3 = Border (if STY 1)
Notes:
· The iniz and display commands open paths to the device
window.
· When using DWSet in a program, you must first open the
device.
· Output to a new window is ignored until OS-9 receives a
DWSet command, unless defaults are present in the device
descriptor (/wl-/w7). If defaults are present in the device
descriptors, OS-9 automatically executes DWSet, using
· When OS-9 receives the DWSet, it allocates memory for the
window, and clears the window to the current background
color. If the standard font is already in memory, OS-9
assigns it as the default font. If the standard font is not in
memory, you must execute a font set (Font) command after
loading the fonts to produce text output on a graphics
· Use the Screen Type code (STY) to define the resolution
and color mode of the new screen. If the screen type code is
zero, OS-9 opens the window on the process's currently
selected screen. If the code is 01, OS-9 opens the window on
the currently displayed screen. If the code is non-zero, OS-9
allocates a new screen for the window. The following
describes the acceptable screen types:
3-12
General Commands / 3
Code Screen Size Colors Memory Type
FF Current Displayed Screen'
00 Process's Current Screen
01 40 x 24 8 & 8 2000 Text
02 80 x 24 8 & 8
4000
Text
05 640
x 192 2
16000
Graphics
06
320 x 192
4 16000
Graphics
07 640
x 192 4 32000 Graphics
08 320 x 192 16 32000 Graphics
' Use the Current Displayed Screen option only in proce
dure files to display several windows on the same physical
screen. All programs should operate on that process's cur
rent screen.
The location of the window on the physical screen is deter
mined by the diagonal line defined by:
(CPX,CPY) and (CPX + SZX, CPY + SZY)
The foreground, background, and border register numbers
(PRN1, PRN2, and PRN3) define the palette registers used
for the foreground and background colors. See the Palette
command in this chapter for more information.
When an implicit or explicit DWSet command is done on a
window, the window automatically clears to the background
color.
All windows on the screen must be of the same type (either
text or graphics).
values in the palette register affect all windows on the
screen. However, you can choose which register to use for
foreground and background for each window. That is, OS-9
maintains palette registers and border register numbers for
the entire screen and foreground and background registers
numbers for each individual window.
OS-9 deallocates memory for a screen when you terminate
the last window on that screen.
3-13
OS-9 Windowing System
FColorForeground Color
Function: Lets you select a color palette register for the fore
ground color. See the Palette command for setting the actual
colors.
Code: 1B 32
Parameters: PRN
3-14
General Commands / 3
Font
Select Font
$00-$1F
$20-$7F
Function:
Lets you select/change the current font. Before you
can use this command, the font must be loaded into the speci
fied GET/PUT group and buffer (using GPLoad). See the
GPLoad command for information on loading font buffers.
Code:
1B 3A
Parameters:
GRP BFN
Notes:
· You can select proportional spacing for the font by using
PropSw.
· All font data is a 2-color bit map of the font.
· Each character in the font data consists of 8 bytes of data.
The first byte defines the top scan line, the second byte
defines the second scan line, and so on. The high-order bit
of each byte defines the first pixel of the scan line, the next
bit defines the next pixel, and so on. For example, the letter
"A" would be represented like this:
Byte Pixel Representation
10 . . . #.
28 . . #. #
44 . #. . . #.
44 . #. . . #.
7c . #####.
44 . #. . . #.
44 . #. . . #.
00
Note that 6x8 fonts ignore the last 2 bits per byte.
0
The fonts are ordered with characters in the following
ranges:
International characters (see mapping below)
Standard ASCII characters
3-15
OS-9 Windowing System
International characters or any characters in the font below
character $20 (hex) are printed according to the following
table:
Character position Charl or Chart
in font
$00 $C1 A $E1
$01 ii $C2 B $E2
$02
a
$C3
c
$E3
$03
a
$C4 D $E4
$04
a
$C5 E $E5
$05
a
$C6 F $E6
$06
a
$C7 6 $E7
$07 $C8 H $E8
$08
a
$C9 I $E9
$09
a
$CA J $EA
$OA
a
$CB K $EB
$OB i $CC L $EC
$OC i $CD M $ED
$OD 13 $CE H
$EE
$OE
A
$CF Q
$EF
$OF _ $DO P $FO
$10 o $D1 0 $F1
$11 ae $D2 R $F2
$12 lE $D3 S $F3
$13 6 $D4 T $F4
$14 0 $D5 U $F5
$15 0 $D6
V
$F6
$16
a
$D7 W $F7
$17
a
$D8
x
$F8
$18
0
$D9 y $F9
$19 0 $DA _z $FA
$1A 0 $AA $BA
$1B § $AB $BB
$1C E $AC $BC
$1D ± $AD $BD
$ 1E ° $AE $BE
$1 F f $AF $BF
3-is
General Commands / 3
GCSetGraphics Cursor Set
Function: Creates a GET/PUT buffer for defining the graphics
cursor that the system displays. You must use GCSet to dis
play a graphic cursor.
Code: iB 39
Parameters: GRP BFN
Notes:
· To turn off the graphics cursor specify GRP as 00.
· A system standard buffer or a user-defined buffer can be
used for the graphics cursor.
r-
3-17
OS-9 Windowing System
GetBlkGet
Block
Function:
Saves an area of the screen to a GET/PUT buffer.
Once the block is saved, you can put it back in its original
location or in another on the screen, using the PutBlk
command.
Code: 1B 2C
Parameters: GRP BFN HBX LBX HBY LBY HSX LSX HSY
LSY
HBX/LBX
= x-location of block (upper left corner)
HBY/LBX = y-location
of block
HSX/LSX
= x-dimension of block
HSY/LSY = y-dimension
of block
Notes:
The GET/PUT buffer maintains information on the size of
the block stored in the buffer so that the PutBlk command
works more automatically.
If the GET/PUT buffer is not already defined, GetBlk cre
ates it. If the buffer is defined, the data must be equal to or
smaller than the original size of the buffer.
3-18
General Commands l 3
GPLoadGET/PUT Buffer Load
Function:
Preloads GET/PUT buffers with images that you
can move to the screen later, using PutBlk.
If the GET/PUT buffer is not already created, GPLoad creates
it.
If the buffer was previously created, the size of the passed
data must be equal to or smaller than the original size of the
buffer. Otherwise, GPLoad truncates the data to the size of
the buffer.
Code: 1B 2B
Parameters:
GRP BFN STY HSX LSX HSY LSY HBL LBL
STY = format
HSX/LSX = x-dimension
of stored block
HSY/LSY = y-dimension
of stored block
HBL/LBL
= number of bytes in data
Notes:
· Buffers are maintained in a linked list system.
· Buffers to be used most should be allocated last to mini
mize the search time in finding the buffers.
· When loading a Font GET/PUT Buffer, the parameters are
as follows:
GRP BFN STY HSX LSX HSY LSY HBL LBL
GRP = 254
HSX/LSX = x-dimension
size of Font 6 or 8
HSY/LSY = y-dimension
size
of
Font 8
HBL/LBL = size
of
first data (not
including this
See the Font command for more information on font data.
3-19
OS-9 Windowing System
KilBufKill
GET/PUT Buffer
Function:
Deallocates the buffer specified by the group and
buffer number. To deallocate the entire group of buffers, set
the buffer number to 0.
Code: 1B 2A
Parameters: GRP BFN
Notes:
0
Ki1Buf returns memory used by the buffer to a free list.
When an entire block of memory has been put on the free
list, the block is returned to the system.
3-20
General Commands / 3
LSetLogic
Set
Function:
Lets you create special effects by specifying the
type of logic used when storing data, which represents an
image, to memory. The specified logic code is used by all draw
commands until you either choose a new logic or turn off the
logic operation. To turn off the logic function, set the logic code
to 00.
Code:
1B 2F
Parameters:
LCN
LCN = logic
code number
00 = No logic code; store new data on
screen
01 = AND new data with data on
screen
02 = OR new data with data on screen
03 = XOR new data with data on screen
Notes:
0
The following tables summarize logic operations in bit
manipulations:
AND First Second Result
Operand Operand
1 1 1
1 0 0
0 1 0
0 0 0
OR First Second Result
Operand Operand
1 1 1
1 0 1
''-` 0 1 1
0 0 0
3-21
OS-9 Windowing System
XOR First Second Result
Operand Operand
1 1 0
1 0 1
0 1 1
0 0 0
0
Data items are represented as palette register numbers in
memory. Since logic is performed on the palette register
number and not the colors in the registers, you should
choose colors for palette registers carefully so that you
obtain the desired results. You may want to choose the
colors for the palette registers so that LSet appears to
and,
or, and xor the colors rather than the register numbers. For
Palette # Color Alternative Order
0 White Black
1 Blue Blue
2 Black Green
3 Green White
3-22
General Commands / 3
OWE nd
Overlay Window End
Function:
Ends a current overlay window. OWEnd closes the
overlay window and deallocates memory used by the window.
If you opened the window with a save switch value of hexadec
imal 01, OS-9 restores the area under the window. If you did
not, OS-9 does not restore the area and any further output is
sent to the next lower overlay window or to the device window,
if no overlay window exists.
Code:
1B 23
Parameters:
None
3-23
OS-9 Windowing System
Overlay Window Set
Function:
Use OWSet to create an overlay window on an exist
ing device window. OS-9 reconfigures current device window
paths to use a new area of the screen as the current logical
device window.
Code: 1B 22
Parameters: SVS CPX CPY SZX SZY PRN1 PRN2
SVS = save switch
00 = Do not save area overlayed
01 = Save area overlayed and restore at
close
PRN1 = background palette register
PRN2
= foreground
palette register
Notes:
· If you set SVS to zero, any writes to the new overlay win
dow destroy the area under the window. You might want to
set SVS to zero if your system is already using most of its
available memory. You might also set SVS to zero whenever
it takes relatively little time to redraw the area under the
overlay window once it is closed.
· If you have ample memory, specify SVS as 1. Doing this
causes the system to save the area under the new overlay
window. The system restores the area when you terminate
the new overlay window. (See OWEnd.)
The size of the overlay window is specified in standard
characters. Use the same resolution (number of characters)
as the device window that will reside beneath the overlay
window. Have your program determine the original size of
the device window at startup (using the SS.ScSiz GETSTAT
call), if the device window does not cover the entire screen.
See the OS-9
Level Two Technical Reference
manual for
information on the SS.ScSiz GETSTAT call.
3-24
General Commands / 3
Overlay windows can be created on top of other overlay
windows; however, you can only write to the top most win
dow. Overlay windows are "stacked" on top of each other
logically. To get back down to a given overlay, you must
close (OWEnd) any overlay windows that reside on top of
the desired overlay window.
Stacked overlay windows do not need to reside directly on
top of underlying overlay windows. However, all overlay
windows must reside within the boundaries of the underly
ing device window.
3-25
OS-9 Windowing System
Palette
change Palette
Function: Lets you change the color associated with each of
the 16 palette registers.
Code: 1B 31
Parameters: PRN CTN
Notes:
· Changing a palette register value causes all areas of the
screen using that palette register to change to the new
color. In addition, if the border is set to that palette regis
ter, the border color also changes. See the Border command
· Colors are made up by setting the red, green, and blue bits
in the color byte which is inserted in the palette register.
The bits are laid out as follows:
Bit Color
0 Blue low
1 Green low
2 Red low
3 Blue high
4 Green high
5 Red high
6 unused
7 unused
By using six bits for color (2 each for red, green and blue)
there is a possibility of 64 from which to choose. Some of
the colors are defined as shown:
White : 00111111 = $3F (all color bits set)
Black : 00000000 = $00 (no color bits set)
Standard Blue : 00001001
= $09
(both blue bits set)
Standard Green : 00010010
= $12
(both green bits set)
Standard Red : 00100100 = $24 (both red bits set)
3-26
General Commands / 3
Note: These colors are for RGB monitors. The composite
monitors use a different color coding and do not directly
match pure RGB colors. To get composite color from the
RGB colors, the system uses conversion tables. The colors
were assigned to match the RGB colors as close as possible.
There are, however, a wider range of composite colors, so
the colors without direct matches were assigned to the clos
est possible match. The white, black, standard green, and
standard orange are the same in both RGB and composite.
3- 27
OS-9 Windowing System
PropSwProportional Switch
Function:
Enables and disables the automatic proportional
spacing of characters. Normally, characters are not proportion
ally spaced.
Code: 1B 3F
Parameters:
BSW
BSW = switch
00 = off (Default)
01 = on
Notes:
· Any standard software font used in a graphics screen can
be proportionally spaced.
Proportional spacing is not supported on hardware text
screens.
3-28
General Commands l 3
PSetPattern Set
Function:
Selects a preloaded GET/PUT buffer as a pattern
RAM array. This pattern is used with all draw commands
until you either change the pattern or turn it off by passing a
parameter of 00 as GRP (Group Number).
Code: 1B 2E
Parameters:
GRP BFN
Notes:
· The pattern array is a 32 x
8
pixel representation of graph
ics memory. The color mode defines the number of bits per
pixel and pixels per byte. So, be sure to take the current
color mode into consideration when creating a pattern
· The GET/PUT buffer can be of any size, but only the num
ber of bytes as described by the following table are used:
Color
Mode Size of Pattern Array
2 4 bytes x
8 = 32
bytes (1 bit per pixel)
4
8
bytes x
8 = 64
bytes
(2
bits per
pixel)
16 16 bytes x
8 = 128
bytes (4 bits per
pixel)
The buffer must contain at least the number of bytes
required by the current color mode. If the buffer is larger
than required, the extra bytes are ignored.
To turn off patterning, set GRP to 00.
3-29
apo3 peold-D
jaquznu dnojB
.ioqLunu iajjnq
(Zg) ujajpd ,lo azts x
(g) uzalpd jo azts S
(ZE) sa4Sq jo iaqLunu
sauztl ZE
b31N3 SS' ' ' SS SS 02
00 80 00 02 00
L0
20 q2 q
L Aejds
tp
aq plnom puuuzuzoo all
I
T .zajng
pu-e Z dno.zD oluz u.zall-ed .zeln3pa-ed sttp peol oZ -pu-euz
-uzo3 peold-D atl4 asn Iuza4sSs aup ut wall-ed auj peol oj,
20 90 90 90
90 90 90 90
90 90 90 90
_ 90 90 90 90
TOTOTOTO = 90 90 90 20 20
22$ 20 90 20
20 99$ 90 20
99$ 99$ 99$ 99$
:stul 931!1 sNool mou walled auZ
-ujup ,lo sajSq t jo slsisuo3 moa Thva Imp a3pou `ujup alSq
olut passaaduzo3 si P4-ep laxid gxZ aill .zoj Sa-euiq all uauAk
OTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOT
OTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOT
OTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOT
OTOTOTOTOIOTOTOTOTOTOTOTOTOTOTOT
OTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOT
OTOTOTOTOTOTOTOIOTOTOTOTOTOTOTOT
OTOTOTOTOTOTOTOTOTOTOTOTOTOTOTOT
OTOIOTOTOIOTOTOTOTOTOIOTOTOTOTOT
(Iiq auo of lenba st laxld
- auo
I-eZll
ajou) unpud jas jtq au4 smotls molaq uzva2ulp
aU 's,0 puu
SIT
p do apeuz st uaal4ud joloo oml V -sautl
lu3tjaan p ujajjvd jolo;) onm4
P
salvax) alduzuxa Bulnmolloj au,,
wals,cs .gu?nopuUt
s-s0
T~ E
azts auI sle salgq (gZT) Og$ Xjjaads pu-e pueuz
-LUOD
peorId-D OT asn `uza4sXs auj ui u.za44pd au4 peol oZ
' 0a$ jo saijas -e st u.zallvd atll `ul-ep alXq
oiui passaaduzoo si -el-ep laxid gxg auk ,zol X.z-eutq azll uaum
0000 T T T T "' f slas P101 g T .zoj unp-ed ~~ada,z~0000 T T T T
:stuff a~tj
31001
pjnom unpud jjq azll ui autl ilmea s;alxq gZT jo spts
-uo3 u.zallud auj Imp su-eauz stzlj 'auo ,lo pealsui s4iq .znoj jo
do apeuz st laxtd `s-10103 gT Butsn u.zall-ed a ButNvuz uauA
'(~E) 0Z$ ,lo ppapui sajXq (fg)
0f,$ Xji3ads 1nq alduztxa aolo3 z auj .zol paqt.z3sap
SIB puULu
-uzo3 peorId-D auk asn 'uza4sXs auk ui wall-ed au4 peol oZ
Do$
Do$ Do$ Do$ DO$ Do$
Do$ Do$
Do$ 00$ Do$ DO$ Do$ Do$ Do$ Do$
Do$ Do$ Do$ Do$ Do$
oo$ oo$ oo$
OOT T = Do$ Do$ Do$ Do$
Do$ Do$ Do$ Do$ Do$ Do$ Do$ Do$
Do$ Do$ Do$ 00$ 00$ Do$ Do$ Do$
00$ 00$ Do$ Do$ Do$ Do$ Do$ Do$
Do$ Do$ Do$ Do$ Do$ Do$ Do$ Do$
:sIT 93111 s31ool mou uzajpd auj,
--elup ,lo salgq g jo slstsuo3
Mo.z
u3ea Imp a3ijou `-el-ep ajXq
olul passajduzo3 st -epp laxtd gxt, aui ,ioj,9-muiq auj uauAk
OOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOII
OOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOII
OOIIOOIIOOIIOOIIOOITOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOII
OOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOII
OOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOII
OOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOII
OOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOII
OOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOIIOOII
s.zolo3
f, Buisn uzallpd ju3pzan owes au1 .zoj uaallud jas Itq azll
smoxjs molaq uzvjBvtp aqjL
o
Zg ,lo pealsut sa4,gq tg p s1sts-~`"
-uo3 u.zap-ed
ails
jui1l su-eauz
SIT
4j 'auo jo pealsui sjjq oml jo
do ap-euz st laxid -e `s.zolo3 ;, 2uisn u.zall-ed
L,
2utNuuz uaqM
l SPU
DW Wo,g ? 'DjauaD
OS-9 Windowing System
PutBlkPut Block
Function: Moves a GET/PUT buffer, previously copied from the
screen or loaded with GPLoad, to an area of the screen.
Code: 1B 2D
Parameters: GRP BFN HBX LBX HBY LBY
HBX/LBX = x-location
of block
(upper left corner)
HBY/LBY = y-location
of block
Notes:
The dimensions of the block were saved in the GET/PUT
buffer when you created it. OS-9 uses these dimensions
when restoring the buffer.
The screen type conversion is automatically handled by the
PutBlk routine in the driver.
GET/PUT buffers cannot be scaled. The image will be
clipped if it does not fit within the window.
3-32
General Commands / 3
ScaleSwScale Switch
Function:
Disables and enables automatic scaling. Normally,
automatic scaling is enabled. When scaling is enabled, coordi
nates refer to a relative location in a window that is propor
tionate to the size of the window. When scaling is disabled,
coordinates passed to a command will be the actual coordi
nates for that type of screen relative to the origin of the
window.
Code: 1B 35
Parameters: BSW
BSW
= switch
00=off
01 = on (Default)
Notes:
0
A useful application of disabled scaling is the arrangement
of references between a figure and text.
0
All coordinates are relative to the window's origin (0,0).
The valid range for the coordinates:
Scaling enabled:
y = 0-191
x = 0-639
Scaling disabled:
y = 0-size
of y - 1
x = 0-size
of x - 1
3-33
OS-9 Windowing System
Select
Window Select
Function:
Causes the current process's window to become the
active (display) window. You can select a different window by
using the form:
d
i 5 p 1
ay 1 B 21 > lw number
where
number
is the desired window number. If the process
that executes the select is running on the current interactive
(input/display) window, the selected window becomes the
interactive window, and the other window becomes passive.
Code: 1B 21
Parameters:
None
Notes:
·
The keyboard is attached to the process's selected window
through the use of the
CLEAR
key. This lets you input data
from the keyboard to different windows by using the
CLEAR
key to select the window.
All display windows that occupy the same screen are also
·
The device window which owns the keyboard is the current
interactive window. The interactive window is always the
window being displayed. Only one process may receive
input from the keyboard at a time. Many processes may be
changing the output information on their own windows;
however, you can only see the information that is displayed
on the interactive window and any other window on the
same screen as the interactive window.
3-34
General Commands / 3
TCharSW
Transparent Character Switch
Function:
Defines the character mode to be used when putting
characters on the graphics screens.
In the default mode (transparent off), the system uses block
characters that draw the entire foreground and background for
that cell.
When in transparent mode, the only pixels that are changed
are the ones where the character actually has pixels set in its
font. When transparent mode is off, all pixels in the character
block are set: foreground or font pixels in the foreground color
and others in the background color.
Code: 1B 3C
Parameters: BSW
BSW = switch
00 = off (Default)
01 = on
3-35