Chapter 1
Types of OS-9 Windows
Unlike many operating systems, OS-9 has a built-in windows
program. This driver, the Windowing System, lets you lay one or
more smaller screen displays, called
windows,
on your screen
display.
With these windows, you can perform several tasks at the same
time. For example, suppose you are writing a business letter
using a word processor in one window. You can go to a spread
sheet program in another window, get a price quote you need,
return to the word processor, and include the price in the letter.
The Windowing System allows as many windows as your com
puter's memory can support, with a maximum of 32 at one time.
In OS-9, there are two types of windows: device and overlay.
Device Windows
A device window is
one that can run a program or utility. This
is the type of window you would use in the word processor/
spreadsheet example given above. Each device window acts as an
individual terminal.
The device windows are designated as devices /wl - /w7. You
open a device window as you do any other OS-9 device. You tell
OS-9 the window's parameters including whether the window is
for text or graphics. If you want to run a process in the window,
you can start an execution environment, such as a
shell,
on the
window. (See "Opening a Device Window," later in this chapter,
and the DWSet command in Chapter 3 . )
Note: If you want only to send output to the device win
dow-without running a process in the window-do not
start a shell on the window.
Device windows cannot overlay each other, and their boundaries
cannot overlap.
1-1
OS-9 Windowing System
Overlay Windows
An
overlay window is
a window that you open on top of a device
window. (You can place overlay windows over other overlay win
dows, but there must always be a device window at the bottom of
the stack.) The purpose of overlay windows is to display com
puter dialog. You cannot fork a shell to an overlay window; how
ever, you can run a shell in an overlay window. Overlay windows
assume the screen type of the device windows they overlay.
Opening a Device Window
To open a device window, follow these steps:
1. If you want to allocate memory for the window, use OS-9's
iniz command. Type:
i n i z !w number
ENTER
where
number is
the number of the device window you wish
to open (1-7). If you do not specify
number,
OS-9 uses the
next available device window number. .,
If you do not use the iniz command, memory is allocated
dynamically (as needed) to the window.
2. Next, you send an escape sequence to OS-9 that tells it the
window's parameters. These parameters include the screen
type, size, and colors. For example:
wcreate
-5=
2 20 10 40 10 01 00 00
ENTER
or
display 1 b 20 02 1 4 0a 28 0a 01 00 00
E
sends the escape sequence for the next available window to
the DWSet command. The wcreate command lets you use
decimal numbers, while the display command requires
hexadecimal numbers.
1-2
Types of OS-9 Windows / 1
If you wish to send an escape sequence to a specific win
dow, route the command to that device. For example:
- wcreate
-5=
2 20 10 40 10 01 00 00 >/w2
ENTER
sends the escape sequence to device /w2. The functions of
the codes, as used in the wcreate command, are as follows:
2 sets a screen type of 80 x 24 (text only).
20 starts the window at character/column 20.
10 starts the window at line/row 10.
40 sets a window size of 40 characters.
10 sets a window size of 10 lines.
01 sets the foreground color to blue.
00 sets the background color to white.
00 sets the border to white.
If you do not send escape sequences, OS-9 uses default
descriptors for the windows. The defaults are:
Size
Window Screen Type Starting Position (columns,
Number (chars./line) (horiz., vert.) rows)
1 40 (text) 0,0 27,11
2 40 (text) 28,0 12,11
3 40 (text) 0,12 40,12
4 80 (text) 0,0 60,11
5 80 (text) 60,0 19,11
6 80 (text) 80,0 80,12
7 80 (text) 0,0 80,24
3. Use OS-9's shell command to fork a shell to the window.
Type
shell
i=lwnumber
& ENTER
where number is the number used in the iniz or wcreate
command. The i = parameter creates an immortal shell.
Creating an immortal shell protects the window and its
shell from being destroyed if you accidentally exit the shell
using
CTRL BREAK
. If you omit the i = parameter, the shell
is forked to the next available device window.
You now have a window that can run its own tasks. Information
displayed in that window is automatically scaled to the window's
size.
1-3
OS-9 Windowing System
Opening an Overlay Window
To open an overlay window, use the Overlay Window Set func
tion. (See OWSet in Chapter 3, "General Commands.")
1-4