Console Window

Top  Previous  Next

The Console Window is the standard input and output device for XPL programs. It provides a complete emulation of all the functions of a standard DOS screen, as well as extended, device-independent text and graphics operations. (Extended graphics operations are described in detail in the Extended Intrinsics Section.)

 

ConsoleWin

 

Status Bar. The Status Bar displays information about the Console Window.

 

Mouse: The Mouse display shows the position of the mouse cursor in pixels relative to the upper-left corner of the Console Window.

Color: The Color display shows the red, green and blue color components of the pixel under the mouse cursor.

Char Pos: The Char Pos display shows the character cell position of the mouse cursor.

+, -, o Buttons. These button magnify, shrink or reset the magnification. This is useful when one of the original PC graphics modes is too small for modern, high-resolution screens.

 

PC Text and Graphics. The Console Window emulates 61 standard CGA, EGA, VGA, and VESA modes, including both text and graphics. It includes 8x8, 8x16, 9x16 and 8x14 fonts. It also emulates the pixel aspect ratio of each mode. For example, mode 6 requires a pixel aspect ratio of 1:2.4 to fit 640x200 pixels on a 4:3 monitor. The following modes are currently available:

 

$0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $A, $B, $C, $D, $E, $F, $10, $11, $12, $13, $6A, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109, $10A, $10B, $10C, $10D, $10E, $10F, $110, $111, $112, $113, $114, $115, $116, $117, $118, $119, $11A, $11B, $130, $131, $132, $133, $134, $135, $136, $13D, $13E, $145, $146, $14A.

 

Click here for a complete description of all the CGA, EGA, VGA, and VESA modes, There is also detailed information about the VGA paletted modes.

 

Keyboard Input. The Console Window also provides keyboard input for XPL programs. Whenever the Console Window has the focus, keystrokes are directed to the XPL input intrinsics. Standard XPL device channels and intrinsics receive keystrokes just like they do in DOS.

 

Mouse Input. Anytime the mouse cursor is within the Console Window, the cursor position and the mouse button state can be read by the XPL program. Mouse information is read with the extended intrinsics.

 

Screen Refresh. The Console Window is refreshed at regular intervals and after every operation that makes changes to the screen. It takes about 300 microseconds to refresh the screen. Although this is very fast, controlling Screen Refresh can speed up certain operations. Click here for more detailed information.