Device 6 Details

Top  Previous  Next

Device 6 is similar to devices 0 and 1, but it has colors and windows. The foreground and background colors used for characters can be defined using the Attrib intrinsic (69), and a window size and location can be defined using the SetWind intrinsic (70).

 

Here is a table showing how the different devices handle control characters on the screen:

 

DEVICE

BEL (07)

BS (08)

TAB (09)

LF (0A)

FF (0C)

CR (0D)

0

x

x

x

x

x

x

1

x

x

-

x

-

x

6

-

-

-

x

-

x

                                                 

                                                         

An "x" means that the control function is done, while "-" means that a character is displayed instead. Control characters not shown are all displayed as characters, including DEL ($7F). All of the extended characters ($80-$FF) are displayed. ($00, $20 and $FF are displayed as space characters.)

 

Input from device 6 is similar to device 1 in that keystrokes are sent to the program as soon as they are struck (there is no line buffer). It differs from device 1 in that keystrokes are echoed to the display. Also, typing a Ctrl+C (or Ctrl+Break) does not abort the program; it is handled like any other keystroke. If a non-ASCII key is struck, such as F1, a zero is returned (and echoed; it looks like a space character), but the scan code is not available. Use ChIn(1) to handle these special keys.

 

OpenO(6) resets any window set up by SetWind to the size of the full screen, selects an attribute with white characters on a black background, enables normal scrolling and cursor movement, and moves the cursor to the upper-left corner of the screen.