Keyboard and video – Juniper Systems Allegro DOS Manual User Manual

Page 242

Advertising
background image

Page 8-8 Software Developer's Guide for DOS

Keyboard and Video

A programmer can use the keyboard and video interrupt functions to
control the keyboard and video screens. These functions are described
below.

Keyboard Intercept Functions

BIOS interrupt 15h function 4Fh can be hooked to intercept raw (not yet
translated) scan codes from the keyboard, which are contained in the AL
register. The scan codes at this level are unique to the Allegro. Refer to
the system scan codes in the Scan Code Tables found at the end of this
section.

BIOS interrupt 15h function 4Eh can be hooked to intercept translated
scan codes from the keyboard, which are contained in the AX register.
The scan codes at this level are standard 2 byte scan/ASCII character
codes. The keys on the keyboard can be remapped to output alternate
characters through this interrupt.

Video

The Allegro display is a CGA-compatible 320 x 200 pixel monochrome
LCD. Text mode (BIOS video mode 3) supports four fonts which will
display 40 columns x 25 lines, 40 x 16, 32 x 16, or 20 x 12 for the small,
medium, large, or extra large fonts respectively. Font may be toggled
with a hot key or set programmatically through the BIOS int 10h
function 2E14h. A virtual 80 x 25 display with panning capability is
supported for all fonts. Text attributes can be set to black/white, where
CGA colors are mapped to either full on or full off, and gray shades,
where CGA colors map to various shades of gray. This setting can be
changed either in the System Setup program or through BIOS int 10h
function 2F23h.

Graphics modes supported are CGA mode 4 (320x200 pixel) with four
shades of gray, and CGA mode 6 (640x200 pixel) where pixels are either
on or off. Standard BIOS interrupt 10h functions are used to set the
video mode. Only modes 3, 4, and 6 are supported.

An autopan function can be enabled or disabled to cause the display to
pan with the cursor around the 80 x 25 virtual window. Extended BIOS
functions can be used to locate the display anywhere on the virtual
window. In this way multiple “pages” can be set up on the single 80 x 25
window.

Advertising