51
<DW
yt
,
yb
,
xl
,
xr
> Define Window
Screen Handling & Text
Description
Defines an area of the screen into which certain screen write commands are constrained
Parameters
yt
= 0 to 7
- top row of the window area
yb
= 0 to 7
- bottom row of the window area
xl
= 0 to 119
- pixel column of the left hand side of the window
xr
= 0 to 119
- pixel column of the right hand side of the window
Initial Value
The initial window size is the full screen <DW0,7,0,119>
Modes
Row Mode Only
Notes
When a window is in use, all cursor related commands are relative to the window area. For example:
<HC> will home the cursor in the window area
<CM0,0> will move the cursor to the top row, left hand side of the window area.
The window may be redefined at any time without affecting the screen contents. In this way a
window can be removed by defining the whole screen as a new window i.e.<DW0,7,0,119>
The <CS> Clear Screen and <PM> Pixel Mode commands also remove a window definition.
Uses
The <DW> command allows:
•
Text to be scrolled in a window
•
Trend graphs to be drawn by combining the use of the Horizontal Scroll <HS> command
•
Static text and graphics to be protected; headings, footers or titles can be left in place while
different messages are displayed and cleared within a window
Example
<FS>
Fill Screen
<RM>
Set Row Mode
<F2>
16x10 pixel font
<CM4,0>
Move the cursor to fifth row from the top, at the left of the screen
<WM3>
Write characters in Inverse mode (clear character on black
background)
<WTFlow:>
Write the text “Flow:”
<WM0>
Back to normal write mode (black character on white background)
<DW3,5,60,115>
Define window for a value to be written
<F3>
Larger font
<CW>
Clear the window
<WT2.74>
Write out a value
Subsequent values then only need:
<HC>
Home the cursor in the window area
<WT3.18>
Write out the new value
Gotchas!
The <CS> Clear Screen and <PM> Pixel Mode commands remove any defined windows
See Also
CW
Clear Window