EMULATE.DOC News and corrections EMULATE 3.00 1987-08-10 The contents of this file is an addendum to the README.DOC file for MS-DOS 3.20. GENERAL EMULATE v3.0 is an enhanced version of the PC ROM BIOS emulator. LEVELS Three levels of emulation are available. Level 1 corresponds to PC-mode. Level 2 is a slightly enhanced version of EMULATE v2.0. Level 3, in addition to level 2, supports direct handling of the video memory for the monochrome or color/graphics adaptors. This level of emulation requires 768K of RAM memory. Level 2 and 3 stays resident in memory when loaded. An optional parameter /1, /2 (default if 256K) or /3 (default if 768K) specifies the level of emulation. If level 2 or 3 is already loaded, the level of emulation can not be changed without resetting the computer. This must be done with the RESET button on the front of the computer. NOTE! Use always the RESET button to restart the computer whenever the emulator is loaded! PRINTER A printer filter (cf. PREMUL) is included. An optional parameter /ON (default) or /OFF defines the state of the filter. Parameters /+ and /- can be used instead of the parameters /ON and /OFF. The printer filter status can be changed directly from the keyboard. Supershift+Ctrl+Insert activates and Supershift+ Ctrl+Delete deactivates the filter. A character screen dump (int 05h) is activated with Shift+ Ctrl+F1. Either local or remote printers can be used. No message is displayed if the screen dump cannot be performed. The filter is automatically deactivated during graphic screen dumps. Full handling of both remote and local printer also for "normal" printing. NOTE! EMULATE v3.0 may not be used together with PREMUL! MODES Level 2 only supports video mode 7 (25*80 characters). Characters can only be written to the screen with DOS- or BIOS-calls. Level 3 supports video modes 2-7. Direct output to video memory is emulated. Some programs require a specific video mode set. Available modes are /MONO for monochrome adapter, /CGA for graphics or /MONOGR for both. The video mode can be reset to initial (not restricted) mode with parameter /INIT. This will also restore some parameters that application programs may have destroyed. The different screen modes will work with monochrome as well as with color screens. HELP A status report returned if only the parameter /? is typed. Helptext is available with the parameter /H or /HELP. PARAMETERS Examples of valid combinations: EMULATE /1 PC-mode EMULATE Load maximum level possible EMULATE /2 /OFF Level 2, filter off EMULATE /3 Level 3, filter on EMULATE /3 /CGA Level 3, filter on, cga EMULATE /? Status request EMULATE /h Help request ERRORLEVEL The EMULATE command sets the exit code as follows: 0 Normal completion 1 Syntax error 2 Option conflict 3 Incorrect DOS version 4 Incorrect ROM BIOS version 5 Insufficient memory 6 Level 3 can't be loaded, if level 2 is already loaded 10 No emulator. No network. 11 No emulator. Network active, not logged on. 12 No emulator. Network active, logged on. 13 Emulator level 1. No network. 14 Emulator level 1. Network active, not logged on. 15 Emulator level 1. Network active, logged on. 16 Emulator level 2. No network. 17 Emulator level 2. Network active, not logged on. 18 Emulator level 2. Network active, logged on. 19 Emulator level 3. No network. 20 Emulator level 3. Network active, not logged on. 21 Emulator level 3. Network active, logged on. These codes can be used with the batch processing IF ERRORLEVEL subcommand. The codes 10-21 are only returned with a status request /?. The network status can be used to check if the central printer can be used, i.e. the user is logged on. KEYBOARD The key combination Ctrl+Break, calls interrupt 1Bh. The default action for this interrupt is to insert character 3 (ctrl-C) into the keyboard queue. INTERRUPTS The following PC interrupts are emulated: 5h print screen 9h physical keyboard 10h video 11h equipment-list 12h memory size 13h diskette (only for stand-alone computer) 14h communications 16h keyboard 17h printer 1Ah time-of-day 1Bh keyboard break 1Ch timer tick 1Fh graphic characters The PC interrupts 15h, 18h, 19h, 1Dh, 1Eh, 67h (EMS) and F0h (used by the BASICA interpreter) are dummy interrupts. The COMPIS/SCANDIS interrupts E6h (graphics), EBh (network), EEh (physical hard disk), EFh (physical terminal), F1h (flexible disk), F3h (keyboard) and F4h (parallel printer) are modified. The hardware interrupts 02h (NMI), 08h (timer 0) and 12h (timer 1) are used. VARIABLES The most important variables located from absolute location 400h to 5FFh in a PC computer are placed at the same adresses. These variables are: 408h (word) address of printer 410h (word) equipment-list data 413h (word) usable memory size 41Ah (word) head of BIOS keyboard buffer 41Ch (word) tail of BIOS keyboard buffer 440h (word) time out for flexible disk drive 449h (byte) current video mode 44Ah (word) screen column width (80) 44Ch (word) screen regeneration length (4000) 44Eh (word) screen location offset (0) 450h (word) current cursor location 460h (word) current cursor mode 462h (byte) current display page (0) 463h (word) port address of 6845 video emulator 465h (byte) CRT mode setting 46Ch (Dword) timer count 470h (byte) timer roll over 478h (byte) time out for printer 500h (byte) print-screen indicator All other bytes from 400h to 5FFh are set to 0 (zero).