home *** CD-ROM | disk | FTP | other *** search
- WM DOSbox
- ─────────
-
- WM DOSbox constitutes an integrated part of the WAVmaker user interface. It
- is NOT meant for standalone operation. The safest (and most convenient) way
- to invoke it is to use the DOSBOX keyword in a menu definition file (see
- {Customiz}), letting WMmain/WMmenu take care of the details. Should you
- nevertheless wish to write your own code invoking WM DOSbox, then here's what
- you'll need to know:
-
- What it does: WM DOSbox hooks DOS interrupt 29H (fast character output) and
- ───────────── replaces it with its own handler, which color-codes DOS console
- output and redirects it to a restricted screen area. It also hooks and chains
- DOS interrupt 08H (system timer), inserting screen saver and mouse poller,
- and DOS interrupt 09H (keyboard). It then launches the program specified in
- the THIRD command line parameter, passing all subsequent command line
- parameters to it. If the program is not found in the current directory, the
- PATH environment variable is used to search for it. If the program fails to
- execute directly, an attempt is made to load it with the command processor
- specified in the COMSPEC environment variable (this allows transparent
- execution of BAT files). WM DOSbox remains loaded in memory while the child
- process is running. Upon termination of the child process, it restores the
- original interrupts and exits.
-
- The use of command line parameters number 1 and 2 is detailed below.
-
- Interrupt 29H is not documented by Microsoft, but has been available in all
- MS-DOS versions since 2.0. It is documented in Digital Research's DR-DOS, and
- also works with IBM's PC-DOS. A simple way to make sure that all character
- output is filtered through it is to install ANSI.SYS (see your DOS manual).
-
- Command line parameters: The first two command line parameters passed to WM
- ──────────────────────── DOSbox contain all information needed to set up the
- screen output area and the screen saver.
-
- ■ Parameter #2 is the program to be executed; it is also the title string to
- be displayed by the screen saver.
-
- ■ Parameter #1 is made up of the following parts:
-
- (1) A character specifying whether the screen saver is to be used (S) or
- not (N).
- (2) A one-digit HEX number specifying the foreground color for characters
- 'A' through 'Z'.
- (3) A one-digit HEX number specifying the background color for characters
- 'A' through 'Z'.
- (4) A one-digit HEX number specifying the foreground color for characters
- '0' through '9'.
- (5) A one-digit HEX number specifying the background color for characters
- '0' through '9'.
- (6) A one-digit HEX number specifying the foreground color for all other
- characters.
- (7) A one-digit HEX number specifying the background color for all other
- characters.
- (8) A two-digit DECIMAL number specifying the leftmost column in the screen
- output area (1-80).
- (9) A two-digit DECIMAL number specifying the first row in the screen output
- area (1-25).
- (10) A two-digit DECIMAL number specifying the rightmost column in the screen
- output area (1-80).
- (11) A two-digit DECIMAL number specifying the last row in the screen output
- area (1-25).
-
- Color numbering is standard DOS.
-
- Any deviation from this scheme or attempt to use illegal values (e.g. column
- positions outside of the range 1-80, or a rightmost column position smaller
- than the leftmost column position) will cause WM DOSbox to be aborted.
-
- No error messages are displayed upon premature termination, but the DOS
- ERRORLEVEL is set to 1 (0 upon normal termination). This is also done if the
- child process is terminated by the user with a Ctrl-C.
-
- The screen saver is a simple affair. It displays the title string specified in
- ──────────────── command line parameter #2 after about 10 seconds of keyboard
- and mouse inactivity and moves it to a new screen position every 3 seconds,
- while redirecting all other screen output to a virtual screen. Moving the
- mouse, clicking a mouse button, or hitting a key dumps the virtual screen to
- the physical one and restarts the time count.
-
- Finally, keep in mind that WM DOSbox is STRICTLY textmode only!