Intrinsic-70 SetWind

Top  Previous  Next

70: SetWind(X0, Y0, X1, Y1, mode, fill);

 

This intrinsic specifies the window used when sending characters out to device 6.

 

a. X0, Y0, X1, Y1. These values set the upper-left and bottom-right corners of the window in character coordinates (not pixels.)

 

b. Mode. "Mode" specifies how the window behaves.

 

I. Text Mode. The low byte of "mode" controls the text behavior.

 

0 = Scroll: Text scrolls up when the cursor reaches the bottom of the window, and an automatic CR and LF is done at the right edge. (Writing to the bottom-rightmost character cell scrolls the text up.)

 

1 = Wrap: Text does an automatic CR at the right edge, but it wraps to the top of the window when it exceeds the bottom edge.

 

2 = Clip: Text is clipped beyond the right edge and beyond the bottom of the window. The visible cursor moves when sending a character out to device 0, even if visible cursor movement is turned off for device 6. Visible cursor movement can only be turned off for video modes 0, 1, 2, 3, and 7. When the visible cursor is off, text can be output about twice as fast.

 

II. Cursor Visibility. The high byte of controls the visible cursor:

 

High Byte = 0: Visible cursor moves normally.

 

High Byte # 0: Visible cursor does not move (but the invisible character insertion point moves normally).

 

c. Fill. If the "fill" flag is "true", the window is erased and filled with the background color specified by the Attrib intrinsic (69). If the "fill" flag is "false", the window is set up without changing any characters on the screen. When in a graphic video mode, the background is not filled with a color as you would expect, but instead it is filled with a pattern.

 

Opening device 6 for output resets the window to the full screen size and enables normal scrolling and cursor movement.

 

(Controlling Screen Refresh can speed up this intrinsic. See the Console Refresh section for more information.)