home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / docum / advdos.doc / s3 < prev   
Encoding:
Text File  |  1992-04-21  |  347.2 KB  |  11,141 lines

  1. ────────────────────────────────────────────────────────────────────────────
  2. SECTION 3  IBM ROM BIOS AND MOUSE FUNCTIONS REFERENCE
  3. ────────────────────────────────────────────────────────────────────────────
  4.  
  5.  
  6. Notes to the Reader
  7.  
  8.   In the headers for ROM BIOS video driver (Int 10H) function calls, the
  9.   following icons are used:
  10.  
  11.   [MDA]                    Monochrome Display Adapter
  12.   [CGA]                    Color/Graphics Adapter
  13.   [PCjr]                   PCjr system board video controller
  14.   [EGA]                    Enhanced Graphics Adapter
  15.   [MCGA]                   Multi-Color Graphics Array (PS/2 Models 25 & 30)
  16.   [VGA]                    Video Graphics Array (PS/2 Models 50 and above)
  17.  
  18.   In the remainder of this section, the following icons are used:
  19.  
  20.   [PC]                     Original IBM PC, PC/XT, and PCjr, unless
  21.                            otherwise noted.
  22.   [AT]                     PC/AT and PC/XT-286, unless otherwise noted.
  23.   [PS/2]                   All PS/2 models (including Models 25 and 30),
  24.                            unless otherwise noted.
  25.  
  26.   ROM BIOS functions that are unique to the PC Convertible have been
  27.   omitted.
  28.  
  29.   Some functions are supported only in very late revisions of a particular
  30.   machine's ROM BIOS (such as Int 1AH Functions 00H and 01H on the PC/XT).
  31.   In general, such functions are not given an icon for that machine since a
  32.   program could not safely assume that they were available based on the
  33.   machine ID byte(s).
  34.  
  35.  
  36. Summary of ROM BIOS and Mouse Function Calls
  37.  
  38.  
  39.   Int    Function     Subfunction   Name
  40.   ──────────────────────────────────────────────────────────────────────────
  41.   10H                               Video Driver
  42.   10H    00H                       Set Video Mode
  43.   10H    01H                       Set Cursor Type
  44.   10H    02H                       Set Cursor Position
  45.   10H    03H                       Get Cursor Position
  46.   10H    04H                       Get Light Pen Position
  47.   10H    05H                       Set Display Page
  48.   10H    06H                       Initialize or Scroll Window Up
  49.   10H    07H                       Initialize or Scroll Window Down
  50.   10H    08H                       Read Character and Attribute at Cursor
  51.   10H    09H                       Write Character and Attribute at Cursor
  52.   10H    0AH (10)                  Write Character at Cursor
  53.   10H    0BH (11)                  Set Palette, Background, or Border
  54.   10H    0CH (12)                  Write Graphics Pixel
  55.   10H    0DH (13)                  Read Graphics Pixel
  56.   10H    0EH (14)                  Write Character in Teletype Mode
  57.   10H    0FH (15)                  Get Video Mode
  58.   10H    10H (16)     00H          Set Palette Register
  59.   10H    10H (16)     01H          Set Border Color
  60.   10H    10H (16)     02H          Set Palette and Border
  61.   10H    10H (16)     03H          Toggle Blink/Intensity Bit
  62.   10H    10H (16)     07H          Get Palette Register
  63.   10H    10H (16)     08H          Get Border Color
  64.   10H    10H (16)     09H          Get Palette and Border
  65.   10H    10H (16)     10H (16)     Set Color Register
  66.   10H    10H (16)     12H (18)     Set Block of Color Registers
  67.   10H    10H (16)     13H (19)     Set Color Page State
  68.   10H    10H (16)     15H (21)     Get Color Register
  69.   10H    10H (16)     17H (23)     Get Block of Color Registers
  70.   10H    10H (16)     1AH (26)     Get Color Page State
  71.   10H    10H (16)     1BH (27)     Set Gray-Scale Values
  72.   10H    11H (17)     00H          Load User Font
  73.   10H    11H (17)     01H          Load ROM 8-by-14 Font
  74.   10H    11H (17)     02H          Load ROM 8-by-8 Font
  75.   10H    11H (17)     03H          Set Block Specifier
  76.   10H    11H (17)     04H          Load ROM 8-by-16 Font
  77.   10H    11H (17)     10H (16)     Load User Font, Reprogram Controller
  78.   10H    11H (17)     11H (17)     Load ROM 8-by-14 Font, Reprogram
  79.                                     Controller
  80.   10H    11H (17)     12H (18)     Load ROM 8-by-8 Font, Reprogram
  81.                                     Controller
  82.   10H    11H (17)     14H (20)     Load ROM 8-by-16 Font, Reprogram
  83.                                     Controller
  84.   10H    11H (17)     20H (32)     Set Int 1FH Pointer
  85.   10H    11H (17)     21H (33)     Set Int 43H for User's Font
  86.   10H    11H (17)     22H (34)     Set Int 43H for ROM 8-by-14 Font
  87.   10H    11H (17)     23H (35)     Set Int 43H for ROM 8-by-8 Font
  88.   10H    11H (17)     24H (36)     Set Int 43H for Rom 8-by-16 Font
  89.   10H    11H (17)     30H (48)     Get Font Information
  90.   10H    12H (18)     10H (16)     Get Configuration Information
  91.   10H    12H (18)     20H (32)     Select Alternate PrintScreen
  92.   10H    12H (18)     30H (48)     Set Scan Lines
  93.   10H    12H (18)     31H (49)     Enable/Disable Palette Loading
  94.   10H    12H (18)     32H (50)     Enable/Disable Video
  95.   10H    12H (18)     33H (51)     Enable/Disable Gray-Scale Summing
  96.   10H    12H (18)     34H (52)     Enable/Disable Cursor Emulation
  97.   10H    12H (18)     35H (53)     Switch Active Display
  98.   10H    12H (18)     36H (54)     Enable/Disable Screen Refresh
  99.   10H    13H (19)                   Write String in Teletype Mode
  100.   10H    1AH (26)                  Get or Set Display Combination Code
  101.   10H    1BH (27)                  Get Functionality/State Information
  102.   10H    1CH (28)                  Save or Restore Video State
  103.   11H                              Get Equipment Configuration
  104.   12H                              Get Conventional Memory Size
  105.   13H                               Disk Driver
  106.   13H    00H                       Reset Disk System
  107.   13H    01H                       Get Disk System Status
  108.   13H    02H                       Read Sector
  109.   13H    03H                       Write Sector
  110.   13H    04H                       Verify Sector
  111.   13H    05H                       Format Track
  112.   13H    06H                       Format Bad Track
  113.   13H    07H                       Format Drive
  114.   13H    08H                       Get Drive Parameters
  115.   13H    09H                       Initialize Fixed Disk Characteristics
  116.   13H    0AH (10)                  Read Sector Long
  117.   13H    0BH (11)                  Write Sector Long
  118.   13H    0CH (12)                  Seek
  119.   13H    0DH (13)                  Reset Fixed Disk System
  120.   13H    0EH (14)                  Read Sector Buffer
  121.   13H    0FH (15)                  Write Sector Buffer
  122.   13H    10H (16)                  Get Drive Status
  123.   13H    11H (17)                  Recalibrate Drive
  124.   13H    12H (18)                  Controller RAM Diagnostic
  125.   13H    13H (19)                  Controller Drive Diagnostic
  126.   13H    14H (20)                  Controller Internal Diagnostic
  127.   13H    15H (21)                  Get Disk Type
  128.   13H    16H (22)                  Get Disk Change Status
  129.   13H    17H (23)                  Set Disk Type
  130.   13H    18H (24)                  Set Media Type for Format
  131.   13H    19H (25)                  Park Heads
  132.   13H    1AH (26)                  Format ESDI Drive
  133.   14H                               Serial Communications Port Driver
  134.   14H    00H                       Initialize Communications Port
  135.   14H    01H                       Write Character to Communications Port
  136.   14H    02H                       Read Character from Communications Port
  137.   14H    03H                       Get Communications Port Status
  138.   14H    04H                       Extended Initialize Communications Port
  139.   14H    05H                       Extended Communications Port Control
  140.   15H                               I/O Subsystem Extensions
  141.   15H    00H                       Turn On Cassette Motor
  142.   15H    01H                       Turn Off Cassette Motor
  143.   15H    02H                       Read Cassette
  144.   15H    03H                       Write Cassette
  145.   15H    0FH (15)                  Format ESDI Drive Periodic Interrupt
  146.   15H    21H (33)     00H          Read POST Error Log
  147.   15H    21H (33)     01H          Write POST Error Log
  148.   15H    4FH (79)                  Keyboard Intercept
  149.   15H    80H (128)                 Device Open
  150.   15H    81H (129)                 Device Close
  151.   15H    82H (130)                 Process Termination
  152.   15H    83H (131)                 Event Wait
  153.   15H    84H (132)                 Read Joystick
  154.   15H    85H (133)                 SysReq Key
  155.   15H    86H (134)                 Delay
  156.   15H    87H (135)                 Move Extended Memory Block
  157.   15H    88H (136)                 Get Extended Memory Size
  158.   15H    89H (137)                 Enter Protected Mode
  159.   15H    90H (144)                 Device Wait
  160.   15H    91H (145)                 Device Post
  161.   15H    C0H (192)                 Get System Environment
  162.   15H    C1H (193)                 Get Address of Extended BIOS Data Area
  163.   15H    C2H (194)    00H          Enable/Disable Pointing Device
  164.   15H    C2H (194)    01H          Reset Pointing Device
  165.   15H    C2H (194)    02H          Set Sample Rate
  166.   15H    C2H (194)    03H          Set Resolution
  167.   15H    C2H (194)    04H          Get Pointing Device Type
  168.   15H    C2H (194)    05H          Initialize Pointing Device Interface
  169.   15H    C2H (194)    06H          Set Scaling or Get Status
  170.   15H    C2H (194)    07H          Set Pointing Device Handler Address
  171.   15H    C3H (195)                 Set Watchdog Time-Out
  172.   15H    C4H (196)                 Programmable Option Select
  173.   16H                               Keyboard Driver
  174.   16H    00H                       Read Character from Keyboard
  175.   16H    01H                       Get Keyboard Status
  176.   16H    02H                       Get Keyboard Flags
  177.   16H    03H                       Set Repeat Rate
  178.   16H    04H                       Set Keyclick
  179.   16H    05H                       Push Character and Scan Code
  180.   16H    10H (16)                  Read Character from Enhanced Keyboard
  181.   16H    11H (17)                  Get Enhanced Keyboard Status
  182.   16H    12H (18)                  Get Enhanced Keyboard Flags
  183.   17H                               Parallel Port Printer Driver
  184.   17H    00H                       Write Character to Printer
  185.   17H    01H                       Initialize Printer Port
  186.   17H    02H                       Get Printer Status
  187.   18H                              ROM BASIC
  188.   19H                              Reboot System
  189.   1AH                               Real-time (CMOS) Clock Driver
  190.   1AH    00H                       Get Tick Count
  191.   1AH    01H                       Set Tick Count
  192.   1AH    02H                       Get Time
  193.   1AH    03H                       Set Time
  194.   1AH    04H                       Get Date
  195.   1AH    05H                       Set Date
  196.   1AH    06H                       Set Alarm
  197.   1AH    07H                       Reset Alarm
  198.   1AH    0AH (10)                  Get Day Count
  199.   1AH    0BH (11)                  Set Day Count
  200.   1AH    80H (128)                 Set Sound Source
  201.   33H                              Microsoft Mouse Driver
  202.   33H    00H                       Reset Mouse and Get Status
  203.   33H    01H                       Show Mouse Pointer
  204.   33H    02H                       Hide Mouse Pointer
  205.   33H    03H                       Get Mouse Position and Button Status
  206.   33H    04H                       Set Mouse Pointer Position
  207.   33H    05H                       Get Button Press Information
  208.   33H    06H                       Get Button Release Information
  209.   33H    07H                       Set Horizontal Limits for Pointer
  210.   33H    08H                       Set Vertical Limits for Pointer
  211.   33H    09H                       Set Graphics Pointer Shape
  212.   33H    0AH (10)                  Set Text Pointer Type
  213.   33H    0BH (11)                  Read Mouse Motion Counters
  214.   33H    0CH (12)                  Set User-defined Mouse Event Handler
  215.   33H    0DH (13)                  Turn On Light Pen Emulation
  216.   33H    0EH (14)                  Turn Off Light Pen Emulation
  217.   33H    0FH (15)                  Set Mickeys to Pixels Ratio
  218.   33H    10H (16)                  Set Mouse Pointer Exclusion Area
  219.   33H    13H (19)                  Set Double Speed Threshold
  220.   33H    14H (20)                  Swap User-defined Mouse Event Handlers
  221.   33H    15H (21)                  Get Mouse Save State Buffer Size
  222.   33H    16H (22)                  Save Mouse Driver State
  223.   33H    17H (23)                  Restore Mouse Driver State
  224.   33H    18H (24)                  Set Alternate Mouse Event Handler
  225.   33H    19H (25)                  Get Address of Alternate Mouse Event
  226.                                     Handler
  227.   33H    1AH (26)                  Set Mouse Sensitivity
  228.   33H    1BH (27)                  Get Mouse Sensitivity
  229.   33H    1CH (28)                  Set Mouse Interrupt Rate
  230.   33H    1DH (29)                  Select Pointer Page
  231.   33H    1EH (30)                  Get Pointer Page
  232.   33H    1FH (31)                  Disable Mouse Driver
  233.   33H    20H (32)                  Enable Mouse Driver
  234.   33H    21H (33)                  Reset Mouse Driver
  235.   33H    22H (34)                  Set Language for Mouse Driver Messages
  236.   33H    23H (35)                  Get Language Number
  237.   33H    24H (36)                  Get Mouse Information
  238.   ──────────────────────────────────────────────────────────────────────────
  239.  
  240.  
  241.  
  242. ────────────────────────────────────────────────────────────────────────────
  243. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  244. Function 00H
  245. Set video mode
  246. ────────────────────────────────────────────────────────────────────────────
  247.  
  248.   Selects the current video display mode. Also selects the active video
  249.   controller, if more than one video controller is present.
  250.  
  251. Call with:
  252.  
  253.   AH            = 00H
  254.   AL            = video mode (see Notes)
  255.  
  256. Returns:
  257.  
  258.   Nothing
  259.  
  260. Notes:
  261.  
  262.   ■ The video modes applicable to the various IBM machine models and video
  263.     adapters are as follows:
  264.  
  265.  
  266.   Mode  Resolution  Colors   Text/       MDA   CGA   PCjr EGA   MCGA  VGA
  267.                              graphics
  268.   ──────────────────────────────────────────────────────────────────────────
  269.   00H   40-by-25     16      text              *     *    *     *     *
  270.         color burst
  271.         off
  272.   01H   40-by-25     16      text              *     *    *     *     *
  273.   02H   80-by-25     16      text              *     *    *     *     *
  274.         color burst
  275.         off
  276.   03H   80-by-25     16      text              *     *    *     *     *
  277.   04H   320-by-200    4      graphics          *     *    *     *     *
  278.   05H   320-by-200    4      graphics          *     *    *     *     *
  279.         color burst
  280.         off
  281.   06H   640-by-200    2      graphics          *     *    *     *     *
  282.   07H   80-by-25      2
  283. Monochrome monitor only.
  284.      text        *                *           *
  285.   08H   160-by-200   16      graphics                *
  286.   09H   320-by-200   16      graphics                *
  287.   0AH   640-by-200    4      graphics                *
  288.   0BH   reserved
  289.   0CH   reserved
  290.   0DH   320-by-200   16      graphics                     *           *
  291.   0EH   640-by-200   16      graphics                     *           *
  292.   0FH   640-by-350    2
  293. Monochrome monitor only.
  294.      graphics                     *           *
  295.   10H   640-by-350    4      graphics                     *
  296. EGA with 64 KB of RAM.
  297.  
  298.   10H   640-by-350   16      graphics                     *
  299. EGA with 128 KB or more of RAM.
  300.           *
  301.   11H   640-by-480    2      graphics                           *     *
  302.   12H   640-by-480   16      graphics                                 *
  303.   13H   320-by-200  256      graphics                           *     *
  304.   ──────────────────────────────────────────────────────────────────────────
  305.  
  306.  
  307.   ■ The presence or absence of color burst is only significant when a
  308.     composite monitor is being used. For RGB monitors, there is no
  309.     functional difference between modes 00H and 01H or modes 02H and 03H. On
  310.     the CGA, two palettes are available in mode 04H and one in mode 05H.
  311.  
  312.   ■ On the PC/AT, PCjr, and PS/2, if bit 7 of AL is set, the display buffer
  313.     is not cleared when a new mode is selected. On the PC or PC/XT, this
  314.     capability is available only when an EGA or VGA (which have their own
  315.     ROM BIOS) is installed.
  316.  
  317.  
  318. ────────────────────────────────────────────────────────────────────────────
  319. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  320. Function 01H
  321. Set cursor type
  322. ────────────────────────────────────────────────────────────────────────────
  323.  
  324.   Selects the starting and ending lines for the blinking hardware cursor in
  325.   text display modes.
  326.  
  327. Call with:
  328.  
  329.   AH                 = 01H
  330.   CH bits 0─4        = starting line for cursor
  331.   CL bits 0─4        = ending line for cursor
  332.  
  333. Returns:
  334.  
  335.   Nothing
  336.  
  337. Notes:
  338.  
  339.   ■ In text display modes, the video hardware causes the cursor to blink,
  340.     and the blink cannot be disabled. In graphics modes, the hardware cursor
  341.     is not available.
  342.  
  343.   ■ The default values set by the ROM BIOS are:
  344.  
  345.     Display                        Start     End
  346.     ────────────────────────────────────────────────────────────────────────
  347.     monochrome mode 07H            11        12
  348.     text modes 00H─03H              6         7
  349.     ────────────────────────────────────────────────────────────────────────
  350.  
  351.   ■ On the EGA, MCGA, and VGA in text modes 00H─03H, the ROM BIOS accepts
  352.     cursor start and end values as though the character cell were 8 by 8 and
  353.     remaps the values as appropriate for the true character cell dimensions.
  354.     This mapping is called cursor emulation.
  355.  
  356.   ■ You can turn off the cursor in several ways. On the MDA, CGA, and VGA,
  357.     setting register CH = 20H causes the cursor to disappear. Techniques
  358.     that involve setting illegal starting and ending lines for the current
  359.     display mode are unreliable. An alternative is to position the cursor to
  360.     a nondisplayable address, such as (x,y)=(0,25).
  361.  
  362.  
  363. ────────────────────────────────────────────────────────────────────────────
  364. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  365. Function 02H
  366. Set cursor position
  367. ────────────────────────────────────────────────────────────────────────────
  368.  
  369.   Positions the cursor on the display, using text coordinates.
  370.  
  371. Call with:
  372.  
  373.   AH            = 02H
  374.   BH            = page
  375.   DH            = row (y coordinate)
  376.   DL            = column (x coordinate)
  377.  
  378. Returns:
  379.  
  380.   Nothing
  381.  
  382. Notes:
  383.  
  384.   ■ A separate cursor is maintained for each display page, and each can be
  385.     set independently with this function regardless of the currently active
  386.     page. The number of available display pages depends on the video adapter
  387.     and current display mode. See Int 10H Function 05H.
  388.  
  389.   ■ Text coordinates (x,y)=(0,0) are the upper left corner of the screen.
  390.  
  391.   ■ The maximum value for each text coordinate depends on the video adapter
  392.     and current display mode, as follows:
  393.  
  394.     Mode                    Maximum x               Maximum y
  395.     ────────────────────────────────────────────────────────────────────────
  396.     00H                     39                      24
  397.     01H                     39                      24
  398.     02H                     79                      24
  399.     03H                     79                      24
  400.     04H                     39                      24
  401.     05H                     39                      24
  402.     06H                     79                      24
  403.     07H                     79                      24
  404.     08H                     19                      24
  405.     09H                     39                      24
  406.     0AH                     79                      24
  407.     0BH                     reserved
  408.     0CH                     reserved
  409.     0DH                     39                      24
  410.     0EH                     79                      24
  411.     0FH                     79                      24
  412.     10H                     79                      24
  413.     11H                     79                      29
  414.     12H                     79                      29
  415.     13H                     39                      24
  416.     ────────────────────────────────────────────────────────────────────────
  417.  
  418.  
  419. ────────────────────────────────────────────────────────────────────────────
  420. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  421. Function 03H
  422. Get cursor position
  423. ────────────────────────────────────────────────────────────────────────────
  424.  
  425.   Obtains the current position of the cursor on the display, in text
  426.   coordinates.
  427.  
  428. Call with:
  429.  
  430.   AH            = 03H
  431.   BH            = page
  432.  
  433. Returns:
  434.  
  435.   CH            = starting line for cursor
  436.   CL            = ending line for cursor
  437.   DH            = row (y coordinate)
  438.   DL            = column (x coordinate)
  439.  
  440. Note:
  441.  
  442.   ■ A separate cursor is maintained for each display page, and each can be
  443.     inspected independently with this function regardless of the currently
  444.     active page. The number of available display pages depends on the video
  445.     adapter and current display mode. See Int 10H Function 05H.
  446.  
  447.  
  448. ────────────────────────────────────────────────────────────────────────────
  449. Int 10H                                                   [CGA] [PCjr] [EGA]
  450. Function 04H
  451. Get light pen position
  452. ────────────────────────────────────────────────────────────────────────────
  453.  
  454.   Obtains the current status and position of the light pen.
  455.  
  456. Call with:
  457.  
  458.   AH            = 04H
  459.  
  460. Returns:
  461.  
  462.   AH            = 00H       if light pen not down/not triggered
  463.                   01H       if light pen down/triggered
  464.   BX            = pixel column (graphics x coordinate)
  465.   CH            = pixel row (graphics y coordinate, modes 04H─06H)
  466.   CX            = pixel row (graphics y coordinate, modes 0DH─13H)
  467.   DH            = character row (text y coordinate)
  468.   DL            = character column (text x coordinate)
  469.  
  470. Notes:
  471.  
  472.   ■ The range of text and graphics coordinates returned by this function
  473.     depends on the current display mode.
  474.  
  475.   ■ On the CGA, the graphics coordinates returned by this function are not
  476.     continuous. The y coordinate is always a multiple of two; the x
  477.     coordinate is either a multiple of four (for 320-by-200 graphics modes)
  478.     or a multiple of eight (for 640-by-200 graphics modes).
  479.  
  480.   ■ Careful selection of background and foreground colors is necessary to
  481.     obtain maximum sensitivity from the light pen across the full screen
  482.     width.
  483.  
  484.  
  485. ────────────────────────────────────────────────────────────────────────────
  486. Int 10H                                      [CGA] [PCjr] [EGA] [MCGA] [VGA]
  487. Function 05H
  488. Set display page
  489. ────────────────────────────────────────────────────────────────────────────
  490.  
  491.   Selects the active display page for the video display.
  492.  
  493. Call with:
  494.  
  495.   For CGA, EGA, MCGA, VGA
  496.  
  497.   AH            = 05H
  498.   AL            = page
  499.  
  500.                   0─7       for modes 00H and 01H (CGA, EGA, MCGA, VGA)
  501.                   0─3       for modes 02H and 03H (CGA)
  502.                   0─7       for modes 02H and 03H (EGA, MCGA, VGA)
  503.                   0─7       for mode 07H (EGA, VGA)
  504.                   0─7       for mode 0DH (EGA, VGA)
  505.                   0─3       for mode 0EH (EGA, VGA)
  506.                   0─1       for mode 0FH (EGA, VGA)
  507.                   0─1       for mode 10H (EGA, VGA)
  508.  
  509.   For PCjr only
  510.  
  511.   AH            = 05H
  512.   AL            = subfunction
  513.                   80H = read CRT/CPU page registers
  514.                   81H = set CPU page register
  515.                   82H = set CRT page register
  516.                   83H = set both CPU and CRT page registers
  517.   BH            = CRT page (Subfunctions 82H and 83H)
  518.   BL            = CPU page (Subfunctions 81H and 83H)
  519.  
  520. Returns:
  521.  
  522.   If CGA, EGA, MCGA, or VGA adapter
  523.  
  524.   Nothing
  525.  
  526.   If PCjr and if function called with AL = 80H─83H
  527.  
  528.   BH            = CRT page register
  529.   BL            = CPU page register
  530.  
  531. Notes:
  532.  
  533.   ■ Video mode and adapter combinations not listed above support one display
  534.     page (for example, a Monochrome Adapter in mode 7).
  535.  
  536.   ■ Switching between pages does not affect their contents. In addition,
  537.     text can be written to any video page with Int 10H Functions 02H, 09H,
  538.     and 0AH, regardless of the page currently being displayed.
  539.  
  540.   ■ On the PCjr, the CPU page determines the part of the physical memory
  541.     region 00000H─1FFFFH that will be hardware mapped onto 16 KB of memory
  542.     beginning at segment B800H. The CRT page determines the starting address
  543.     of the physical memory used by the video controller to refresh the
  544.     display. Smooth animation effects can be achieved by manipulation of
  545.     these registers. Programs that write directly to the B800H segment can
  546.     reach only the first 16 KB of the video refresh buffer. Programs
  547.     requiring direct access to the entire 32 KB buffer in modes 09H and 0AH
  548.     can obtain the current CRT page from the ROM BIOS variable PAGDAT at
  549.     0040:008AH.
  550.  
  551.  
  552. ────────────────────────────────────────────────────────────────────────────
  553. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  554. Function 06H
  555. Initialize or scroll window up
  556. ────────────────────────────────────────────────────────────────────────────
  557.  
  558.   Initializes a specified window of the display to ASCII blank characters
  559.   with a given attribute or scrolls up the contents of a window by a
  560.   specified number of lines.
  561.  
  562. Call with:
  563.  
  564.   AH            = 06H
  565.   AL            = number of lines to scroll (if zero, entire window is
  566.                   blanked)
  567.   BH            = attribute to be used for blanked area
  568.   CH            = y coordinate, upper left corner of window
  569.   CL            = x coordinate, upper left corner of window
  570.   DH            = y coordinate, lower right corner of window
  571.   DL            = x coordinate, lower right corner of window
  572.  
  573. Returns:
  574.  
  575.   Nothing
  576.  
  577. Notes:
  578.  
  579.   ■ In video modes that support multiple pages, this function affects only
  580.     the page currently being displayed.
  581.  
  582.   ■ If AL contains a value other than 00H, the area within the specified
  583.     window is scrolled up by the requested number of lines. Text that is
  584.     scrolled beyond the top of the window is lost. The new lines that appear
  585.     at the bottom of the window are filled with ASCII blanks carrying the
  586.     attribute specified by register BH.
  587.  
  588.   ■ To scroll down the contents of a window, see Int 10H Function 07H.
  589.  
  590.  
  591. ────────────────────────────────────────────────────────────────────────────
  592. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  593. Function 07H
  594. Initialize or scroll window down
  595. ────────────────────────────────────────────────────────────────────────────
  596.  
  597.   Initializes a specified window of the display to ASCII blank characters
  598.   with a given attribute, or scrolls down the contents of a window by a
  599.   specified number of lines.
  600.  
  601. Call with:
  602.  
  603.   AH            = 07H
  604.   AL            = number of lines to scroll (if zero, entire window is
  605.                   blanked)
  606.   BH            = attribute to be used for blanked area
  607.   CH            = y coordinate, upper left corner of window
  608.   CL            = x coordinate, upper left corner of window
  609.   DH            = y coordinate, lower right corner of window
  610.   DL            = x coordinate, lower right corner of window
  611.  
  612. Returns:
  613.  
  614.   Nothing
  615.  
  616. Notes:
  617.  
  618.   ■ In video modes that support multiple pages, this function affects only
  619.     the page currently being displayed.
  620.  
  621.   ■ If AL contains a value other than 00H, the area within the specified
  622.     window is scrolled down by the requested number of lines. Text that is
  623.     scrolled beyond the bottom of the window is lost. The new lines that
  624.     appear at the top of the window are filled with ASCII blanks carrying
  625.     the attribute specified by register BH.
  626.  
  627.   ■ To scroll up the contents of a window, see Int 10H Function 06H.
  628.  
  629.  
  630. ────────────────────────────────────────────────────────────────────────────
  631. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  632. Function 08H
  633. Read character and attribute at cursor
  634. ────────────────────────────────────────────────────────────────────────────
  635.  
  636.   Obtains the ASCII character and its attribute at the current cursor
  637.   position for the specified display page.
  638.  
  639. Call with:
  640.  
  641.   AH            = 08H
  642.   BH            = page
  643.  
  644. Returns:
  645.  
  646.   AH            = attribute
  647.   AL            = character
  648.  
  649. Note:
  650.  
  651.   ■ In video modes that support multiple pages, characters and their
  652.     attributes may be read from any page, regardless of the page currently
  653.     being displayed.
  654.  
  655.  
  656. ────────────────────────────────────────────────────────────────────────────
  657. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  658. Function 09H
  659. Write character and attribute at cursor
  660. ────────────────────────────────────────────────────────────────────────────
  661.  
  662.   Writes an ASCII character and its attribute to the display at the current
  663.   cursor position.
  664.  
  665. Call with:
  666.  
  667.   AH            = 09H
  668.   AL            = character
  669.   BH            = page
  670.   BL            = attribute (text modes) or color (graphics modes)
  671.   CX            = count of characters to write (replication factor)
  672.  
  673. Returns:
  674.  
  675.   Nothing
  676.  
  677. Notes:
  678.  
  679.   ■ In graphics modes, the replication factor in CX produces a valid result
  680.     only for the current row. If more characters are written than there are
  681.     remaining columns in the current row, the result is unpredictable.
  682.  
  683.   ■ All values of AL result in some sort of display; control characters,
  684.     including bell, backspace, carriage return, and line feed, are not
  685.     recognized as special characters and do not affect the cursor position.
  686.  
  687.   ■ After a character is written, the cursor must be moved explicitly with
  688.     Int 10H Function 02H to the next position.
  689.  
  690.   ■ To write a character without changing the attribute at the current
  691.     cursor position, use Int 10H Function 0AH.
  692.  
  693.   ■ If this function is used to write characters in graphics mode and bit 7
  694.     of BL is set (1), the character will be exclusive-OR'd (XOR) with the
  695.     current display contents. This feature can be used to write characters
  696.     and then "erase" them.
  697.  
  698.   ■ For the CGA and PCjr in graphics modes 04H─06H, the bit patterns for
  699.     character codes 80H─FFH are obtained from a table whose address is
  700.     stored in the vector for Int 1FH. On the PCjr, the address of the table
  701.     for character codes 00H─7FH is stored in the vector for Int 44H.
  702.     Alternative character sets may be installed by loading them into memory
  703.     and updating this vector.
  704.  
  705.   ■ For the EGA, MCGA, and VGA in graphics modes, the address of the
  706.     character definition table is stored in the vector for Int 43H. See Int
  707.     10H Function 11H.
  708.  
  709.  
  710. ────────────────────────────────────────────────────────────────────────────
  711. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  712. Function 0AH (10)
  713. Write character at cursor
  714. ────────────────────────────────────────────────────────────────────────────
  715.  
  716.   Writes an ASCII character to the display at the current cursor position.
  717.   The character receives the attribute of the previous character displayed
  718.   at the same position.
  719.  
  720. Call with:
  721.  
  722.   AH            = 0AH
  723.   AL            = character
  724.   BH            = page
  725.   BL            = color (graphics modes, PCjr only)
  726.   CX            = count of characters to write (replication factor)
  727.  
  728. Returns:
  729.  
  730.   Nothing
  731.  
  732. Notes:
  733.  
  734.   ■ In graphics modes, the replication factor in CX produces a valid result
  735.     only for the current row. If more characters are written than there are
  736.     remaining columns in the current row, the result is unpredictable.
  737.  
  738.   ■ All values of AL result in some sort of display; control characters,
  739.     including bell, backspace, carriage return, and line feed, are not
  740.     recognized as special characters and do not affect the cursor position.
  741.  
  742.   ■ After a character is written, the cursor must be moved explicitly with
  743.     Int 10H Function 02H to the next position.
  744.  
  745.   ■ To write a character and attribute at the current cursor position, use
  746.     Int 10H Function 09H.
  747.  
  748.   ■ If this function is used to write characters in graphics mode and bit 7
  749.     of BL is set (1), the character will be exclusive-OR'd (XOR) with the
  750.     current display contents. This feature can be used to write characters
  751.     and then "erase" them.
  752.  
  753.   ■ For the CGA and PCjr in graphics modes 04H─06H, the bit patterns for
  754.     character codes 80H─FFH are obtained from a table whose address is
  755.     stored in the vector for Int 1FH. On the PCjr, the address of the table
  756.     for character codes 00H─7FH is stored in the vector for Int 44H.
  757.     Alternative character sets may be installed by loading them into memory
  758.     and updating this vector.
  759.  
  760.   ■ For the EGA, MCGA, and VGA in graphics modes, the address of the
  761.     character definition table is stored in the vector for Int 43H. See Int
  762.     10H Function 11H.
  763.  
  764.  
  765. ────────────────────────────────────────────────────────────────────────────
  766. Int 10H                                      [CGA] [PCjr] [EGA] [MCGA] [VGA]
  767. Function 0BH (11)
  768. Set palette, background, or border
  769. ────────────────────────────────────────────────────────────────────────────
  770.  
  771.   Selects a palette, background, or border color.
  772.  
  773. Call with:
  774.  
  775.   To set the background color and border color for graphics modes or the
  776.   border color for text modes
  777.  
  778.   AH            = 0BH
  779.   BH            = 00H
  780.   BL            = color
  781.  
  782.   To select the palette (320-by-200 4-color graphics modes)
  783.  
  784.   AH            = 0BH
  785.   BH            = 01H
  786.   BL            = palette (see Notes)
  787.  
  788. Returns:
  789.  
  790.   Nothing
  791.  
  792. Notes:
  793.  
  794.   ■ In text modes, this function selects only the border color. The
  795.     background color of each individual character is controlled by the upper
  796.     4 bits of that character's attribute byte.
  797.  
  798.   ■ On the CGA and EGA, this function is valid for palette selection only in
  799.     320-by-200 4-color graphics modes.
  800.  
  801.   ■ In 320-by-200 4-color graphics modes, if register BH = 01H, the
  802.     following palettes may be selected:
  803.  
  804.     Palette           Pixel value       Color
  805.     ────────────────────────────────────────────────────────────────────────
  806.     0                 0                 same as background
  807.                       1                 green
  808.                       2                 red
  809.                       3                 brown or yellow
  810.     1                 0                 same as background
  811.                       1                 cyan
  812.                       2                 magenta
  813.                       3                 white
  814.     ────────────────────────────────────────────────────────────────────────
  815.  
  816.   ■ On the CGA in 640-by-200 2-color graphics mode, the background color
  817.     selected with this function actually controls the display color for
  818.     nonzero pixels; zero pixels are always displayed as black.
  819.  
  820.   ■ On the PCjr in 640-by-200 2-color graphics mode, if BH = 00H and bit 0
  821.     of register BL is cleared, pixel value 1 is displayed as white; if bit 0
  822.     is set, pixel value 1 is displayed as black.
  823.  
  824.   ■ See also Int 10H Function 10H, which is used for palette programming on
  825.     the PCjr, EGA, MCGA, and VGA.
  826.  
  827.  
  828. ────────────────────────────────────────────────────────────────────────────
  829. Int 10H                                      [CGA] [PCjr] [EGA] [MCGA] [VGA]
  830. Function 0CH (12)
  831. Write graphics pixel
  832. ────────────────────────────────────────────────────────────────────────────
  833.  
  834.   Draws a point on the display at the specified graphics coordinates.
  835.  
  836. Call with:
  837.  
  838.   AH            = 0CH
  839.   AL            = pixel value
  840.   BH            = page
  841.   CX            = column (graphics x coordinate)
  842.   DX            = row (graphics y coordinate)
  843.  
  844. Returns:
  845.  
  846.   Nothing
  847.  
  848. Notes:
  849.  
  850.   ■ The range of valid pixel values and (x,y) coordinates depends on the
  851.     current video mode.
  852.  
  853.   ■ If bit 7 of AL is set, the new pixel value will be exclusive-OR'd (XOR)
  854.     with the current contents of the pixel.
  855.  
  856.   ■ Register BH is ignored for display modes that support only one page.
  857.  
  858.  
  859. ────────────────────────────────────────────────────────────────────────────
  860. Int 10H                                      [CGA] [PCjr] [EGA] [MCGA] [VGA]
  861. Function 0DH (13)
  862. Read graphics pixel
  863. ────────────────────────────────────────────────────────────────────────────
  864.  
  865.   Obtains the current value of the pixel on the display at the specified
  866.   graphics coordinates.
  867.  
  868. Call with:
  869.  
  870.   AH            = 0DH
  871.   BH            = page
  872.   CX            = column (graphics x coordinate)
  873.   DX            = row (graphics y coordinate)
  874.  
  875. Returns:
  876.  
  877.   AL            = pixel value
  878.  
  879. Notes:
  880.  
  881.   ■ The range of valid (x,y) coordinates and possible pixel values depends
  882.     on the current video mode.
  883.  
  884.   ■ Register BH is ignored for display modes that support only one page.
  885.  
  886.  
  887. ────────────────────────────────────────────────────────────────────────────
  888. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  889. Function 0EH (14)
  890. Write character in teletype mode
  891. ────────────────────────────────────────────────────────────────────────────
  892.  
  893.   Writes an ASCII character to the display at the current cursor position,
  894.   using the specified color (if in graphics modes), and then increments the
  895.   cursor position appropriately.
  896.  
  897. Call with:
  898.  
  899.   AH            = 0EH
  900.   AL            = character
  901.   BH            = page
  902.   BL            = foreground color (graphics modes)
  903.  
  904. Returns:
  905.  
  906.   Nothing
  907.  
  908. Notes:
  909.  
  910.   ■ The special ASCII codes for bell (07H), backspace (08H), carriage return
  911.     (0DH), and line feed (0AH) are recognized, and the appropriate action is
  912.     taken. All other characters are written to the display (even if they are
  913.     control characters), and the cursor is moved to the next position.
  914.  
  915.   ■ In video modes that support multiple pages, characters can be written to
  916.     any page, regardless of the page currently being displayed.
  917.  
  918.   ■ Line wrapping and scrolling are provided. If the cursor is at the end of
  919.     a line, it is moved to the beginning of the next line. If the cursor
  920.     reaches the end of the last line on the screen, the screen is scrolled
  921.     up by one line and the cursor is placed at the beginning of a new blank
  922.     line. The attribute for the entire new line is taken from the last
  923.     character that was written on the preceding line.
  924.  
  925.   ■ The default MS-DOS console driver (CON) uses this function to write text
  926.     to the screen. You cannot use this function to specify the attribute of
  927.     a character. One method of writing a character to the screen with a
  928.     specific attribute is to first write an ASCII blank (20H) with the
  929.     desired attribute at the current cursor location using Int 10H Function
  930.     09H and then write the actual character with Int 10H Function 0EH.
  931.     This technique, although somewhat clumsy, does not require the program
  932.     to explicitly handle line wrapping and scrolling.
  933.  
  934.   ■ See also Int 10H Function 13H.
  935.  
  936.  
  937. ────────────────────────────────────────────────────────────────────────────
  938. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  939. Function 0FH (15)
  940. Get video mode
  941. ────────────────────────────────────────────────────────────────────────────
  942.  
  943.   Obtains the current display mode of the active video controller.
  944.  
  945. Call with:
  946.  
  947.   AH            = 0FH
  948.  
  949. Returns:
  950.  
  951.   AH            = number of character columns on screen
  952.   AL            = display mode (see Int 10H Function 00H)
  953.   BH            = active display page
  954.  
  955. Note:
  956.  
  957.   ■ This function can be called to obtain the screen width before clearing
  958.     the screen with Int 10H Functions 06H or 07H.
  959.  
  960.  
  961. ────────────────────────────────────────────────────────────────────────────
  962. Int 10H                                            [PCjr] [EGA] [MCGA] [VGA]
  963. Function 10H (16) Subfunction 00H
  964. Set palette register
  965. ────────────────────────────────────────────────────────────────────────────
  966.  
  967.   Sets the correspondence of a palette register to a displayable color.
  968.  
  969. Call with:
  970.  
  971.   On the PCjr, EGA, or VGA
  972.  
  973.   AH            = 10H
  974.   AL            = 00H
  975.   BH            = color value
  976.   BL            = palette register (00─0FH)
  977.  
  978.   On the MCGA
  979.  
  980.   AH            = 10H
  981.   AL            = 00H
  982.   BX            = 0712H
  983.  
  984. Returns:
  985.  
  986.   Nothing
  987.  
  988. Note:
  989.  
  990.   ■ On the MCGA, this function can only be called with BX = 0712H and
  991.     selects a color register set with eight consistent colors.
  992.  
  993.  
  994. ────────────────────────────────────────────────────────────────────────────
  995. Int 10H                                                   [PCjr] [EGA] [VGA]
  996. Function 10H (16) Subfunction 01H
  997. Set border color
  998. ────────────────────────────────────────────────────────────────────────────
  999.  
  1000.   Controls the color of the screen border (overscan).
  1001.  
  1002. Call with:
  1003.  
  1004.   AH            = 10H
  1005.   AL            = 01H
  1006.   BH            = color value
  1007.  
  1008. Returns:
  1009.  
  1010.   Nothing
  1011.  
  1012.  
  1013. ────────────────────────────────────────────────────────────────────────────
  1014. Int 10H                                                   [PCjr] [EGA] [VGA]
  1015. Function 10H (16) Subfunction 02H
  1016. Set palette and border
  1017. ────────────────────────────────────────────────────────────────────────────
  1018.  
  1019.   Sets all palette registers and the border color (overscan) in one
  1020.   operation.
  1021.  
  1022. Call with:
  1023.  
  1024.   AH            = 10H
  1025.   AL            = 02H
  1026.   ES:DX         = segment:offset of color list
  1027.  
  1028. Returns:
  1029.  
  1030.   Nothing
  1031.  
  1032. Notes:
  1033.  
  1034.   ■ The color list is 17 bytes long. The first 16 bytes are the color values
  1035.     to be loaded into palette registers 0─15, and the last byte is stored in
  1036.     the border color register.
  1037.  
  1038.   ■ In 16-color graphics modes, the following default palette is set up:
  1039.  
  1040.     Pixel value                         Color
  1041.     ────────────────────────────────────────────────────────────────────────
  1042.     01H                                 blue
  1043.     02H                                 green
  1044.     03H                                 cyan
  1045.     04H                                 red
  1046.     05H                                 magenta
  1047.     06H                                 brown
  1048.     07H                                 white
  1049.     08H                                 gray
  1050.     09H                                 light blue
  1051.     0AH                                 light green
  1052.     0BH                                 light cyan
  1053.     0CH                                 light red
  1054.     0DH                                 light magenta
  1055.     0EH                                 yellow
  1056.     0FH                                 intense white
  1057.     ────────────────────────────────────────────────────────────────────────
  1058.  
  1059.  
  1060. ────────────────────────────────────────────────────────────────────────────
  1061. Int 10H                                            [PCjr] [EGA] [MCGA] [VGA]
  1062. Function 10H (16) Subfunction 03H
  1063. Toggle blink/intensity bit
  1064. ────────────────────────────────────────────────────────────────────────────
  1065.  
  1066.   Determines whether the most significant bit of a character attribute will
  1067.   select blinking or intensified display.
  1068.  
  1069. Call with:
  1070.  
  1071.   AH            = 10H
  1072.   AL            = 03H
  1073.   BL            = blink/intensity toggle
  1074.                   0 = enable intensity
  1075.                   1 = enable blinking
  1076.  
  1077. Returns:
  1078.  
  1079.   Nothing
  1080.  
  1081.  
  1082. ────────────────────────────────────────────────────────────────────────────
  1083. Int 10H                                                                [VGA]
  1084. Function 10H (16) Subfunction 07H
  1085. Get palette register
  1086. ────────────────────────────────────────────────────────────────────────────
  1087.  
  1088.   Returns the color associated with the specified palette register.
  1089.  
  1090. Call with:
  1091.  
  1092.   AH            = 10H
  1093.   AL            = 07H
  1094.   BL            = palette register
  1095.  
  1096. Returns:
  1097.  
  1098.   BH            = color
  1099.  
  1100.  
  1101. ────────────────────────────────────────────────────────────────────────────
  1102. Int 10H                                                                [VGA]
  1103. Function 10H (16) Subfunction 08H
  1104. Get border color
  1105. ────────────────────────────────────────────────────────────────────────────
  1106.  
  1107.   Returns the current border color (overscan).
  1108.  
  1109. Call with:
  1110.  
  1111.   AH            = 10H
  1112.   AL            = 08H
  1113.  
  1114. Returns:
  1115.  
  1116.   BH            = color
  1117.  
  1118.  
  1119. ────────────────────────────────────────────────────────────────────────────
  1120. Int 10H                                                                [VGA]
  1121. Function 10H (16) Subfunction 09H
  1122. Get palette and border
  1123. ────────────────────────────────────────────────────────────────────────────
  1124.  
  1125.   Gets the contents of all palette registers and the border color (overscan)
  1126.   in one operation.
  1127.  
  1128. Call with:
  1129.  
  1130.   AH            = 10H
  1131.   AL            = 09H
  1132.   ES:DX         = segment:offset of 17-byte buffer
  1133.  
  1134. Returns:
  1135.  
  1136.   ES:DX         = segment:offset of buffer
  1137.  
  1138.   and buffer contains palette values in bytes 00H─0FH and border color in
  1139.   byte 10H.
  1140.  
  1141.  
  1142. ────────────────────────────────────────────────────────────────────────────
  1143. Int 10H                                                         [MCGA] [VGA]
  1144. Function 10H (16) Subfunction 10H (16)
  1145. Set color register
  1146. ────────────────────────────────────────────────────────────────────────────
  1147.  
  1148.   Programs an individual color register with a red-green-blue (RGB)
  1149.   combination.
  1150.  
  1151. Call with:
  1152.  
  1153.   AH            = 10H
  1154.   AL            = 10H
  1155.   BX            = color register
  1156.   CH            = green value
  1157.   CL            = blue value
  1158.   DH            = red value
  1159.  
  1160. Returns:
  1161.  
  1162.   Nothing
  1163.  
  1164. Note:
  1165.  
  1166.   ■ If gray-scale summing is enabled, the weighted gray-scale value is
  1167.     calculated as described under Int 10H Function 10H Subfunction 1BH and
  1168.     is stored into all three components of the color register. See also Int
  1169.     10H Function 12H Subfunction 33H.
  1170.  
  1171.  
  1172. ────────────────────────────────────────────────────────────────────────────
  1173. Int 10H                                                         [MCGA] [VGA]
  1174. Function 10H (16) Subfunction 12H (18)
  1175. Set block of color registers
  1176. ────────────────────────────────────────────────────────────────────────────
  1177.  
  1178.   Programs a group of consecutive color registers in one operation.
  1179.  
  1180. Call with:
  1181.  
  1182.   AH            = 10H
  1183.   AL            = 12H
  1184.   BX            = first color register
  1185.   CX            = number of color registers
  1186.   ES:DX         = segment:offset of color table
  1187.  
  1188. Returns:
  1189.  
  1190.   Nothing
  1191.  
  1192. Notes:
  1193.  
  1194.   ■ The table consists of a series of 3-byte entries, one entry per color
  1195.     register to be programmed. The bytes of an individual entry specify the
  1196.     red, green, and blue values (in that order) for the associated color
  1197.     register.
  1198.  
  1199.   ■ If gray-scale summing is enabled, the weighted gray-scale value for each
  1200.     register is calculated as described under Int 10H Function 10H
  1201.     Subfunction 1BH and is stored into all three components of the color
  1202.     register. See also Int 10H Function 12H Subfunction 33H.
  1203.  
  1204.  
  1205. ────────────────────────────────────────────────────────────────────────────
  1206. Int 10H                                                                [VGA]
  1207. Function 10H (16) Subfunction 13H (19)
  1208. Set color page state
  1209. ────────────────────────────────────────────────────────────────────────────
  1210.  
  1211.   Selects the paging mode for the color registers, or selects an individual
  1212.   page of color registers.
  1213.  
  1214. Call with:
  1215.  
  1216.   To select the paging mode
  1217.  
  1218.   AH            = 10H
  1219.   AL            = 13H
  1220.   BH            = paging mode
  1221.                   00H       for 4 pages of 64 registers
  1222.                   01H       for 16 pages of 16 registers
  1223.  
  1224.   BL            = 00H
  1225.  
  1226.   To select a color register page
  1227.  
  1228.   AH            = 10H
  1229.   AL            = 13H
  1230.   BH            = page
  1231.   BL            = 01H
  1232.  
  1233. Returns:
  1234.  
  1235.   Nothing
  1236.  
  1237. Note:
  1238.  
  1239.   ■ This function is not valid in mode 13H (320-by-200 256-color graphics).
  1240.  
  1241.  
  1242. ────────────────────────────────────────────────────────────────────────────
  1243. Int 10H                                                         [MCGA] [VGA]
  1244. Function 10H (16) Subfunction 15H (21)
  1245. Get color register
  1246. ────────────────────────────────────────────────────────────────────────────
  1247.  
  1248.   Returns the contents of a color register as its red, green, and blue
  1249.   components.
  1250.  
  1251. Call with:
  1252.  
  1253.   AH            = 10H
  1254.   AL            = 15H
  1255.   BX            = color register
  1256.  
  1257. Returns:
  1258.  
  1259.   CH            = green value
  1260.   CL            = blue value
  1261.   DH            = red value
  1262.  
  1263.  
  1264. ────────────────────────────────────────────────────────────────────────────
  1265. Int 10H                                                         [MCGA] [VGA]
  1266. Function 10H (16) Subfunction 17H (23)
  1267. Get block of color registers
  1268. ────────────────────────────────────────────────────────────────────────────
  1269.  
  1270.   Allows the red, green, and blue components associated with each of a set
  1271.   of color registers to be read in one operation.
  1272.  
  1273. Call with:
  1274.  
  1275.   AH            = 10H
  1276.   AL            = 17H
  1277.   BX            = first color register
  1278.   CX            = number of color registers
  1279.   ES:DX         = segment:offset of buffer to receive color list
  1280.  
  1281. Returns:
  1282.  
  1283.   ES:DX         = segment:offset of buffer and buffer contains color list
  1284.  
  1285. Note:
  1286.  
  1287.   ■ The color list returned in the caller's buffer consists of a series of
  1288.     3-byte entries corresponding to the color registers. Each 3-byte entry
  1289.     contains the register's red, green, and blue components in that order.
  1290.  
  1291.  
  1292. ────────────────────────────────────────────────────────────────────────────
  1293. Int 10H                                                                [VGA]
  1294. Function 10H (16) Subfunction 1AH (26)
  1295. Get color page state
  1296. ────────────────────────────────────────────────────────────────────────────
  1297.  
  1298.   Returns the color register paging mode and current color page.
  1299.  
  1300. Call with:
  1301.  
  1302.   AH            = 10H
  1303.   AL            = 1AH
  1304.  
  1305. Returns:
  1306.  
  1307.   BH            = color page
  1308.   BL            = paging mode
  1309.                   00H       if 4 pages of 64 registers
  1310.                   01H       if 16 pages of 16 registers
  1311.  
  1312. Note:
  1313.  
  1314.   ■ See Int 10H Function 10H Subfunction 13H, which allows selection of the
  1315.     paging mode or current color page.
  1316.  
  1317.  
  1318. ────────────────────────────────────────────────────────────────────────────
  1319. Int 10H                                                         [MCGA] [VGA]
  1320. Function 10H (16) Subfunction 1BH (27)
  1321. Set gray-scale values
  1322. ────────────────────────────────────────────────────────────────────────────
  1323.  
  1324.   Transforms the red, green, and blue values of one or more color registers
  1325.   into the gray-scale equivalents.
  1326.  
  1327. Call with:
  1328.  
  1329.   AH            = 10H
  1330.   AL            = 1BH
  1331.   BX            = first color register
  1332.   CX            = number of color registers
  1333.  
  1334. Returns:
  1335.  
  1336.   Nothing
  1337.  
  1338. Note:
  1339.  
  1340.   ■ For each color register, the weighted sum of its red, green, and blue
  1341.     values is calculated (30% red + 59% green + 11% blue) and written back
  1342.     into all three components of the color register. The original red,
  1343.     green, and blue values are lost.
  1344.  
  1345.  
  1346. ────────────────────────────────────────────────────────────────────────────
  1347. Int 10H                                                   [EGA] [MCGA] [VGA]
  1348. Function 11H (17) Subfunctions 00H and 10H (16)
  1349. Load user font
  1350. ────────────────────────────────────────────────────────────────────────────
  1351.  
  1352.   Loads the user's font (character definition) table into the specified
  1353.   block of character generator RAM.
  1354.  
  1355. Call with:
  1356.  
  1357.   AH            = 11H
  1358.   AL            = 00H or 10H (see Notes)
  1359.   BH            = points (bytes per character)
  1360.   BL            = block
  1361.   CX            = number of characters defined by table
  1362.   DX            = first character code in table
  1363.   ES:BP         = segment:offset of font table
  1364.  
  1365. Returns:
  1366.  
  1367.   Nothing
  1368.  
  1369. Notes:
  1370.  
  1371.   ■ This function provides font selection in text (alphanumeric) display
  1372.     modes. For font selection in graphics (all-points-addressable) modes,
  1373.     see Int 10H Function 11H Subfunctions 20H─24H.
  1374.  
  1375.   ■ If AL = 10H, page 0 must be active. The points (bytes per character),
  1376.     rows, and length of the refresh buffer are recalculated. The controller
  1377.     is reprogrammed with the maximum scan line (points - 1), cursor start
  1378.     (points - 2), cursor end (points - 1), vertical display end
  1379.     ((rows*points) - 1), and underline location (points - 1, mode 7 only).
  1380.  
  1381.     If Subfunction 10H is called at any time other than immediately after a
  1382.     mode set, the results are unpredictable.
  1383.  
  1384.   ■ On the MCGA, a Subfunction 00H call should be followed by a Subfunction
  1385.     03H call so that the ROM BIOS will load the font into the character
  1386.     generator's internal font pages.
  1387.  
  1388.   ■ Subfunction 10H is reserved on the MCGA. If it is called, Subfunction
  1389.     00H is executed.
  1390.  
  1391.  
  1392. ────────────────────────────────────────────────────────────────────────────
  1393. Int 10H                                                          [EGA] [VGA]
  1394. Function 11H (17) Subfunctions 01H and 11H (17)
  1395. Load ROM 8-by-14 font
  1396. ────────────────────────────────────────────────────────────────────────────
  1397.  
  1398.   Loads the ROM BIOS default 8-by-14 font table into the specified block of
  1399.   character generator RAM.
  1400.  
  1401. Call with:
  1402.  
  1403.   AH            = 11H
  1404.   AL            = 01H or 11H (see Notes)
  1405.   BL            = block
  1406.  
  1407. Returns:
  1408.  
  1409.   Nothing
  1410.  
  1411. Notes:
  1412.  
  1413.   ■ This function provides font selection in text (alphanumeric) display
  1414.     modes. For font selection in graphics (all-points-addressable) modes,
  1415.     see Int 10H Function 11H Subfunctions 20H─24H.
  1416.  
  1417.   ■ If AL = 11H, page 0 must be active. The points (bytes per character),
  1418.     rows, and length of the refresh buffer are recalculated. The controller
  1419.     is reprogrammed with the maximum scan line (points - 1), cursor start
  1420.     (points - 2), cursor end (points - 1), vertical display end
  1421.     ((rows*points) - 1), and underline location (points - 1, mode 7 only).
  1422.  
  1423.     If Subfunction 11H is called at any time other than immediately after a
  1424.     mode set, the results are unpredictable.
  1425.  
  1426.   ■ Subfunctions 01H and 11H are reserved on the MCGA. If either is called,
  1427.     Subfunction 04H is executed.
  1428.  
  1429.  
  1430. ────────────────────────────────────────────────────────────────────────────
  1431. Int 10H                                                   [EGA] [MCGA] [VGA]
  1432. Function 11H (17) Subfunctions 02H and 12H (18)
  1433. Load ROM 8-by-8 font
  1434. ────────────────────────────────────────────────────────────────────────────
  1435.  
  1436.   Loads the ROM BIOS default 8-by-8 font table into the specified block of
  1437.   character generator RAM.
  1438.  
  1439. Call with:
  1440.  
  1441.   AH            = 11H
  1442.   AL            = 02H or 12H (see Notes)
  1443.   BL            = block
  1444.  
  1445. Returns:
  1446.  
  1447.   Nothing
  1448.  
  1449. Notes:
  1450.  
  1451.   ■ This function provides font selection in text (alphanumeric) display
  1452.     modes. For font selection in graphics (all-points-addressable) modes,
  1453.     see Int 10H Function 11H Subfunctions 20H─24H.
  1454.  
  1455.   ■ If AL = 12H, page 0 must be active. The points (bytes per character),
  1456.     rows, and length of the refresh buffer are recalculated. The controller
  1457.     is reprogrammed with the maximum scan line (points - 1), cursor start
  1458.     (points - 2), cursor end (points - 1), vertical display end
  1459.     ((rows*points) - 1), and underline location (points - 1, mode 7 only).
  1460.  
  1461.     If Subfunction 12H is called at any time other than immediately after a
  1462.     mode set, the results are unpredictable.
  1463.  
  1464.   ■ On the MCGA, a Subfunction 02H call should be followed by a Subfunction
  1465.     03H call, so that the ROM BIOS will load the font into the character
  1466.     generator's internal font pages.
  1467.  
  1468.   ■ Subfunction 12H is reserved on the MCGA. If it is called, Subfunction
  1469.     02H is executed.
  1470.  
  1471.  
  1472. ────────────────────────────────────────────────────────────────────────────
  1473. Int 10H                                                   [EGA] [MCGA] [VGA]
  1474. Function 11H (17) Subfunction 03H
  1475. Set block specifier
  1476. ────────────────────────────────────────────────────────────────────────────
  1477.  
  1478.   Determines the character blocks selected by bit 3 of character attribute
  1479.   bytes in alphanumeric (text) display modes.
  1480.  
  1481. Call with:
  1482.  
  1483.   AH            = 11H
  1484.   AL            = 03H
  1485.   BL            = character generator block select code (see Notes)
  1486.  
  1487. Returns:
  1488.  
  1489.   Nothing
  1490.  
  1491. Notes:
  1492.  
  1493.   ■ On the EGA and MCGA, the bits of BL are used as follows:
  1494.  
  1495.     Bits      Significance
  1496.     ────────────────────────────────────────────────────────────────────────
  1497.     0─1       character block selected by attribute bytes with bit 3 = 0
  1498.     2─3       character block selected by attribute bytes with bit 3 = 1
  1499.     4─7       not used (should be 0)
  1500.     ────────────────────────────────────────────────────────────────────────
  1501.  
  1502.   ■ On the VGA, the bits of BL are used as follows:
  1503.  
  1504.     Bits      Significance
  1505.     ────────────────────────────────────────────────────────────────────────
  1506.     0,1,4     character block selected by attribute bytes with bit 3 = 0
  1507.     2,3,5     character block selected by attribute bytes with bit 3 = 1
  1508.     6─7       not used (should be 0)
  1509.     ────────────────────────────────────────────────────────────────────────
  1510.  
  1511.   ■ When using a 256-character set, both fields of BL should select the same
  1512.     character block. In such cases, character attribute bit 3 controls the
  1513.     foreground intensity. When using 512-character sets, the fields of BL
  1514.     designate the blocks holding each half of the character set, and bit 3
  1515.     of the character attribute selects the upper or lower half of the
  1516.     character set.
  1517.  
  1518.   ■ When using a 512-character set, a call to Int 10H Function 10H
  1519.     Subfunction 00H with BX = 0712H is recommended to set the color planes
  1520.     to eight consistent colors.
  1521.  
  1522.  
  1523. ────────────────────────────────────────────────────────────────────────────
  1524. Int 10H                                                         [MCGA] [VGA]
  1525. Function 11H (17) Subfunctions 04H and 14H (20)
  1526. Load ROM 8-by-16 font
  1527. ────────────────────────────────────────────────────────────────────────────
  1528.  
  1529.   Loads the ROM BIOS default 8-by-16 font table into the specified block of
  1530.   character generator RAM.
  1531.  
  1532. Call with:
  1533.  
  1534.   AH            = 11H
  1535.   AL            = 04H or 14H (see Notes)
  1536.   BL            = block
  1537.  
  1538. Returns:
  1539.  
  1540.   Nothing
  1541.  
  1542. Notes:
  1543.  
  1544.   ■ This function provides font selection in text (alphanumeric) display
  1545.     modes. For font selection in graphics (all-points-addressable) modes,
  1546.     see Int 10H Function 11H Subfunctions 20H─24H.
  1547.  
  1548.   ■ If AL = 14H, page 0 must be active. The points (bytes per character),
  1549.     rows, and length of the refresh buffer are recalculated. The controller
  1550.     is reprogrammed with the maximum scan line (points - 1), cursor start
  1551.     (points - 2), cursor end (points - 1), vertical display end (rows*points
  1552.     - 1 for 350- and 400-line modes, or rows *points *2 - 1 for 200-line
  1553.     modes), and underline location (points - 1, mode 7 only).
  1554.  
  1555.     If Subfunction 14H is called at any time other than immediately after a
  1556.     mode set, the results are unpredictable.
  1557.  
  1558.   ■ On the MCGA, a Subfunction 04H call should be followed by a Subfunction
  1559.     03H call so that the ROM BIOS will load the font into the character
  1560.     generator's internal font pages.
  1561.  
  1562.   ■ Subfunction 14H is reserved on the MCGA. If it is called, Subfunction
  1563.     04H is executed.
  1564.  
  1565.  
  1566. ────────────────────────────────────────────────────────────────────────────
  1567. Int 10H                                                   [EGA] [MCGA] [VGA]
  1568. Function 11H (17) Subfunction 20H (32)
  1569. Set Int 1FH font pointer
  1570. ────────────────────────────────────────────────────────────────────────────
  1571.  
  1572.   Sets the Int 1FH pointer to the user's font table. This table is used for
  1573.   character codes 80H─FFH in graphics modes 04H─06H.
  1574.  
  1575. Call with:
  1576.  
  1577.   AH            = 11H
  1578.   AL            = 20H
  1579.   ES:BP         = segment:offset of font table
  1580.  
  1581. Returns:
  1582.  
  1583.   Nothing
  1584.  
  1585. Notes:
  1586.  
  1587.   ■ This function provides font selection in graphics
  1588.     (all-points-addressable) display modes. For font selection in text
  1589.     (alphanumeric) modes, see Int 10H Function 11H Subfunctions 00H─14H.
  1590.  
  1591.   ■ If this subfunction is called at any time other than immediately after a
  1592.     mode set, the results are unpredictable.
  1593.  
  1594.  
  1595. ────────────────────────────────────────────────────────────────────────────
  1596. Int 10H                                                   [EGA] [MCGA] [VGA]
  1597. Function 11H (17) Subfunction 21H (33)
  1598. Set Int 43H for user's font
  1599. ────────────────────────────────────────────────────────────────────────────
  1600.  
  1601.   Sets the vector for Int 43H to point to the user's font table and updates
  1602.   the video ROM BIOS data area. The video controller is not reprogrammed.
  1603.  
  1604. Call with:
  1605.  
  1606.   AH            = 11H
  1607.   AL            = 21H
  1608.   BL            = character rows specifier
  1609.  
  1610.                   00H             if user specified (see register DL)
  1611.                   01H           = 14 (0EH) rows
  1612.                   02H           = 25 (19H) rows
  1613.                   03H           = 43 (2BH) rows
  1614.  
  1615.   CX            = points (bytes per character)
  1616.   DL            = character rows per screen (if BL = 00H)
  1617.   ES:BP         = segment:offset of user font table
  1618.  
  1619. Returns:
  1620.  
  1621.   Nothing
  1622.  
  1623. Notes:
  1624.  
  1625.   ■ This function provides font selection in graphics
  1626.     (all-points-addressable) display modes. For font selection in text
  1627.     (alphanumeric) modes, see Int 10H Function 11H Subfunctions 00H─14H.
  1628.  
  1629.   ■ If this subfunction is called at any time other than immediately after a
  1630.     mode set, the results are unpredictable.
  1631.  
  1632.  
  1633. ────────────────────────────────────────────────────────────────────────────
  1634. Int 10H                                                   [EGA] [MCGA] [VGA]
  1635. Function 11H (17) Subfunction 22H (34)
  1636. Set Int 43H for ROM 8-by-14 font
  1637. ────────────────────────────────────────────────────────────────────────────
  1638.  
  1639.   Sets the vector for Int 43H to point to the ROM BIOS default 8-by-14 font
  1640.   and updates the video ROM BIOS data area. The video controller is not
  1641.   reprogrammed.
  1642.  
  1643. Call with:
  1644.  
  1645.   AH            = 11H
  1646.   AL            = 22H
  1647.   BL            = character rows specifier
  1648.  
  1649.                   00H             if user specified (see register DL)
  1650.                   01H           = 14 (0EH) rows
  1651.                   02H           = 25 (19H) rows
  1652.                   03H           = 43 (2BH) rows
  1653.  
  1654.   DL            = character rows per screen (if BL = 00H)
  1655.  
  1656. Returns:
  1657.  
  1658.   Nothing
  1659.  
  1660. Notes:
  1661.  
  1662.   ■ This function provides font selection in graphics
  1663.     (all-points-addressable) display modes. For font selection in text
  1664.     (alphanumeric) modes, see Int 10H Function 11H Subfunctions 00H─14H.
  1665.  
  1666.   ■ If this subfunction is called at any time other than immediately after a
  1667.     mode set, the results are unpredictable.
  1668.  
  1669.   ■ When this subfunction is called on the MCGA, Subfunction 24H is
  1670.     substituted.
  1671.  
  1672.  
  1673. ────────────────────────────────────────────────────────────────────────────
  1674. Int 10H                                                   [EGA] [MCGA] [VGA]
  1675. Function 11H (17) Subfunction 23H (35)
  1676. Set Int 43H for ROM 8-by-8 font
  1677. ────────────────────────────────────────────────────────────────────────────
  1678.  
  1679.   Sets the vector for Int 43H to point to the ROM BIOS default 8-by-8 font
  1680.   and updates the video ROM BIOS data area. The video controller is not
  1681.   reprogrammed.
  1682.  
  1683. Call with:
  1684.  
  1685.   AH            = 11H
  1686.   AL            = 23H
  1687.   BL            = character rows specifier
  1688.  
  1689.                   00H             if user specified (see register DL)
  1690.                   01H           = 14 (0EH) rows
  1691.                   02H           = 25 (19H) rows
  1692.                   03H           = 43 (2BH) rows
  1693.  
  1694.   DL            = character rows per screen (if BL = 00H)
  1695.  
  1696. Returns:
  1697.  
  1698.   Nothing
  1699.  
  1700. Notes:
  1701.  
  1702.   ■ This function provides font selection in graphics
  1703.     (all-points-addressable) display modes. For font selection in text
  1704.     (alphanumeric) modes, see Int 10H Function 11H Subfunctions 00H─14H.
  1705.  
  1706.   ■ If this subfunction is called at any time other than immediately after a
  1707.     mode set, the results are unpredictable.
  1708.  
  1709.  
  1710. ────────────────────────────────────────────────────────────────────────────
  1711. Int 10H                                                         [MCGA] [VGA]
  1712. Function 11H (17) Subfunction 24H (36)
  1713. Set Int 43H for ROM 8-by-16 font
  1714. ────────────────────────────────────────────────────────────────────────────
  1715.  
  1716.   Sets the vector for Int 43H to point to the ROM BIOS default 8-by-16 font
  1717.   and updates the video ROM BIOS data area. The video controller is not
  1718.   reprogrammed.
  1719.  
  1720. Call with:
  1721.  
  1722.   AH            = 11H
  1723.   AL            = 24H
  1724.   BL            = row specifier
  1725.  
  1726.                   00H             if user specified (see register DL)
  1727.                   01H           = 14 (0EH) rows
  1728.                   02H           = 25 (19H) rows
  1729.                   03H           = 43 (2BH) rows
  1730.  
  1731.   DL            = character rows per screen (if BL = 00H)
  1732.  
  1733. Returns:
  1734.  
  1735.   Nothing
  1736.  
  1737. Notes:
  1738.  
  1739.   ■ This function provides font selection in graphics
  1740.     (all-points-addressable) display modes. For font selection in text
  1741.     (alphanumeric) modes, see Int 10H Function 11H Subfunctions 00H─14H.
  1742.  
  1743.   ■ If this subfunction is called at any time other than immediately after a
  1744.     mode set, the results are unpredictable.
  1745.  
  1746.  
  1747. ────────────────────────────────────────────────────────────────────────────
  1748. Int 10H                                                   [EGA] [MCGA] [VGA]
  1749. Function 11H (17) Subfunction 30H (48)
  1750. Get font information
  1751. ────────────────────────────────────────────────────────────────────────────
  1752.  
  1753.   Returns a pointer to the character definition table for a font and the
  1754.   points (bytes per character) and rows for that font.
  1755.  
  1756. Call with:
  1757.  
  1758.   AH            = 11H
  1759.   AL            = 30H
  1760.   BH            = font code
  1761.                   00H = current Int 1FH contents
  1762.                   01H = current Int 43H contents
  1763.                   02H = ROM 8-by-14 font (EGA, VGA only)
  1764.                   03H = ROM 8-by-8 font (characters 00H─7FH)
  1765.                   04H = ROM 8-by-8 font (characters 80H─FFH)
  1766.                   05H = ROM alternate 9-by-14 font (EGA, VGA only)
  1767.                   06H = ROM 8-by-16 font (MCGA, VGA only)
  1768.                   07H = ROM alternate 9-by-16 font (VGA only)
  1769.  
  1770. Returns:
  1771.  
  1772.   CX            = points (bytes per character)
  1773.   DL            = rows (character rows on screen - 1)
  1774.   ES:BP         = segment:offset of font table
  1775.  
  1776.  
  1777. ────────────────────────────────────────────────────────────────────────────
  1778. Int 10H                                                          [EGA] [VGA]
  1779. Function 12H (18) Subfunction 10H (16)
  1780. Get configuration information
  1781. ────────────────────────────────────────────────────────────────────────────
  1782.  
  1783.   Obtains configuration information for the active video subsystem.
  1784.  
  1785. Call with:
  1786.  
  1787.   AH            = 12H
  1788.   BL            = 10H
  1789.  
  1790. Returns:
  1791.  
  1792.   BH            = display type
  1793.  
  1794.                   0         if color display
  1795.                   1         if monochrome display
  1796.  
  1797.   BL            = memory installed on EGA board
  1798.  
  1799.                   00H       if 64 KB
  1800.                   01H       if 128 KB
  1801.                   02H       if 192 KB
  1802.                   03H       if 256 KB
  1803.  
  1804.   CH            = feature bits (see Notes)
  1805.   CL            = switch setting (see Notes)
  1806.  
  1807. Notes:
  1808.  
  1809.   ■ The feature bits are set from Input Status register 0 in response to an
  1810.     output on the specified Feature Control register bits:
  1811.  
  1812.     Feature                 Feature control         Input status
  1813.     bit(s)                  output bit              bit
  1814.     ────────────────────────────────────────────────────────────────────────
  1815.     0                       0                       5
  1816.     1                       0                       6
  1817.     2                       1                       5
  1818.     3                       1                       6
  1819.     4─7                     not used
  1820.     ────────────────────────────────────────────────────────────────────────
  1821.  
  1822.   ■ The bits in the switch settings byte indicate the state of the EGA's
  1823.     configuration DIP switch (1 = off, 0 = on).
  1824.  
  1825.     Bit(s)    Significance
  1826.     ────────────────────────────────────────────────────────────────────────
  1827.     0         configuration switch 1
  1828.     1         configuration switch 2
  1829.     2         configuration switch 3
  1830.     3         configuration switch 4
  1831.     4─7       not used
  1832.     ────────────────────────────────────────────────────────────────────────
  1833.  
  1834.  
  1835. ────────────────────────────────────────────────────────────────────────────
  1836. Int 10H                                                          [EGA] [VGA]
  1837. Function 12H (18) Subfunction 20H (32)
  1838. Select alternate printscreen
  1839. ────────────────────────────────────────────────────────────────────────────
  1840.  
  1841.   Selects an alternate print-screen routine for the EGA and VGA that works
  1842.   properly if the screen length is not 25 lines. The ROM BIOS default
  1843.   print-screen routine always prints 25 lines.
  1844.  
  1845. Call with:
  1846.  
  1847.   AH            = 12H
  1848.   BL            = 20H
  1849.  
  1850. Returns:
  1851.  
  1852.   Nothing
  1853.  
  1854.  
  1855. ────────────────────────────────────────────────────────────────────────────
  1856. Int 10H                                                                [VGA]
  1857. Function 12H (18) Subfunction 30H (48)
  1858. Set scan lines
  1859. ────────────────────────────────────────────────────────────────────────────
  1860.  
  1861.   Selects the number of scan lines for alphanumeric modes. The selected
  1862.   value takes effect the next time Int 10H Function 00H is called to select
  1863.   the display mode.
  1864.  
  1865. Call with:
  1866.  
  1867.   AH            = 12H
  1868.   AL            = scan line code
  1869.                   00H = 200 scan lines
  1870.                   01H = 350 scan lines
  1871.                   02H = 400 scan lines
  1872.   BL            = 30H
  1873.  
  1874. Returns:
  1875.  
  1876.   If the VGA is active
  1877.  
  1878.   AL            = 12H
  1879.  
  1880.   If the VGA is not active
  1881.  
  1882.   AL            = 00H
  1883.  
  1884.  
  1885. ────────────────────────────────────────────────────────────────────────────
  1886. Int 10H                                                         [MCGA] [VGA]
  1887. Function 12H (18) Subfunction 31H (49)
  1888. Enable/disable default palette loading
  1889. ────────────────────────────────────────────────────────────────────────────
  1890.  
  1891.   Enables or disables loading of a default palette when a video display mode
  1892.   is selected.
  1893.  
  1894. Call with:
  1895.  
  1896.   AH            = 12H
  1897.   AL            = 00H to enable default palette loading
  1898.                   01H to disable default palette loading
  1899.   BL            = 31H
  1900.  
  1901. Returns:
  1902.  
  1903.   If function supported
  1904.  
  1905.   AL            = 12H
  1906.  
  1907.  
  1908. ────────────────────────────────────────────────────────────────────────────
  1909. Int 10H                                                         [MCGA] [VGA]
  1910. Function 12H (18) Subfunction 32H (50)
  1911. Enable/disable video
  1912. ────────────────────────────────────────────────────────────────────────────
  1913.  
  1914.   Enables or disables CPU access to the video adapter's I/O ports and video
  1915.   refresh buffer.
  1916.  
  1917. Call with:
  1918.  
  1919.   AH            = 12H
  1920.   AL            = 00H to enable access
  1921.                   01H to disable access
  1922.   BL            = 32H
  1923.  
  1924. Returns:
  1925.  
  1926.   If function supported
  1927.  
  1928.   AL            = 12H
  1929.  
  1930.  
  1931. ────────────────────────────────────────────────────────────────────────────
  1932. Int 10H                                                         [MCGA] [VGA]
  1933. Function 12H (18) Subfunction 33H (51)
  1934. Enable/disable gray-scale summing
  1935. ────────────────────────────────────────────────────────────────────────────
  1936.  
  1937.   Enables or disables gray-scale summing for the currently active display.
  1938.  
  1939. Call with:
  1940.  
  1941.   AH            = 12H
  1942.   AL            = 00H to enable gray-scale summing
  1943.                   01H to disable gray-scale summing
  1944.   BL            = 33H
  1945.  
  1946. Returns:
  1947.  
  1948.   If function supported
  1949.  
  1950.   AL            = 12H
  1951.  
  1952. Note:
  1953.  
  1954.   ■ When enabled, gray-scale summing occurs during display mode selection,
  1955.     palette programming, and color register loading.
  1956.  
  1957.  
  1958. ────────────────────────────────────────────────────────────────────────────
  1959. Int 10H                                                                [VGA]
  1960. Function 12H (18) Subfunction 34H (52)
  1961. Enable/disable cursor emulation
  1962. ────────────────────────────────────────────────────────────────────────────
  1963.  
  1964.   Enables or disables cursor emulation for the currently active display.
  1965.   When cursor emulation is enabled, the ROM BIOS automatically remaps Int
  1966.   10H Function 01H cursor starting and ending lines for the current
  1967.   character cell dimensions.
  1968.  
  1969. Call with:
  1970.  
  1971.   AH            = 12H
  1972.   AL            = 00H to enable cursor emulation
  1973.                   01H to disable cursor emulation
  1974.   BL            = 34H
  1975.  
  1976. Returns:
  1977.  
  1978.   If function supported
  1979.  
  1980.   AL            = 12H
  1981.  
  1982.  
  1983. ────────────────────────────────────────────────────────────────────────────
  1984. Int 10H                                                         [MCGA] [VGA]
  1985. Function 12H (18) Subfunction 35H (53)
  1986. Switch active display
  1987. ────────────────────────────────────────────────────────────────────────────
  1988.  
  1989.   Allows selection of one of two video adapters in the system when memory
  1990.   usage or port addresses conflict between the two adapters.
  1991.  
  1992. Call with:
  1993.  
  1994.   AH            = 12H
  1995.   AL            = switching function
  1996.  
  1997.                   00H       to disable initial video adapter
  1998.                   01H       to enable system board video adapter
  1999.                   02H       to disable active video adapter
  2000.                   03H       to enable inactive video adapter
  2001.  
  2002.   BL            = 35H
  2003.   ES:DX         = segment:offset of 128-byte buffer (if AL = 00H, 02H, or
  2004.                   03H)
  2005.  
  2006. Returns:
  2007.  
  2008.   If function supported
  2009.  
  2010.   AL            = 12H
  2011.  
  2012.   and, if called with AL = 00H or 02H
  2013.  
  2014.   Video adapter state information saved in caller's buffer
  2015.  
  2016.   or, if called with AL = 03H
  2017.  
  2018.   Video adapter state restored from information in caller's buffer
  2019.  
  2020. Notes:
  2021.  
  2022.   ■ This subfunction cannot be used unless both video adapters have a
  2023.     disable capability (Int 10H Function 12H Subfunction 32H).
  2024.  
  2025.   ■ If there is no conflict between the system board video and the adapter
  2026.     board video in memory or port usage, both video controllers can be
  2027.     active simultaneously and this subfunction is not required.
  2028.  
  2029.  
  2030. ────────────────────────────────────────────────────────────────────────────
  2031. Int 10H                                                                [VGA]
  2032. Function 12H (18) Subfunction 36H (54)
  2033. Enable/disable screen refresh
  2034. ────────────────────────────────────────────────────────────────────────────
  2035.  
  2036.   Enables or disables the video refresh for the currently active display.
  2037.  
  2038. Call with:
  2039.  
  2040.   AH            = 12H
  2041.   AL            = 00H to enable refresh
  2042.                   01H to disable refresh
  2043.   BL            = 36H
  2044.  
  2045. Returns:
  2046.  
  2047.   If function supported
  2048.  
  2049.   AL            = 12H
  2050.  
  2051.  
  2052. ────────────────────────────────────────────────────────────────────────────
  2053. Int 10H                                [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2054. Function 13H (19)
  2055. Write string in teletype mode
  2056. ────────────────────────────────────────────────────────────────────────────
  2057.  
  2058.   Transfers a string to the video buffer for the currently active display,
  2059.   starting at the specified position.
  2060.  
  2061. Call with:
  2062.  
  2063.   AH            = 13H
  2064.   AL            = write mode
  2065.  
  2066.                   0         attribute in BL; string contains character codes
  2067.                             only; and cursor position is not updated after
  2068.                             write
  2069.                   1         attribute in BL;
  2070.                             string contains character codes only; and cursor
  2071.                             position is updated after write
  2072.                   2         string contains alternating character codes and
  2073.                             attribute bytes; and cursor position is not
  2074.                             updated after write
  2075.                   3         string contains alternating character codes and
  2076.                             attribute bytes; and cursor position is updated
  2077.                             after write
  2078.  
  2079.   BH            = page
  2080.   BL            = attribute, if AL = 00H or 01H
  2081.   CX            = length of character string
  2082.   DH            = y coordinate (row)
  2083.   DL            = x coordinate (column)
  2084.   ES:BP         = segment:offset of string
  2085.  
  2086. Returns:
  2087.  
  2088.   Nothing
  2089.  
  2090. Notes:
  2091.  
  2092.   ■ This function is not available on the original IBM PC or PC/XT unless an
  2093.     EGA video adapter (which contains its own ROM BIOS) is installed.
  2094.  
  2095.   ■ This function may be thought of as an extension to Int 10H Function
  2096.     0EH. The control characters bell (07H), backspace (08H), line feed
  2097.     (0AH), and carriage return (0DH) are recognized and handled
  2098.     appropriately.
  2099.  
  2100.  
  2101. ────────────────────────────────────────────────────────────────────────────
  2102. Int 10H                                                               [PS/2]
  2103. Function 1AH (26)
  2104. Get or set display combination code
  2105. ────────────────────────────────────────────────────────────────────────────
  2106.  
  2107.   Returns a code describing the installed display adapter(s) or updates the
  2108.   ROM BIOS's variable describing the installed adapter(s).
  2109.  
  2110. Call with:
  2111.  
  2112.   AH            = 1AH
  2113.   AL            = subfunction
  2114.                   00H = get display combination code
  2115.                   01H = set display combination code
  2116.   BH            = inactive display code (if AL = 01H)
  2117.   BL            = active display code (if AL = 01H)
  2118.  
  2119. Returns:
  2120.  
  2121.   If function supported
  2122.  
  2123.   AL            = 1AH
  2124.  
  2125.   and, if called with AL = 00H
  2126.  
  2127.   BH            = inactive display code
  2128.   BL            = active display code
  2129.  
  2130. Note:
  2131.  
  2132.   ■ The display codes are interpreted as follows:
  2133.  
  2134.     Code(s)   Video subsystem type
  2135.     ────────────────────────────────────────────────────────────────────────
  2136.     00H       no display
  2137.     01H       MDA with 5151 monitor
  2138.     02H       CGA with 5153 or 5154 monitor
  2139.     03H       reserved
  2140.     04H       EGA with 5153 or 5154 monitor
  2141.     05H       EGA with 5151 monitor
  2142.     06H       PGA with 5175 monitor
  2143.     07H       VGA with analog monochrome monitor
  2144.     08H       VGA with analog color monitor
  2145.     09H       reserved
  2146.     0AH       MCGA with digital color monitor
  2147.     0BH       MCGA with analog monochrome monitor
  2148.     0CH       MCGA with analog color monitor
  2149.     0DH─FEH   reserved
  2150.     FFH       unknown
  2151.     ────────────────────────────────────────────────────────────────────────
  2152.  
  2153.  
  2154. ────────────────────────────────────────────────────────────────────────────
  2155. Int 10H                                                               [PS/2]
  2156. Function 1BH (27)
  2157. Get functionality/state information
  2158. ────────────────────────────────────────────────────────────────────────────
  2159.  
  2160.   Obtains information about the current display mode as well as a pointer to
  2161.   a table describing the characteristics and capabilities of the video
  2162.   adapter and monitor.
  2163.  
  2164. Call with:
  2165.  
  2166.   AH            = 1BH
  2167.   BX            = implementation type (always 00H)
  2168.   ES:DI         = segment:offset of 64-byte buffer
  2169.  
  2170. Returns:
  2171.  
  2172.   If function supported
  2173.  
  2174.   AL            = 1BH
  2175.  
  2176.   and information placed in caller's buffer (see Notes)
  2177.  
  2178. Notes:
  2179.  
  2180.   ■ The caller's buffer is filled in with information that depends on the
  2181.     current video display mode:
  2182.  
  2183.  
  2184.     Byte(s)   Contents
  2185.     ────────────────────────────────────────────────────────────────────────
  2186.     00H─03H   pointer to functionality information (see next Note)
  2187.     04H       current video mode
  2188.     05H─06H   number of character columns
  2189.     07H─08H   length of video refresh buffer (bytes)
  2190.     09H─0AH   starting address in buffer of upper left corner of display
  2191.     0BH─1AH   cursor position for video pages 0─7 as eight 2-byte entries;
  2192.               first byte of each pair is y coordinate, second byte is x
  2193.               coordinate
  2194.     1BH       cursor starting line
  2195.     1CH       cursor ending line
  2196.     1DH       active display page
  2197.     1EH─1FH   adapter base port address (3BXH monochrome, 3DXH color)
  2198.     20H       current setting of register 3B8H or 3D8H
  2199.     21H       current setting of register 3B9H or 3D9H
  2200.     22H       number of character rows
  2201.     23H─24H   character height in scan lines
  2202.     25H       active display code (see Int 10H Function 1AH)
  2203.     26H       inactive display code (see Int 10H Function 1AH)
  2204.     27H─28H   number of displayable colors (0 for monochrome)
  2205.     29H       number of display pages
  2206.     2AH       number of scan lines
  2207.               00H                = 200 scan lines
  2208.               01H                = 350 scan lines
  2209.               02H                = 400 scan lines
  2210.               03H                = 480 scan lines
  2211.               04H─FFH            = reserved
  2212.     2BH       primary character block (see Int 10H Function 11H Subfunction
  2213.               03H)
  2214.     2CH       secondary character block
  2215.     2DH       miscellaneous state information
  2216.  
  2217.               Bit(s)     Significance
  2218.               0                  = 1 if all modes on all displays active
  2219.                                    (always 0 on MCGA)
  2220.               1                  = 1 if gray-scale summing active
  2221.               2                  = 1 if monochrome display attached
  2222.               3                  = 1 if mode set default palette loading
  2223.                                    disabled
  2224.               4                  = 1 if cursor emulation active (always 0 on
  2225.                                    MCGA)
  2226.               5                  = state of I/B toggle (0 = intensity, 1 =
  2227.                                    blink)
  2228.               6─7                = reserved
  2229.  
  2230.     2EH─30H   reserved
  2231.     31H       video memory available
  2232.               00H                = 64 KB
  2233.               01H                = 128 KB
  2234.               02H                = 192 KB
  2235.               03H                = 256 KB
  2236.     32H       save pointer state information
  2237.  
  2238.               Bit(s)     Significance
  2239.               0                  = 1 if 512-character set active
  2240.               1                  = 1 if dynamic save area active
  2241.               2                  = 1 if alpha font override active
  2242.               3                  = 1 if graphics font override active
  2243.               4                  = 1 if palette override active
  2244.               5                  = 1 if display combination code (DCC)
  2245.                                    extension active
  2246.               6─7                = reserved
  2247.  
  2248.     33H─3FH   reserved
  2249.     ────────────────────────────────────────────────────────────────────────
  2250.  
  2251.  
  2252.   ■ Bytes 0─3 of the caller's buffer contain a DWORD pointer (offset in
  2253.     lower word, segment in upper word) to the following information about
  2254.     the display adapter and monitor:
  2255.  
  2256.  
  2257.     Byte(s)   Contents
  2258.     ────────────────────────────────────────────────────────────────────────
  2259.     00H       video modes supported
  2260.  
  2261.               Bit        Significance
  2262.               0                  = 1 if mode 00H supported
  2263.               1                  = 1 if mode 01H supported
  2264.               2                  = 1 if mode 02H supported
  2265.               3                  = 1 if mode 03H supported
  2266.               4                  = 1 if mode 04H supported
  2267.               5                  = 1 if mode 05H supported
  2268.               6                  = 1 if mode 06H supported
  2269.               7                  = 1 if mode 07H supported
  2270.  
  2271.     01H       video modes supported
  2272.  
  2273.               Bit        Significance
  2274.               0                  = 1 if mode 08H supported
  2275.               1                  = 1 if mode 09H supported
  2276.               2                  = 1 if mode 0AH supported
  2277.               3                  = 1 if mode 0BH supported
  2278.               4                  = 1 if mode 0CH supported
  2279.               5                  = 1 if mode 0DH supported
  2280.               6                  = 1 if mode 0EH supported
  2281.               7                  = 1 if mode 0FH supported
  2282.  
  2283.     02H       video modes supported
  2284.  
  2285.               Bit(s)     Significance
  2286.               0                  = 1 if mode 10H supported
  2287.               1                  = 1 if mode 11H supported
  2288.               2                  = 1 if mode 12H supported
  2289.               3                  = 1 if mode 13H supported
  2290.               4─7                = reserved
  2291.  
  2292.     03H─06H   reserved
  2293.     07H       scan lines available in text modes
  2294.  
  2295.               Bit(s)     Significance
  2296.               0                  = 1 if 200 scan lines
  2297.               1                  = 1 if 350 scan lines
  2298.               2                  = 1 if 400 scan lines
  2299.               3─7                = reserved
  2300.  
  2301.     08H       character blocks available in text modes (see Int 10H Function
  2302.               11H)
  2303.     09H       maximum number of active character blocks in text modes
  2304.     0AH       miscellaneous BIOS capabilities
  2305.  
  2306.               Bit        Significance
  2307.               0                  = 1 if all modes active on all displays
  2308.                                    (always 0 for MCGA)
  2309.               1                  = 1 if gray-scale summing available
  2310.               2                  = 1 if character font loading available
  2311.               3                  = 1 if mode set default palette loading
  2312.                                    available
  2313.               4                  = 1 if cursor emulation available
  2314.               5                  = 1 if EGA (64-color) palette available
  2315.               6                  = 1 if color register loading available
  2316.               7                  = 1 if color register paging mode select
  2317.                                    available
  2318.  
  2319.     0BH       miscellaneous BIOS capabilities
  2320.  
  2321.               Bit(s)     Significance
  2322.               0                  = 1 if light pen available
  2323.               1                  = 1 if save/restore video state available
  2324.                                    (always 0 on MCGA)
  2325.               2                  = 1 if background intensity/blinking
  2326.                                    control available
  2327.               3                  = 1 if get/set display combination code
  2328.                                    available
  2329.               4─7                = reserved
  2330.  
  2331.     0CH─0DH   reserved
  2332.     0EH       save area capabilities
  2333.  
  2334.               Bit(s)     Significance
  2335.               0                  = 1 if supports 512-character sets
  2336.               1                  = 1 if dynamic save area available
  2337.               2                  = 1 if alpha font override available
  2338.               3                  = 1 if graphics font override available
  2339.               4                  = 1 if palette override available
  2340.               5                  = 1 if display combination code extension
  2341.                                    available
  2342.               6─7                = reserved
  2343.  
  2344.     0FH       reserved
  2345.     ────────────────────────────────────────────────────────────────────────
  2346.  
  2347.  
  2348.  
  2349. ────────────────────────────────────────────────────────────────────────────
  2350. Int 10H                                                               [PS/2]
  2351. Function 1CH (28)
  2352. Save or restore video state
  2353. ────────────────────────────────────────────────────────────────────────────
  2354.  
  2355.   Saves or restores the digital-to-analog converter (DAC) state and color
  2356.   registers, ROM BIOS video driver data area, or video hardware state.
  2357.  
  2358. Call with:
  2359.  
  2360.   AH            = 1CH
  2361.   AL            = subfunction
  2362.  
  2363.                   00H       to get state buffer size
  2364.                   01H       to save state
  2365.                   02H       to restore state
  2366.  
  2367.   CX            = requested states
  2368.  
  2369.                   Bit(s)    Significance (if set)
  2370.                   0         save/restore video hardware state
  2371.                   1         save/restore video BIOS data area
  2372.                   2         save/restore video DAC state and color registers
  2373.                   3─15      reserved
  2374.  
  2375.   ES:BX         = segment:offset of buffer
  2376.  
  2377. Returns:
  2378.  
  2379.   If function supported
  2380.  
  2381.   AL            = 1CH
  2382.  
  2383.   and, if called with AL = 00H
  2384.  
  2385.   BX            = buffer block count (64 bytes per block)
  2386.  
  2387.   or, if called with AL = 01H
  2388.  
  2389.   State information placed in caller's buffer
  2390.  
  2391.   or, if called with AL = 02H
  2392.  
  2393.   Requested state restored according to contents of caller's buffer
  2394.  
  2395. Notes:
  2396.  
  2397.   ■ Subfunction 00H is used to determine the size of buffer that will be
  2398.     necessary to contain the specified state information. The caller must
  2399.     supply the buffer.
  2400.  
  2401.   ■ The current video state is altered during a save state operation (AL =
  2402.     01H). If the requesting program needs to continue in the same video
  2403.     state, it can follow the save state request with an immediate call to
  2404.     restore the video state.
  2405.  
  2406.   ■ This function is supported on the VGA only.
  2407.  
  2408.  
  2409. ────────────────────────────────────────────────────────────────────────────
  2410. Int 11H                                                     [PC] [AT] [PS/2]
  2411. Get equipment configuration
  2412. ────────────────────────────────────────────────────────────────────────────
  2413.  
  2414.   Obtains the equipment list code word from the ROM BIOS.
  2415.  
  2416. Call with:
  2417.  
  2418.   Nothing
  2419.  
  2420. Returns:
  2421.  
  2422.   AX            = equipment list code word
  2423.  
  2424.                   Bit(s)          Significance
  2425.                   0               = 1 if floppy disk drive(s) installed
  2426.                   1               = 1 if math coprocessor installed
  2427.                   2               = 1 if pointing device installed (PS/2)
  2428.  
  2429.                   2─3               system board ram size (PC, see Note)
  2430.  
  2431.                                     00            = 16 KB
  2432.                                     01            = 32 KB
  2433.                                     10            = 48 KB
  2434.                                     11            = 64 KB
  2435.  
  2436.                   4─5               initial video mode
  2437.  
  2438.                                     00            reserved
  2439.                                     01            40-by-25 color text
  2440.                                     10            80-by-25 color text
  2441.                                     11            80-by-25 monochrome
  2442.  
  2443.                   6─7               number of floppy disk drives (if bit 0 =
  2444.                                     1)
  2445.  
  2446.                                     00            = 1
  2447.                                     01            = 2
  2448.                                     10            = 3
  2449.                                     11            = 4
  2450.  
  2451.                   8                 reserved
  2452.                   9─11              number of RS-232 ports installed
  2453.  
  2454.                   12              = 1 if game adapter installed
  2455.                   13              = 1 if internal modem installed (PC and XT
  2456.                                   only)
  2457.                                   = 1 if serial printer attached (PCjr)
  2458.  
  2459.                   14─15             number of printers installed
  2460.  
  2461. Note:
  2462.  
  2463.   ■ Bits 2─3 of the returned value are used only in the ROM BIOS for the
  2464.     original IBM PC with the 64 KB system board and on the PCjr.
  2465.  
  2466.  
  2467. ────────────────────────────────────────────────────────────────────────────
  2468. Int 12H                                                     [PC] [AT] [PS/2]
  2469. Get conventional memory size
  2470. ────────────────────────────────────────────────────────────────────────────
  2471.  
  2472.   Returns the amount of conventional memory available for use by MS-DOS and
  2473.   application programs.
  2474.  
  2475. Call with:
  2476.  
  2477.   Nothing
  2478.  
  2479. Returns:
  2480.  
  2481.   AX            = memory size (in KB)
  2482.  
  2483. Notes:
  2484.  
  2485.   ■ On some early PC models, the amount of memory returned by this function
  2486.     is controlled by the settings of the dip switches on the system board
  2487.     and may not reflect all the memory that is physically present.
  2488.  
  2489.   ■ On the PC/AT, the value returned is the amount of functional memory
  2490.     found during the power-on self-test, regardless of the memory size
  2491.     configuration information stored in CMOS RAM.
  2492.  
  2493.   ■ The value returned does not reflect any extended memory (above the 1 MB
  2494.     boundary) that may be installed on 80286 or 80386 machines such as the
  2495.     PC/AT or PS/2 (Models 50 and above).
  2496.  
  2497.  
  2498. ────────────────────────────────────────────────────────────────────────────
  2499. Int 13H                                                     [PC] [AT] [PS/2]
  2500. Function 00H
  2501. Reset disk system
  2502. ────────────────────────────────────────────────────────────────────────────
  2503.  
  2504.   Resets the disk controller, recalibrates its attached drives (the
  2505.   read/write arm is moved to cylinder 0), and prepares for disk I/O.
  2506.  
  2507. Call with:
  2508.  
  2509.   AH            = 00H
  2510.   DL            = drive
  2511.                   00H─7FH   floppy disk
  2512.                   80H─FFH   fixed disk
  2513.  
  2514. Returns:
  2515.  
  2516.   If function successful
  2517.  
  2518.   Carry flag    = clear
  2519.   AH            = 00H
  2520.  
  2521.   If function unsuccessful
  2522.  
  2523.   Carry flag    = set
  2524.   AH            = status (see Int 13H Function 01H)
  2525.  
  2526. Notes:
  2527.  
  2528.   ■ This function should be called after a failed floppy disk Read, Write,
  2529.     Verify, or Format request before retrying the operation.
  2530.  
  2531.   ■ If called with DL >= 80H (i.e., selecting a fixed disk drive), the
  2532.     floppy disk controller and then the fixed disk controller are reset. See
  2533.     also Int 13H Function 0DH, which allows the fixed disk controller to be
  2534.     reset without affecting the floppy disk controller.
  2535.  
  2536.  
  2537. ────────────────────────────────────────────────────────────────────────────
  2538. Int 13H                                                     [PC] [AT] [PS/2]
  2539. Function 01H
  2540. Get disk system status
  2541. ────────────────────────────────────────────────────────────────────────────
  2542.  
  2543.   Returns the status of the most recent disk operation.
  2544.  
  2545. Call with:
  2546.  
  2547.   AH            = 01H
  2548.   DL            = drive
  2549.  
  2550.                   00H─7FH   floppy disk
  2551.                   80H─FFH   fixed disk
  2552.  
  2553. Returns:
  2554.  
  2555.   AH            = 00H
  2556.   AL            = status of previous disk operation
  2557.  
  2558.                   00H       no error
  2559.                   01H       invalid command
  2560.                   02H       address mark not found
  2561.                   03H       disk write-protected (F)
  2562.                   04H       sector not found
  2563.                   05H       reset failed (H)
  2564.                   06H       floppy disk removed (F)
  2565.                   07H       bad parameter table (H)
  2566.                   08H       DMA overrun (F)
  2567.                   09H       DMA crossed 64 KB boundary
  2568.                   0AH       bad sector flag (H)
  2569.                   0BH       bad track flag (H)
  2570.                   0CH       media type not found (F)
  2571.                   0DH       invalid number of sectors on format (H)
  2572.                   0EH       control data address mark detected (H)
  2573.                   0FH       DMA arbitration level out of range (H)
  2574.                   10H       uncorrectable CRC
  2575. Cyclic Redundancy Check code
  2576.  or ECC
  2577. Error Checking and Correcting code
  2578.  data error
  2579.                   11H       ECC corrected data error (H)
  2580.                   20H       controller failed
  2581.                   40H       seek failed
  2582.                   80H       disk timed-out (failed to respond)
  2583.                   AAH       drive not ready (H)
  2584.                   BBH       undefined error (H)
  2585.                   CCH       write fault (H)
  2586.                   E0H       status register error (H)
  2587.                   FFH       sense operation failed (H)
  2588.  
  2589.                   H = fixed disk only, F = floppy disk only
  2590.  
  2591. Note:
  2592.  
  2593.   ■ On fixed disks, error code 11H (ECC data error) indicates that a
  2594.     recoverable error was detected during a preceding Read Sector (Int 13H
  2595.     Function 02H) function.
  2596.  
  2597.  
  2598. ────────────────────────────────────────────────────────────────────────────
  2599. Int 13H                                                     [PC] [AT] [PS/2]
  2600. Function 02H
  2601. Read sector
  2602. ────────────────────────────────────────────────────────────────────────────
  2603.  
  2604.   Reads one or more sectors from disk into memory.
  2605.  
  2606. Call with:
  2607.  
  2608.   AH            = 02H
  2609.   AL            = number of sectors
  2610.   CH            = cylinder
  2611.   CL            = sector
  2612.   DH            = head
  2613.   DL            = drive
  2614.  
  2615.                   00H─7FH   floppy disk
  2616.                   80H─FFH   fixed disk
  2617.  
  2618.   ES:BX         = segment:offset of buffer
  2619.  
  2620. Returns:
  2621.  
  2622.   If function successful
  2623.  
  2624.   Carry flag    = clear
  2625.   AH            = 00H
  2626.   AL            = number of sectors transferred
  2627.  
  2628.   If function unsuccessful
  2629.  
  2630.   Carry flag    = set
  2631.   AH            = status (see Int 13H Function 01H)
  2632.  
  2633. Notes:
  2634.  
  2635.   ■ On fixed disks, the upper 2 bits of the 10-bit cylinder number are
  2636.     placed in the upper 2 bits of register CL.
  2637.  
  2638.   ■ On fixed disks, error code 11H indicates that a read error occurred that
  2639.     was corrected by the ECC algorithm; in this event, register AL contains
  2640.     the burst length. The data returned is probably good, although there is
  2641.     a small chance that the data was not corrected properly. If a
  2642.     multi-sector transfer was requested, the operation was terminated after
  2643.     the sector containing the read error.
  2644.  
  2645.   ■ On floppy disk drives, an error may result from the drive motor being
  2646.     off at the time of the request. The ROM BIOS does not automatically wait
  2647.     for the drive to come up to speed before attempting the read operation.
  2648.     The requesting program should reset the floppy disk system (Int 13H
  2649.     Function 00H) and retry the operation three times before assuming that
  2650.     the error results from some other cause.
  2651.  
  2652.  
  2653. ────────────────────────────────────────────────────────────────────────────
  2654. Int 13H                                                     [PC] [AT] [PS/2]
  2655. Function 03H
  2656. Write sector
  2657. ────────────────────────────────────────────────────────────────────────────
  2658.  
  2659.   Writes one or more sectors from memory to disk.
  2660.  
  2661. Call with:
  2662.  
  2663.   AH            = 03H
  2664.   AL            = number of sectors
  2665.   CH            = cylinder
  2666.   CL            = sector
  2667.   DH            = head
  2668.   DL            = drive
  2669.  
  2670.                   00H─7FH   floppy disk
  2671.                   80H─FFH   fixed disk
  2672.  
  2673.   ES:BX         = segment:offset of buffer
  2674.  
  2675. Returns:
  2676.  
  2677.   If function successful
  2678.  
  2679.   Carry flag    = clear
  2680.   AH            = 00H
  2681.   AL            = number of sectors transferred
  2682.  
  2683.   If function unsuccessful
  2684.  
  2685.   Carry flag    = set
  2686.   AH            = status (see Int 13H Function 01H)
  2687.  
  2688. Notes:
  2689.  
  2690.   ■ On fixed disks, the upper 2 bits of the 10-bit cylinder number are
  2691.     placed in the upper 2 bits of register CL.
  2692.  
  2693.   ■ On floppy disk drives, an error may result from the drive motor being
  2694.     off at the time of the request. The ROM BIOS does not automatically wait
  2695.     for the drive to come up to speed before attempting the write operation.
  2696.     The requesting program should reset the floppy disk system (Int 13H
  2697.     Function 00H) and retry the operation three times before assuming that
  2698.     the error results from some other cause.
  2699.  
  2700.  
  2701. ────────────────────────────────────────────────────────────────────────────
  2702. Int 13H                                                     [PC] [AT] [PS/2]
  2703. Function 04H
  2704. Verify sector
  2705. ────────────────────────────────────────────────────────────────────────────
  2706.  
  2707.   Verifies the address fields of one or more sectors. No data is transferred
  2708.   to or from memory by this operation.
  2709.  
  2710. Call with:
  2711.  
  2712.   AH            = 04H
  2713.   AL            = number of sectors
  2714.   CH            = cylinder
  2715.   CL            = sector
  2716.   DH            = head
  2717.   DL            = drive
  2718.  
  2719.                   00H─7FH   floppy disk
  2720.                   80H─FFH   fixed disk
  2721.  
  2722.   ES:BX         = segment:offset of buffer (see Notes)
  2723.  
  2724. Returns:
  2725.  
  2726.   If function successful
  2727.  
  2728.   Carry flag    = clear
  2729.   AH            = 00H
  2730.   AL            = number of sectors verified
  2731.  
  2732.   If function unsuccessful
  2733.  
  2734.   Carry flag    = set
  2735.   AH            = status (see Int 13H Function 01H)
  2736.  
  2737. Notes:
  2738.  
  2739.   ■ On PCs, PC/XTs, and PC/ATs with ROM BIOS dated earlier than 11/15/85,
  2740.     ES:BX should point to a valid buffer.
  2741.  
  2742.   ■ On fixed disks, the upper 2 bits of the 10-bit cylinder number are
  2743.     placed in the upper 2 bits of register CL.
  2744.  
  2745.   ■ This function can be used to test whether a readable media is in a
  2746.     floppy disk drive. An error may result from the drive motor being off at
  2747.     the time of the request, because the ROM BIOS does not automatically
  2748.     wait for the drive to come up to speed before attempting the verify
  2749.     operation. The requesting program should reset the floppy disk system
  2750.     (Int 13H Function 00H) and retry the operation three times before
  2751.     assuming that a readable floppy disk is not present.
  2752.  
  2753.  
  2754. ────────────────────────────────────────────────────────────────────────────
  2755. Int 13H                                                     [PC] [AT] [PS/2]
  2756. Function 05H
  2757. Format track
  2758. ────────────────────────────────────────────────────────────────────────────
  2759.  
  2760.   Initializes disk sector and track address fields on the specified track.
  2761.  
  2762. Call with:
  2763.  
  2764.   AH            = 05H
  2765.   AL            = interleave (PC/XT fixed disks)
  2766.   CH            = cylinder
  2767.   DH            = head
  2768.   DL            = drive
  2769.  
  2770.                   00H─7FH   floppy disk
  2771.                   80H─FFH   fixed disk
  2772.   ES:BX         = segment:offset of address field list (except PC/XT fixed
  2773.                   disk, see Note)
  2774.  
  2775. Returns:
  2776.  
  2777.   If function successful
  2778.  
  2779.   Carry flag    = clear
  2780.   AH            = 00H
  2781.  
  2782.   If function unsuccessful
  2783.  
  2784.   Carry flag    = set
  2785.   AH            = status (see Int 13H Function 01H)
  2786.  
  2787. Notes:
  2788.  
  2789.   ■ On floppy disks, the address field list consists of a series of 4-byte
  2790.     entries, one entry per sector, in the following format:
  2791.  
  2792.     Byte(s)     Contents
  2793.     0           cylinder
  2794.     1           head
  2795.     2           sector
  2796.     3           sector-size code
  2797.  
  2798.                 00H         if 128 bytes per sector
  2799.                 01H         if 256 bytes per sector
  2800.                 02H         if 512 bytes per sector (standard)
  2801.                 03H         if 1024 bytes per sector
  2802.  
  2803.   ■ On floppy disks, the number of sectors per track is taken from the BIOS
  2804.     floppy disk parameter table whose address is stored in the vector for
  2805.     Int 1EH.
  2806.  
  2807.   ■ When this function is used for floppy disks on the PC/AT or PS/2, it
  2808.     should be preceded by a call to Int 13H Function 17H to select the type
  2809.     of medium to be formatted.
  2810.  
  2811.   ■ On fixed disks, the upper 2 bits of the 10-bit cylinder number are
  2812.     placed in the upper 2 bits of register CL.
  2813.  
  2814.   ■ On PC/XT-286, PC/AT, and PS/2 fixed disks, ES:BX points to a 512-byte
  2815.     buffer containing byte pairs for each physical disk sector, as follows:
  2816.  
  2817.     Byte(s)     Contents
  2818.     0           00H for good sector
  2819.                 80H for bad sector
  2820.     1           sector number
  2821.  
  2822.     For example, to format a track with 17 sectors and an interleave of two,
  2823.     ES:BX would point to the following 34-byte array at the beginning of a
  2824.     512-byte buffer:
  2825.  
  2826.     db      00h,01h,00h,0ah,00h,02h,00h,0bh,00h,03h,00h,0ch
  2827.     db      00h,04h,00h,0dh,00h,05h,00h,0eh,00h,06h,00h,0fh
  2828.     db      00h,07h,00h,10h,00h,08h,00h,11h,00h,09h
  2829.  
  2830.  
  2831. ────────────────────────────────────────────────────────────────────────────
  2832. Int 13H                                                                 [PC]
  2833. Function 06H
  2834. Format bad track
  2835. ────────────────────────────────────────────────────────────────────────────
  2836.  
  2837.   Initializes a track, writing disk address fields and data sectors and
  2838.   setting bad sector flags.
  2839.  
  2840. Call with:
  2841.  
  2842.   AH            = 06H
  2843.   AL            = interleave
  2844.   CH            = cylinder
  2845.   DH            = head
  2846.   DL            = drive
  2847.  
  2848.                   80H─FFH   fixed disk
  2849.  
  2850. Returns:
  2851.  
  2852.   If function successful
  2853.  
  2854.   Carry flag    = clear
  2855.   AH            = 00H
  2856.  
  2857.   If function unsuccessful
  2858.  
  2859.   Carry flag    = set
  2860.   AH            = status (see Int 13H Function 01H)
  2861.  
  2862. Notes:
  2863.  
  2864.   ■ This function is defined for PC/XT fixed disk drives only.
  2865.  
  2866.   ■ For additional information, see Notes for Int 13H Function 05H.
  2867.  
  2868.  
  2869. ────────────────────────────────────────────────────────────────────────────
  2870. Int 13H                                                                 [PC]
  2871. Function 07H
  2872. Format drive
  2873. ────────────────────────────────────────────────────────────────────────────
  2874.  
  2875.   Formats the entire drive, writing disk address fields and data sectors,
  2876.   starting at the specified cylinder.
  2877.  
  2878. Call with:
  2879.  
  2880.   AH            = 07H
  2881.   AL            = interleave
  2882.   CH            = cylinder
  2883.   DL            = drive
  2884.  
  2885.                   80H─FFH   fixed disk
  2886.  
  2887. Returns:
  2888.  
  2889.   If function successful
  2890.  
  2891.   Carry flag    = clear
  2892.   AH            = 00H
  2893.  
  2894.   If function unsuccessful
  2895.  
  2896.   Carry flag    = set
  2897.   AH            = status (see Int 13H Function 01H)
  2898.  
  2899. Notes:
  2900.  
  2901.   ■ This function is defined for PC/XT fixed disk drives only.
  2902.  
  2903.   ■ For additional information, see Notes for Int 13H Function 05H.
  2904.  
  2905.  
  2906. ────────────────────────────────────────────────────────────────────────────
  2907. Int 13H                                                     [PC] [AT] [PS/2]
  2908. Function 08H
  2909. Get drive parameters
  2910. ────────────────────────────────────────────────────────────────────────────
  2911.  
  2912.   Returns various parameters for the specified drive.
  2913.  
  2914. Call with:
  2915.  
  2916.   AH            = 08H
  2917.   DL            = drive
  2918.  
  2919.                   00H─7FH   floppy disk
  2920.                   80H─FFH   fixed disk
  2921.  
  2922. Returns:
  2923.  
  2924.   If function successful
  2925.  
  2926.   Carry flag    = clear
  2927.   BL            = drive type (PC/AT and PS/2 floppy disks)
  2928.  
  2929.                   01H       if 360 KB, 40 track, 5.25"
  2930.                   02H       if 1.2 MB, 80 track, 5.25"
  2931.                   03H       if 720 KB, 80 track, 3.5"
  2932.                   04H       if 1.44 MB, 80 track, 3.5"
  2933.   CH            = low 8 bits of maximum cylinder number
  2934.  
  2935.   CL            = bits 6─7  high-order 2 bits of maximum cylinder number
  2936.                   bits 0─5  maximum sector number
  2937.  
  2938.   DH            = maximum head number
  2939.   DL            = number of drives
  2940.   ES:DI         = segment:offset of disk drive parameter table
  2941.  
  2942.   If function unsuccessful
  2943.  
  2944.   Carry flag    = set
  2945.   AH            = status (see Int 13H Function 01H)
  2946.  
  2947. Notes:
  2948.  
  2949.   ■ On the PC and PC/XT, this function is supported on fixed disks only.
  2950.  
  2951.   ■ The value returned in register DL reflects the true number of physical
  2952.     drives attached to the adapter for the requested drive.
  2953.  
  2954.  
  2955. ────────────────────────────────────────────────────────────────────────────
  2956. Int 13H                                                     [PC] [AT] [PS/2]
  2957. Function 09H
  2958. Initialize fixed disk characteristics
  2959. ────────────────────────────────────────────────────────────────────────────
  2960.  
  2961.   Initializes the fixed disk controller for subsequent I/O operations, using
  2962.   the values found in the ROM BIOS disk parameter block(s).
  2963.  
  2964. Call with:
  2965.  
  2966.   AH            = 09H
  2967.   DL            = drive
  2968.  
  2969.                   80H─FFH   fixed disk
  2970.  
  2971.   and, on the PC/XT
  2972.   Vector for Int 41H must point to disk parameter block
  2973.  
  2974.   or, on the PC/AT and PS/2
  2975.   Vector for Int 41H must point to disk parameter block for drive 0
  2976.   Vector for Int 46H must point to disk parameter block for drive 1
  2977.  
  2978. Returns:
  2979.  
  2980.   If function successful
  2981.  
  2982.   Carry flag    = clear
  2983.   AH            = 00H
  2984.  
  2985.   If function unsuccessful
  2986.  
  2987.   Carry flag    = set
  2988.   AH            = status (see Int 13H Function 01H)
  2989.  
  2990. Notes:
  2991.  
  2992.   ■ This function is supported on fixed disks only.
  2993.  
  2994.   ■ For PC and PC/XT fixed disks, the parameter block format is as follows:
  2995.  
  2996.     Byte(s)           Contents
  2997.     00H─01H           maximum number of cylinders
  2998.     02H               maximum number of heads
  2999.     03H─04H           starting reduced write current cylinder
  3000.     05H─06H           starting write precompensation cylinder
  3001.     07H               maximum ECC burst length
  3002.     08H               drive options
  3003.  
  3004.                       Bit(s)            Significance (if set)
  3005.                       0─2               drive option
  3006.                       3─5               reserved (0)
  3007.                       6                 disable ECC retries
  3008.                       7                 disable disk-access retries
  3009.  
  3010.     09H               standard time-out value
  3011.     0AH               time-out value for format drive
  3012.     0BH               time-out value for check drive
  3013.     0CH─0FH           reserved
  3014.  
  3015.   ■ For PC/AT and PS/2 fixed disks, the parameter block format is as
  3016.     follows:
  3017.  
  3018.     Byte(s)           Contents
  3019.     00H─01H           maximum number of cylinders
  3020.     02H               maximum number of heads
  3021.     03H─04H           reserved
  3022.     05H─06H           starting write precompensation cylinder
  3023.     07H               maximum ECC burst length
  3024.     08H               drive options
  3025.  
  3026.                       Bit(s)            Significance (if set)
  3027.                       0─2               not used
  3028.                       3                 more than 8 heads
  3029.                       4                 not used
  3030.                       5                 manufacturer's defect map present at
  3031.                                         maximum
  3032.                                         cylinder + 1
  3033.                       6─7               nonzero (10, 01, or 11) if retries
  3034.                                         disabled
  3035.  
  3036.     09H─0BH           reserved
  3037.     0CH─0DH           landing zone cylinder
  3038.     0EH               sectors per track
  3039.     0FH               reserved
  3040.  
  3041.  
  3042. ────────────────────────────────────────────────────────────────────────────
  3043. Int 13H                                                     [PC] [AT] [PS/2]
  3044. Function 0AH (10)
  3045. Read sector long
  3046. ────────────────────────────────────────────────────────────────────────────
  3047.  
  3048.   Reads a sector or sectors from disk into memory, along with a 4-byte ECC
  3049.   code for each sector.
  3050.  
  3051. Call with:
  3052.  
  3053.   AH            = 0AH
  3054.   AL            = number of sectors
  3055.   CH            = cylinder
  3056.   CL            = sector (see Notes)
  3057.   DH            = head
  3058.   DL            = drive
  3059.  
  3060.                   80H─FFH   fixed disk
  3061.  
  3062.   ES:BX         = segment:offset of buffer
  3063.  
  3064. Returns:
  3065.  
  3066.   If function successful
  3067.  
  3068.   Carry flag    = clear
  3069.   AH            = 00H
  3070.   AL            = number of sectors transferred
  3071.  
  3072.   If function unsuccessful
  3073.  
  3074.   Carry flag    = set
  3075.   AH            = status (see Int 13H Function 01H)
  3076.  
  3077. Notes:
  3078.  
  3079.   ■ This function is supported on fixed disks only.
  3080.  
  3081.   ■ The upper 2 bits of the 10-bit cylinder number are placed in the upper 2
  3082.     bits of register CL.
  3083.  
  3084.   ■ Unlike the normal Read Sector function (Int 13H Function 02H), ECC
  3085.     errors are not automatically corrected. Multisector transfers are
  3086.     terminated after any sector with a read error.
  3087.  
  3088.  
  3089. ────────────────────────────────────────────────────────────────────────────
  3090. Int 13H                                                     [PC] [AT] [PS/2]
  3091. Function 0BH (11)
  3092. Write sector long
  3093. ────────────────────────────────────────────────────────────────────────────
  3094.  
  3095.   Writes a sector or sectors from memory to disk. Each sector's worth of
  3096.   data must be followed by its 4-byte ECC code.
  3097.  
  3098. Call with:
  3099.  
  3100.   AH            = 0BH
  3101.   AL            = number of sectors
  3102.   CH            = cylinder
  3103.   CL            = sector (see Notes)
  3104.   DH            = head
  3105.   DL            = drive
  3106.  
  3107.                   80H─FFH   fixed disk
  3108.  
  3109.   ES:BX         = segment:offset of buffer
  3110. Returns:
  3111.  
  3112.   If function successful
  3113.  
  3114.   Carry flag    = clear
  3115.   AH            = 00H
  3116.   AL            = number of sectors transferred
  3117.  
  3118.   If function unsuccessful
  3119.  
  3120.   Carry flag    = set
  3121.   AH            = status (see Int 13H Function 01H)
  3122.  
  3123. Notes:
  3124.  
  3125.   ■ This function is supported on fixed disks only.
  3126.  
  3127.   ■ The upper 2 bits of the 10-bit cylinder number are placed in the upper 2
  3128.     bits of register CL.
  3129.  
  3130.  
  3131. ────────────────────────────────────────────────────────────────────────────
  3132. Int 13H                                                     [PC] [AT] [PS/2]
  3133. Function 0CH (12)
  3134. Seek
  3135. ────────────────────────────────────────────────────────────────────────────
  3136.  
  3137.   Positions the disk read/write heads to the specified cylinder, but does
  3138.   not transfer any data.
  3139.  
  3140. Call with:
  3141.  
  3142.   AH            = 0CH
  3143.   CH            = lower 8 bits of cylinder
  3144.   CL            = upper 2 bits of cylinder in bits 6─7
  3145.   DH            = head
  3146.   DL            = drive
  3147.  
  3148.                   80H─FFH   fixed disk
  3149.  
  3150. Returns:
  3151.  
  3152.   If function successful
  3153.  
  3154.   Carry flag    = clear
  3155.   AH            = 00H
  3156.  
  3157.   If function unsuccessful
  3158.  
  3159.   Carry flag    = set
  3160.   AH            = status (see Int 13H Function 01H)
  3161.  
  3162. Notes:
  3163.  
  3164.   ■ This function is supported on fixed disks only.
  3165.  
  3166.   ■ The upper 2 bits of the 10-bit cylinder number are placed in the upper 2
  3167.     bits of register CL.
  3168.  
  3169.   ■ The Read Sector, Read Sector Long, Write Sector, and Write Sector Long
  3170.     functions include an implied seek operation and need not be preceded by
  3171.     an explicit call to this function.
  3172.  
  3173.  
  3174. ────────────────────────────────────────────────────────────────────────────
  3175. Int 13H                                                     [PC] [AT] [PS/2]
  3176. Function 0DH (13)
  3177. Reset fixed disk system
  3178. ────────────────────────────────────────────────────────────────────────────
  3179.  
  3180.   Resets the fixed disk controller, recalibrates attached drives (moves the
  3181.   read/write arm to cylinder 0), and prepares for subsequent disk I/O.
  3182.  
  3183. Call with:
  3184.  
  3185.   AH            = 0DH
  3186.   DL            = drive
  3187.  
  3188.                   80H─FFH   fixed disk
  3189.  
  3190. Returns:
  3191.  
  3192.   If function successful
  3193.  
  3194.   Carry flag    = clear
  3195.   AH            = 00H
  3196.  
  3197.   If function unsuccessful
  3198.  
  3199.   Carry flag    = set
  3200.   AH            = status (see Int 13H Function 01H)
  3201.  
  3202. Note:
  3203.  
  3204.   ■ This function is supported on fixed disks only. It differs from Int 13H
  3205.     Function 00H in that the floppy disk controller is not reset.
  3206.  
  3207.  
  3208. ────────────────────────────────────────────────────────────────────────────
  3209. Int 13H                                                                 [PC]
  3210. Function 0EH (14)
  3211. Read sector buffer
  3212. ────────────────────────────────────────────────────────────────────────────
  3213.  
  3214.   Transfers the contents of the fixed disk adapter's internal sector buffer
  3215.   to system memory. No data is read from the physical disk drive.
  3216.  
  3217. Call with:
  3218.  
  3219.   AH            = 0EH
  3220.   ES:BX         = segment:offset of buffer
  3221.  
  3222. Returns:
  3223.  
  3224.   If function successful
  3225.  
  3226.   Carry flag    = clear
  3227.  
  3228.   If function unsuccessful
  3229.  
  3230.   Carry flag    = set
  3231.   AH            = status (see Int 13H Function 01H)
  3232.  
  3233. Note:
  3234.  
  3235.   ■ This function is supported by the PC/XT's fixed disk adapter only. It is
  3236.     not defined for fixed disk adapters on the PC/AT or PS/2.
  3237.  
  3238.  
  3239. ────────────────────────────────────────────────────────────────────────────
  3240. Int 13H                                                                 [PC]
  3241. Function 0FH (15)
  3242. Write sector buffer
  3243. ────────────────────────────────────────────────────────────────────────────
  3244.  
  3245.   Transfers data from system memory to the fixed disk adapter's internal
  3246.   sector buffer. No data is written to the physical disk drive.
  3247.  
  3248. Call with:
  3249.  
  3250.   AH            = 0FH
  3251.   ES:BX         = segment:offset of buffer
  3252.  
  3253. Returns:
  3254.  
  3255.   If function successful
  3256.  
  3257.   Carry flag    = clear
  3258.  
  3259.   If function unsuccessful
  3260.  
  3261.   Carry flag    = set
  3262.   AH            = status (see Int 13H Function 01H)
  3263.  
  3264. Notes:
  3265.  
  3266.   ■ This function is supported by the PC/XT's fixed disk adapter only. It is
  3267.     not defined for fixed disk adapters on the PC/AT or PS/2.
  3268.  
  3269.   ■ This function should be called to initialize the contents of the sector
  3270.     buffer before formatting the drive with Int 13H Function 05H.
  3271.  
  3272.  
  3273. ────────────────────────────────────────────────────────────────────────────
  3274. Int 13H                                                     [PC] [AT] [PS/2]
  3275. Function 10H (16)
  3276. Get drive status
  3277. ────────────────────────────────────────────────────────────────────────────
  3278.  
  3279.   Tests whether the specified fixed disk drive is operational and returns
  3280.   the drive's status.
  3281.  
  3282. Call with:
  3283.  
  3284.   AH            = 10H
  3285.   DL            = drive
  3286.  
  3287.                   80H─FFH   fixed disk
  3288.  
  3289. Returns:
  3290.  
  3291.   If function successful
  3292.  
  3293.   Carry flag    = clear
  3294.   AH            = 00H
  3295.  
  3296.   If function unsuccessful
  3297.  
  3298.   Carry flag    = set
  3299.   AH            = status (see Int 13H Function 01H)
  3300.  
  3301. Note:
  3302.  
  3303.   ■ This function is supported on fixed disks only.
  3304.  
  3305.  
  3306. ────────────────────────────────────────────────────────────────────────────
  3307. Int 13H                                                     [PC] [AT] [PS/2]
  3308. Function 11H (17)
  3309. Recalibrate drive
  3310. ────────────────────────────────────────────────────────────────────────────
  3311.  
  3312.   Causes the fixed disk adapter to recalibrate itself for the specified
  3313.   drive, positioning the read/write arm to cylinder 0, and returns the
  3314.   drive's status.
  3315.  
  3316. Call with:
  3317.  
  3318.   AH            = 11H
  3319.   DL            = drive
  3320.  
  3321.                   80H─FFH   fixed disk
  3322.  
  3323. Returns:
  3324.  
  3325.   If function successful
  3326.  
  3327.   Carry flag    = clear
  3328.   AH            = 00H
  3329.  
  3330.   If function unsuccessful
  3331.  
  3332.   Carry flag    = set
  3333.   AH            = status (see Int 13H Function 01H)
  3334.  
  3335. Note:
  3336.  
  3337.   ■ This function is supported on fixed disks only.
  3338.  
  3339.  
  3340. ────────────────────────────────────────────────────────────────────────────
  3341. Int 13H                                                                 [PC]
  3342. Function 12H (18)
  3343. Controller RAM diagnostic
  3344. ────────────────────────────────────────────────────────────────────────────
  3345.  
  3346.   Causes the fixed disk adapter to carry out a built-in diagnostic test on
  3347.   its internal sector buffer, indicating whether the test was passed by the
  3348.   returned status.
  3349.  
  3350. Call with:
  3351.  
  3352.   AH            = 12H
  3353.  
  3354. Returns:
  3355.  
  3356.   If function successful
  3357.  
  3358.   Carry flag    = clear
  3359.  
  3360.   If function unsuccessful
  3361.  
  3362.   Carry flag    = set
  3363.   AH            = status (see Int 13H Function 01H)
  3364.  
  3365. Note:
  3366.  
  3367.   ■ This function is supported on PC/XT fixed disks only.
  3368.  
  3369.  
  3370. ────────────────────────────────────────────────────────────────────────────
  3371. Int 13H                                                                 [PC]
  3372. Function 13H (19)
  3373. Controller drive diagnostic
  3374. ────────────────────────────────────────────────────────────────────────────
  3375.  
  3376.   Causes the fixed disk adapter to run internal diagnostic tests of the
  3377.   attached drive, indicating whether the test was passed by the returned
  3378.   status.
  3379.  
  3380. Call with:
  3381.  
  3382.   AH            = 13H
  3383.  
  3384. Returns:
  3385.  
  3386.   If function successful
  3387.  
  3388.   Carry flag    = clear
  3389.  
  3390.   If function unsuccessful
  3391.  
  3392.   Carry flag    = set
  3393.   AH            = status (see Int 13H Function 01H)
  3394.  
  3395. Note:
  3396.  
  3397.   ■ This function is supported on PC/XT fixed disks only.
  3398.  
  3399.  
  3400. ────────────────────────────────────────────────────────────────────────────
  3401. Int 13H                                                     [PC] [AT] [PS/2]
  3402. Function 14H (20)
  3403. Controller internal diagnostic
  3404. ────────────────────────────────────────────────────────────────────────────
  3405.  
  3406.   Causes the fixed disk adapter to carry out a built-in diagnostic
  3407.   self-test, indicating whether the test was passed by the returned status.
  3408.  
  3409. Call with:
  3410.  
  3411.   AH            = 14H
  3412.  
  3413. Returns:
  3414.  
  3415.   If function successful
  3416.  
  3417.   Carry flag    = clear
  3418.   AH            = 00H
  3419.  
  3420.   If function unsuccessful
  3421.  
  3422.   Carry flag    = set
  3423.   AH            = status (see Int 13H Function 01H)
  3424.  
  3425. Note:
  3426.  
  3427.   ■ This function is supported on fixed disks only.
  3428.  
  3429.  
  3430. ────────────────────────────────────────────────────────────────────────────
  3431. Int 13H                                                          [AT] [PS/2]
  3432. Function 15H (21)
  3433. Get disk type
  3434. ────────────────────────────────────────────────────────────────────────────
  3435.  
  3436.   Returns a code indicating the type of floppy or fixed disk referenced by
  3437.   the specified drive code.
  3438.  
  3439. Call with:
  3440.  
  3441.   AH            = 15H
  3442.   DL            = drive
  3443.  
  3444.                   00H─7FH   floppy disk
  3445.                   80H─FFH   fixed disk
  3446.  
  3447. Returns:
  3448.  
  3449.   If function successful
  3450.  
  3451.   Carry flag    = clear
  3452.   AH            = drive type code
  3453.  
  3454.                   00H       if no drive present
  3455.                   01H       if floppy disk drive without change-line support
  3456.                   02H       if floppy disk drive with change-line support
  3457.                   03H       if fixed disk
  3458.  
  3459.   and, if fixed disk (AH = 03H)
  3460.  
  3461.   CX:DX         = number of 512-byte sectors
  3462.  
  3463.   If function unsuccessful
  3464.  
  3465.   Carry flag    = set
  3466.   AH            = status (see Int 13H Function 01H)
  3467.  
  3468. Note:
  3469.  
  3470.   ■ This function is not supported on the PC or PC/XT.
  3471.  
  3472.  
  3473. ────────────────────────────────────────────────────────────────────────────
  3474. Int 13H                                                          [AT] [PS/2]
  3475. Function 16H (22)
  3476. Get disk change status
  3477. ────────────────────────────────────────────────────────────────────────────
  3478.  
  3479.   Returns the status of the change line, indicating whether the disk in the
  3480.   drive may have been replaced since the last disk access.
  3481.  
  3482. Call with:
  3483.  
  3484.   AH            = 16H
  3485.   DL            = drive
  3486.                   00H─7FH   floppy disk
  3487.  
  3488. Returns:
  3489.  
  3490.   If change line inactive (disk has not been changed)
  3491.  
  3492.   Carry flag    = clear
  3493.   AH            = 00H
  3494.  
  3495.   If change line active (disk may have been changed)
  3496.  
  3497.   Carry flag    = set
  3498.   AH            = 06H
  3499.  
  3500. Notes:
  3501.  
  3502.   ■ If this function returns with the carry flag set, the disk has not
  3503.     necessarily been changed; the change line can be activated by simply
  3504.     unlocking and locking the disk drive door without removing the floppy
  3505.     disk.
  3506.  
  3507.   ■ This function is not supported for floppy disks on the PC or PC/XT.
  3508.  
  3509.  
  3510. ────────────────────────────────────────────────────────────────────────────
  3511. Int 13H                                                          [AT] [PS/2]
  3512. Function 17H (23)
  3513. Set disk type
  3514. ────────────────────────────────────────────────────────────────────────────
  3515.  
  3516.   Selects a floppy disk type for the specified drive.
  3517.  
  3518. Call with:
  3519.  
  3520.   AH            = 17H
  3521.   AL            = floppy disk type code
  3522.  
  3523.                   00H       not used
  3524.                   01H       320/360 KB floppy disk in 360 KB drive
  3525.                   02H       320/360 KB floppy disk in 1.2 MB drive
  3526.                   03H       1.2 MB floppy disk in 1.2 MB drive
  3527.                   04H       720 KB floppy disk in 720 KB drive
  3528.   SL            = drive
  3529.  
  3530.                   00H─7FH   floppy disk
  3531.  
  3532. Returns:
  3533.  
  3534.   If function successful
  3535.  
  3536.   Carry flag    = clear
  3537.   AH            = 00H
  3538.  
  3539.   If function unsuccessful
  3540.  
  3541.   Carry flag    = set
  3542.   AH            = status (see Int 13H Function 01H)
  3543.  
  3544. Notes:
  3545.  
  3546.   ■ This function is not supported for floppy disks on the PC or PC/XT.
  3547.  
  3548.   ■ If the change line is active for the specified drive, it is reset. The
  3549.     ROM BIOS then sets the data rate for the specified drive and media type.
  3550.  
  3551.  
  3552. ────────────────────────────────────────────────────────────────────────────
  3553. Int 13H                                                          [AT] [PS/2]
  3554. Function 18H (24)
  3555. Set media type for format
  3556. ────────────────────────────────────────────────────────────────────────────
  3557.  
  3558.   Selects media characteristics for the specified drive.
  3559.  
  3560. Call with:
  3561.  
  3562.   AH            = 18H
  3563.   CH            = number of cylinders
  3564.   CL            = sectors per track
  3565.   DL            = drive
  3566.  
  3567.                   00H─7FH   floppy disk
  3568.  
  3569. Returns:
  3570.  
  3571.   If function successful
  3572.  
  3573.   Carry flag    = clear
  3574.   AH            = 00H
  3575.   ES:DI         = segment:offset of disk parameter table for media type
  3576.  
  3577.   If function unsuccessful
  3578.  
  3579.   Carry flag    = set
  3580.   AH            = status (see Int 13H Function 01H)
  3581.  
  3582. Notes:
  3583.  
  3584.   ■ A floppy disk must be present in the drive.
  3585.  
  3586.   ■ This function should be called prior to formatting a disk with Int 13H
  3587.     Function 05H so that the ROM BIOS can set the correct data rate for the
  3588.     media.
  3589.  
  3590.   ■ If the change line is active for the specified drive, it is reset.
  3591.  
  3592.  
  3593. ────────────────────────────────────────────────────────────────────────────
  3594. Int 13H                                                               [PS/2]
  3595. Function 19H (25)
  3596. Park heads
  3597. ────────────────────────────────────────────────────────────────────────────
  3598.  
  3599.   Moves the read/write arm to a track that is not used for data storage, so
  3600.   that data will not be damaged when the drive is turned off.
  3601.  
  3602. Call with:
  3603.  
  3604.   AH            = 19H
  3605.   DL            = drive
  3606.  
  3607.                   80H─FFH   fixed disk
  3608.  
  3609. Returns:
  3610.  
  3611.   If function successful
  3612.  
  3613.   Carry flag    = clear
  3614.   AH            = 00H
  3615.  
  3616.   If function unsuccessful
  3617.  
  3618.   Carry flag    = set
  3619.   AH            = status (see Int 13H Function 01H)
  3620.  
  3621. Note:
  3622.  
  3623.   ■ This function is defined for PS/2 fixed disks only.
  3624.  
  3625.  
  3626. ────────────────────────────────────────────────────────────────────────────
  3627. Int 13H                                                               [PS/2]
  3628. Function 1AH (26)
  3629. Format ESDI drive
  3630. ────────────────────────────────────────────────────────────────────────────
  3631.  
  3632.   Initializes disk sector and track address fields on a drive attached to
  3633.   the ESDI Fixed Disk Drive Adapter/A.
  3634.  
  3635. Call with:
  3636.  
  3637.   AH            = 1AH
  3638.   AL            = relative block address (RBA) defect table count
  3639.  
  3640.                   0         if no RBA table
  3641.                   >0        if RBA table used
  3642.  
  3643.   CL            = format modifier bits
  3644.  
  3645.                   Bit(s)    Significance (if set)
  3646.                   0         ignore primary defect map
  3647.                   1         ignore secondary defect map
  3648.                   2         update secondary defect map (see Notes)
  3649.                   3         perform extended surface analysis
  3650.                   4         generate periodic interrupt (see Notes)
  3651.                   5─7       reserved (must be 0)
  3652.   DL            = drive
  3653.  
  3654.                   80H─FFH   fixed disk
  3655.  
  3656.   ES:BX         = segment:offset of RBA table
  3657.  
  3658. Returns:
  3659.  
  3660.   If function successful
  3661.  
  3662.   Carry flag    = clear
  3663.   AH            = 00H
  3664.  
  3665.   If function unsuccessful
  3666.  
  3667.   Carry flag    = set
  3668.   AH            = status (see Int 13H Function 01H)
  3669.  
  3670. Notes:
  3671.  
  3672.   ■ This operation is sometimes called a "low level format" and prepares the
  3673.     disk for physical read/write operations at the sector level. The drive
  3674.     must be subsequently partitioned with the FDISK command and then given a
  3675.     "high level format" with the FORMAT command to install a file system.
  3676.  
  3677.   ■ If bit 4 of register CL is set, Int 15H is called with AH = 0FH and AL
  3678.     = phase code after each cylinder is formatted or analyzed. The phase
  3679.     code is defined as:
  3680.  
  3681.     0 = reserved
  3682.     1 = surface analysis
  3683.     2 = formatting
  3684.  
  3685.     See also Int 15H Function 0FH.
  3686.  
  3687.   ■ If bit 2 of register CL is set, the drive's secondary defect map is
  3688.     updated to reflect errors found during surface analysis. If both bit 2
  3689.     and bit 1 are set, the secondary defect map is replaced.
  3690.  
  3691.   ■ For an extended surface analysis, the disk should first be formatted by
  3692.     calling this function with bit 3 cleared, then analyzed by calling this
  3693.     function with bit 3 set.
  3694.  
  3695.  
  3696. ────────────────────────────────────────────────────────────────────────────
  3697. Int 14H                                                     [PC] [AT] [PS/2]
  3698. Function 00H
  3699. Initialize communications port
  3700. ────────────────────────────────────────────────────────────────────────────
  3701.  
  3702.   Initializes a serial communications port to a desired baud rate, parity,
  3703.   word length, and number of stop bits.
  3704.  
  3705. Call with:
  3706.  
  3707.   AH            = 00H
  3708.   AL            = initialization parameter (see Notes)
  3709.   DX            = communications port number (0 = COM1, 1 = COM2, etc.)
  3710.  
  3711. Returns:
  3712.  
  3713.   AH            = port status
  3714.  
  3715.                   Bit       Significance (if set)
  3716.                   0         receive data ready
  3717.                   1         overrun error detected
  3718.                   2         parity error detected
  3719.                   3         framing error detected
  3720.                   4         break detected
  3721.                   5         transmit holding register empty
  3722.                   6         transmit shift register empty
  3723.                   7         timed-out
  3724.  
  3725.   AL            = modem status
  3726.  
  3727.                   Bit       Significance (if set)
  3728.                   0         change in clear-to-send status
  3729.                   1         change in data-set-ready status
  3730.                   2         trailing edge ring indicator
  3731.                   3         change in receive line signal detect
  3732.                   4         clear-to-send
  3733.                   5         data-set-ready
  3734.                   6         ring indicator
  3735.                   7         receive line signal detect
  3736.  
  3737. Notes:
  3738.  
  3739.   ■ The initialization parameter byte is defined as follows:
  3740.  
  3741.     7 6 5             4 3               2                 1 0
  3742.     Baud rate         Parity            Stop bits         Word length
  3743.     ────────────────────────────────────────────────────────────────────────
  3744.     000 = 110         X0 = none         0 = 1 bit         10 = 7 bits
  3745.     001 = 150         01 = odd          1 = 2 bits        11 = 8 bits
  3746.     010 = 300         11 = even
  3747.     011 = 600
  3748.     100 = 1200
  3749.     101 = 2400
  3750.     110 = 4800
  3751.     111 = 9600
  3752.     ────────────────────────────────────────────────────────────────────────
  3753.  
  3754.   ■ To initialize the serial port for data rates greater than 9600 baud on
  3755.     PS/2 machines, see Int 14H Functions 04H and 05H.
  3756.  
  3757.  
  3758. ────────────────────────────────────────────────────────────────────────────
  3759. Int 14H                                                     [PC] [AT] [PS/2]
  3760. Function 01H
  3761. Write character to communications port
  3762. ────────────────────────────────────────────────────────────────────────────
  3763.  
  3764.   Writes a character to the specified serial communications port, returning
  3765.   the current status of the port.
  3766.  
  3767. Call with:
  3768.  
  3769.   AH            = 01H
  3770.   AL            = character
  3771.   DX            = communications port number (0 = COM1, 1 = COM2, etc.)
  3772.  
  3773. Returns:
  3774.  
  3775.   If function successful
  3776.  
  3777.   AH bit 7      = 0
  3778.   AH bits       = port status
  3779.   0─6
  3780.                   Bit       Significance (if set)
  3781.                   0         receive data ready
  3782.                   1         overrun error detected
  3783.                   2         parity error detected
  3784.                   3         framing error detected
  3785.                   4         break detected
  3786.                   5         transmit holding register empty
  3787.                   6         transmit shift register empty
  3788.  
  3789.   AL            = character (unchanged)
  3790.  
  3791.   If function unsuccessful (timed-out)
  3792.  
  3793.   AH bit 7      = 1
  3794.   AL            = character (unchanged)
  3795.  
  3796.  
  3797. ────────────────────────────────────────────────────────────────────────────
  3798. Int 14H                                                     [PC] [AT] [PS/2]
  3799. Function 02H
  3800. Read character from communications port
  3801. ────────────────────────────────────────────────────────────────────────────
  3802.  
  3803.   Reads a character from the specified serial communications port, also
  3804.   returning the port's status.
  3805.  
  3806. Call with:
  3807.  
  3808.   AH            = 02H
  3809.   DX            = communications port number (0 = COM1, 1 = COM2, etc.)
  3810.  
  3811. Returns:
  3812.  
  3813.   If function successful
  3814.  
  3815.   AH bit 7      = 0
  3816.   AH bits 0─6   = status
  3817.  
  3818.                   Bit       Significance (if set)
  3819.                   1         overrun error detected
  3820.                   2         parity error detected
  3821.                   3         framing error detected
  3822.                   4         break detected
  3823.  
  3824.   AL            = character
  3825.  
  3826.   If function unsuccessful (timed-out)
  3827.  
  3828.   AH bit 7      = 1
  3829.  
  3830.  
  3831. ────────────────────────────────────────────────────────────────────────────
  3832. Int 14H                                                     [PC] [AT] [PS/2]
  3833. Function 03H
  3834. Get communications port status
  3835. ────────────────────────────────────────────────────────────────────────────
  3836.  
  3837.   Returns the status of the specified serial communications port.
  3838.  
  3839. Call with:
  3840.  
  3841.   AH            = 03H
  3842.   DX            = communications port number (0 = COM1, 1 = COM2, etc.)
  3843.  
  3844. Returns:
  3845.  
  3846.   AH            = port status (see Int 14H Function 00H)
  3847.   AL            = modem status (see Int 14H Function 00H)
  3848.  
  3849.  
  3850. ────────────────────────────────────────────────────────────────────────────
  3851. Int 14H                                                               [PS/2]
  3852. Function 04H
  3853. Extended initialize communications port
  3854. ────────────────────────────────────────────────────────────────────────────
  3855.  
  3856.   Initializes a serial communications port to a desired baud rate, parity,
  3857.   word length, and number of stop bits. Provides a superset of Int 14H
  3858.   Function 00H capabilities for PS/2 machines.
  3859.  
  3860. Call with:
  3861.  
  3862.   AH            = 04H
  3863.   AL            = break flag
  3864.  
  3865.                   00H       no break
  3866.                   01H       break
  3867.  
  3868.   BH            = parity
  3869.  
  3870.                   00H       none
  3871.                   01H       odd
  3872.                   02H       even
  3873.                   03H       stick parity odd
  3874.                   04H       stick parity even
  3875.  
  3876.   BL            = stop bits
  3877.  
  3878.                   00H       1 stop bit
  3879.                   01H       2 stop bits if word length = 6─8 bits
  3880.                   01H       1.5 stop bits if word length = 5 bits
  3881.  
  3882.   CH            = word length
  3883.  
  3884.                   00H       5 bits
  3885.                   01H       6 bits
  3886.                   02H       7 bits
  3887.                   03H       8 bits
  3888.  
  3889.   CL            = baud rate
  3890.  
  3891.                   00H       110 baud
  3892.                   01H       150 baud
  3893.                   02H       300 baud
  3894.                   03H       600 baud
  3895.                   04H       1200 baud
  3896.                   05H       2400 baud
  3897.                   06H       4800 baud
  3898.                   07H       9600 baud
  3899.                   08H       19,200 baud
  3900.  
  3901.   DX            = communications port number (0 = COM1, 1 = COM2, etc.)
  3902.  
  3903. Returns:
  3904.  
  3905.   AH            = port status (see Int 14H Function 00H)
  3906.   AL            = modem status (see Int 14H Function 00H)
  3907.  
  3908.  
  3909. ────────────────────────────────────────────────────────────────────────────
  3910. Int 14H                                                               [PS/2]
  3911. Function 05H
  3912. Extended communications port control
  3913. ────────────────────────────────────────────────────────────────────────────
  3914.  
  3915.   Reads or sets the modem control register (MCR) for the specified serial
  3916.   communications port.
  3917.  
  3918. Call with:
  3919.  
  3920.   AH            = 05H
  3921.   AL            = subfunction
  3922.  
  3923.                   00H       to read modem control register
  3924.                   01H       to write modem control register
  3925.  
  3926.   BL            = modem control register contents (if AL = 01H)
  3927.  
  3928.                   Bit(s)    Significance
  3929.                   0         data-terminal ready
  3930.                   1         request-to-send
  3931.                   2         Out1
  3932.                   3         Out2
  3933.                   4         loop (for testing)
  3934.                   5─7       reserved
  3935.  
  3936.   DX            = communications port number (0 = COM1, 1 = COM2, etc.)
  3937.  
  3938. Returns:
  3939.  
  3940.   If called with AL = 00H
  3941.  
  3942.   BL            = modem control register contents (see above)
  3943.  
  3944.   If called with AL = 01H
  3945.  
  3946.   AH            = port status (see Int 14H Function 00H)
  3947.   AL            = modem status (see Int 14H Function 00H)
  3948.  
  3949.  
  3950. ────────────────────────────────────────────────────────────────────────────
  3951. Int 15H                                                                 [PC]
  3952. Function 00H
  3953. Turn on cassette motor
  3954. ────────────────────────────────────────────────────────────────────────────
  3955.  
  3956.   Turns on the motor of the cassette tape drive.
  3957.  
  3958. Call with:
  3959.  
  3960.   AH            = 00H
  3961.  
  3962. Returns:
  3963.  
  3964.   If function successful
  3965.  
  3966.   Carry flag    = clear
  3967.  
  3968.   If function unsuccessful
  3969.  
  3970.   Carry flag    = set
  3971.  
  3972.   AH            = status
  3973.  
  3974.                   86H       if cassette not present
  3975.  
  3976. Note:
  3977.  
  3978.   ■ This function is available only on the PC and the PCjr. It is not
  3979.     supported on the PC/XT and all subsequent models.
  3980.  
  3981.  
  3982. ────────────────────────────────────────────────────────────────────────────
  3983. Int 15H                                                                 [PC]
  3984. Function 01H
  3985. Turn off cassette motor
  3986. ────────────────────────────────────────────────────────────────────────────
  3987.  
  3988.   Turns off the motor of the cassette tape drive.
  3989.  
  3990. Call with:
  3991.  
  3992.   AH            = 01H
  3993.  
  3994. Returns:
  3995.  
  3996.   If function successful
  3997.  
  3998.   Carry flag    = clear
  3999.  
  4000.   If function unsuccessful
  4001.  
  4002.   Carry flag    = set
  4003.   AH            = status
  4004.  
  4005.                   86H       if cassette not present
  4006.  
  4007. Note:
  4008.  
  4009.   ■ This function is available only on the PC and the PCjr. It is not
  4010.     supported on the PC/XT and all subsequent models.
  4011.  
  4012.  
  4013. ────────────────────────────────────────────────────────────────────────────
  4014. Int 15H                                                                 [PC]
  4015. Function 02H
  4016. Read cassette
  4017. ────────────────────────────────────────────────────────────────────────────
  4018.  
  4019.   Reads one or more 256-byte blocks of data from the cassette tape drive to
  4020.   memory.
  4021.  
  4022. Call with:
  4023.  
  4024.   AH            = 02H
  4025.   CX            = number of bytes to read
  4026.   ES:BX         = segment:offset of buffer
  4027.  
  4028. Returns:
  4029.  
  4030.   If function successful
  4031.  
  4032.   Carry flag    = clear
  4033.   DX            = number of bytes actually read
  4034.   ES:BX         = segment:offset + 1 of last byte read
  4035.  
  4036.   If function unsuccessful
  4037.  
  4038.   Carry flag    = set
  4039.   AH            = status
  4040.  
  4041.                   01H       if CRC error
  4042.                   02H       if bit signals scrambled
  4043.                   04H       if no data found
  4044.                   80H       if invalid command
  4045.                   86H       if cassette not present
  4046.  
  4047. Note:
  4048.  
  4049.   ■ This function is available only on the PC and on the PCjr. It is not
  4050.     supported on the PC/XT and all subsequent models.
  4051.  
  4052.  
  4053. ────────────────────────────────────────────────────────────────────────────
  4054. Int 15H                                                                 [PC]
  4055. Function 03H
  4056. Write cassette
  4057. ────────────────────────────────────────────────────────────────────────────
  4058.  
  4059.   Writes one or more 256-byte blocks of data from memory to the cassette
  4060.   tape drive.
  4061.  
  4062. Call with:
  4063.  
  4064.   AH            = 03H
  4065.   CX            = number of bytes to write
  4066.   ES:BX         = segment:offset of buffer
  4067.  
  4068. Returns:
  4069.  
  4070.   If function successful
  4071.  
  4072.   Carry flag    = clear
  4073.   CX            = 00H
  4074.   ES:BX         = segment:offset + 1 of last byte written
  4075.  
  4076.   If function unsuccessful
  4077.  
  4078.   Carry flag    = set
  4079.   AH            = status
  4080.  
  4081.                   80H       if invalid command
  4082.                   86H       if cassette not present
  4083.  
  4084. Note:
  4085.  
  4086.   ■ This function is available only on the PC and on the PCjr. It is not
  4087.     supported on the PC/XT and all subsequent models.
  4088.  
  4089.  
  4090. ────────────────────────────────────────────────────────────────────────────
  4091. Int 15H                                                               [PS/2]
  4092. Function 0FH (15)
  4093. Format ESDI drive periodic interrupt
  4094. ────────────────────────────────────────────────────────────────────────────
  4095.  
  4096.   Invoked by the ROM BIOS on the ESDI Fixed Disk Drive Adapter/A during a
  4097.   format or surface analysis operation after each cylinder is completed.
  4098.  
  4099. Call with:
  4100.  
  4101.   AH            = 0FH
  4102.   AL            = phase code
  4103.                   0 = reserved
  4104.                   1 = surface analysis
  4105.                   2 = formatting
  4106.  
  4107. Returns:
  4108.  
  4109.   If formatting or analysis should continue
  4110.  
  4111.   Carry flag    = clear
  4112.  
  4113.   If formatting or analysis should be terminated
  4114.  
  4115.   Carry flag    = set
  4116.  
  4117. Notes:
  4118.  
  4119.   ■ This function call can be captured by a program so that it will be
  4120.     notified as each cylinder is formatted or analyzed. The program can
  4121.     count interrupts for each phase to determine the current cylinder
  4122.     number.
  4123.  
  4124.   ■ The default ROM BIOS handler for this function returns with the carry
  4125.     flag set.
  4126.  
  4127.  
  4128. ────────────────────────────────────────────────────────────────────────────
  4129. Int 15H                                                               [PS/2]
  4130. Function 21H (33) Subfunction 00H
  4131. Read POST error log
  4132. ────────────────────────────────────────────────────────────────────────────
  4133.  
  4134.   Returns error information that was accumulated during the most recent
  4135.   power-on self-test (POST).
  4136.  
  4137. Call with:
  4138.  
  4139.   AH            = 21H
  4140.   AL            = 00H
  4141.  
  4142. Returns:
  4143.  
  4144.   If function successful
  4145.  
  4146.   Carry flag    = clear
  4147.   AH            = 00H
  4148.   BX            = number of POST error codes stored
  4149.   ES:DI         = segment:offset of POST error log
  4150.  
  4151.   If function unsuccessful
  4152.  
  4153.   Carry flag    = set
  4154.   AH            = status
  4155.  
  4156.                   80H =     invalid command
  4157.                   86H =     function not supported
  4158.  
  4159. Notes:
  4160.  
  4161.   ■ The error log consists of single-word entries. The first byte of an
  4162.     entry is the device error code, and the second is the device identifier.
  4163.  
  4164.   ■ This function is not available on the PS/2 Models 25 and 30.
  4165.  
  4166.  
  4167. ────────────────────────────────────────────────────────────────────────────
  4168. Int 15H                                                               [PS/2]
  4169. Function 21H (33) Subfunction 01H
  4170. Write POST error log
  4171. ────────────────────────────────────────────────────────────────────────────
  4172.  
  4173.   Adds an entry to the power-on self-test (POST) error log.
  4174.  
  4175. Call with:
  4176.  
  4177.   AH            = 21H
  4178.   AL            = 01H
  4179.   BH            = device identifier
  4180.   BL            = device error code
  4181.  
  4182. Returns:
  4183.  
  4184.   If function successful
  4185.  
  4186.   Carry flag    = clear
  4187.   AH            = 00H
  4188.  
  4189.   If function unsuccessful
  4190.  
  4191.   Carry flag    = set
  4192.   AH            = status
  4193.  
  4194.                   01H =     error list full
  4195.                   80H =     invalid command
  4196.                   86H =     function not supported
  4197.  
  4198. Note:
  4199.  
  4200.   ■ This function is not available on the PS/2 Models 25 and 30.
  4201.  
  4202.  
  4203. ────────────────────────────────────────────────────────────────────────────
  4204. Int 15H                                                               [PS/2]
  4205. Function 4FH (79)
  4206. Keyboard intercept
  4207. ────────────────────────────────────────────────────────────────────────────
  4208.  
  4209.   Invoked for each keystroke by the ROM BIOS's Int 09H keyboard interrupt
  4210.   handler.
  4211.  
  4212. Call with:
  4213.  
  4214.   AH            = 4FH
  4215.   AL            = scan code
  4216.  
  4217. Returns:
  4218.  
  4219.   If scan code consumed
  4220.  
  4221.   Carry flag    = clear
  4222.  
  4223.   If scan code not consumed
  4224.  
  4225.   Carry flag    = set
  4226.   AL            = unchanged or new scan code
  4227.  
  4228. Notes:
  4229.  
  4230.   ■ An operating system or a resident utility can capture this function to
  4231.     filter the raw keyboard data stream. The new handler can substitute a
  4232.     new scan code, return the same scan code, or return the carry flag clear
  4233.     causing the keystroke to be discarded. The default ROM BIOS routine
  4234.     simply returns the scan code unchanged.
  4235.  
  4236.   ■ A program can call Int 15H Function C0H to determine whether the host
  4237.     machine's ROM BIOS supports this keyboard intercept.
  4238.  
  4239.  
  4240. ────────────────────────────────────────────────────────────────────────────
  4241. Int 15H                                                          [AT] [PS/2]
  4242. Function 80H (128)
  4243. Device open
  4244. ────────────────────────────────────────────────────────────────────────────
  4245.  
  4246.   Acquires ownership of a logical device for a process.
  4247.  
  4248. Call with:
  4249.  
  4250.   AH            = 80H
  4251.   BX            = device ID
  4252.   CX            = process ID
  4253.  
  4254. Returns:
  4255.  
  4256.   If function successful
  4257.  
  4258.   Carry flag    = clear
  4259.   AH            = 00H
  4260.  
  4261.   If function unsuccessful
  4262.  
  4263.   Carry flag    = set
  4264.   AH            = status
  4265.  
  4266. Note:
  4267.  
  4268.   ■ This function call, along with Int 15H Functions 81H and 82H, defines
  4269.     a simple protocol that can be used to arbitrate usage of devices by
  4270.     multiple processes. A multitasking program manager would be expected to
  4271.     capture Int 15H and provide the appropriate service. The default BIOS
  4272.     routine for this function simply returns with the carry flag clear and
  4273.     AH = 00H.
  4274.  
  4275.  
  4276. ────────────────────────────────────────────────────────────────────────────
  4277. Int 15H                                                          [AT] [PS/2]
  4278. Function 81H (129)
  4279. Device close
  4280. ────────────────────────────────────────────────────────────────────────────
  4281.  
  4282.   Releases ownership of a logical device for a process.
  4283.  
  4284. Call with:
  4285.  
  4286.   AH            = 81H
  4287.   BX            = device ID
  4288.   CX            = process ID
  4289.  
  4290. Returns:
  4291.  
  4292.   If function successful
  4293.  
  4294.   Carry flag    = clear
  4295.   AH            = 00H
  4296.  
  4297.   If function unsuccessful
  4298.  
  4299.   Carry flag    = set
  4300.   AH            = status
  4301.  
  4302. Note:
  4303.  
  4304.   ■ A multitasking program manager would be expected to capture Int 15H and
  4305.     provide the appropriate service. The default BIOS routine for this
  4306.     function simply returns with the carry flag clear and AH = 00H. See also
  4307.     Int 15H Functions 80H and 82H.
  4308.  
  4309.  
  4310. ────────────────────────────────────────────────────────────────────────────
  4311. Int 15H                                                          [AT] [PS/2]
  4312. Function 82H (130)
  4313. Process termination
  4314. ────────────────────────────────────────────────────────────────────────────
  4315.  
  4316.   Releases ownership of all logical devices for a process that is about to
  4317.   terminate.
  4318.  
  4319. Call with:
  4320.  
  4321.   AH            = 82H
  4322.   BX            = process ID
  4323.  
  4324. Returns:
  4325.  
  4326.   If function successful
  4327.  
  4328.   Carry flag    = clear
  4329.   AH            = 00H
  4330.  
  4331.   If function unsuccessful
  4332.  
  4333.   Carry flag    = set
  4334.   AH            = status
  4335.  
  4336. Note:
  4337.  
  4338.   ■ A multitasking program manager would be expected to capture Int 15H and
  4339.     provide the appropriate service. The default BIOS routine for this
  4340.     function simply returns with the carry flag clear and AH = 00H. See also
  4341.     Int 15H Functions 80H and 81H.
  4342.  
  4343.  
  4344. ────────────────────────────────────────────────────────────────────────────
  4345. Int 15H                                                          [AT] [PS/2]
  4346. Function 83H (131)
  4347. Event wait
  4348. ────────────────────────────────────────────────────────────────────────────
  4349.  
  4350.   Requests setting of a semaphore after a specified interval or cancels a
  4351.   previous request.
  4352.  
  4353. Call with:
  4354.  
  4355.   If requesting event wait
  4356.  
  4357.   AH            = 83H
  4358.   AL            = 00H
  4359.   CX:DX         = microseconds
  4360.   ES:BX         = segment:offset of semaphore byte
  4361.  
  4362.   If canceling event wait
  4363.  
  4364.   AH            = 83H
  4365.   AL            = 01H
  4366.  
  4367. Returns:
  4368.  
  4369.   If called with AL = 00H, and function successful
  4370.  
  4371.   Carry flag    = clear
  4372.  
  4373.   If called with AL = 00H, and function unsuccessful (Event Wait already
  4374.   active)
  4375.  
  4376.   Carry flag    = set
  4377.  
  4378.   If called with AL = 01H
  4379.  
  4380.   Nothing
  4381.  
  4382. Notes:
  4383.  
  4384.   ■ The function call returns immediately. If the function is successful,
  4385.     bit 7 of the semaphore byte is set when the specified interval has
  4386.     elapsed. The calling program is responsible for clearing the semaphore
  4387.     before requesting this function.
  4388.  
  4389.   ■ The actual duration of an event wait is always an integral multiple of
  4390.     976 microseconds. The CMOS date/clock chip interrupts are used to
  4391.     implement this function.
  4392.  
  4393.   ■ Use of this function allows programmed, hardware-independent delays at a
  4394.     finer resolution than can be obtained through use of the MS-DOS Get Time
  4395.     function (Int 21H Function 2CH, which returns time in hundredths of a
  4396.     second).
  4397.  
  4398.   ■ See also Int 15H Function 86H, which suspends the calling program for
  4399.     the specified interval in milliseconds.
  4400.  
  4401.   ■ This function is not supported on the PS/2 Models 25 and 30.
  4402.  
  4403.  
  4404. ────────────────────────────────────────────────────────────────────────────
  4405. Int 15H                                                          [AT] [PS/2]
  4406. Function 84H (132)
  4407. Read joystick
  4408. ────────────────────────────────────────────────────────────────────────────
  4409.  
  4410.   Returns the joystick switch settings and potentiometer values.
  4411.  
  4412. Call with:
  4413.  
  4414.   AH            = 84H
  4415.   DX            = subfunction
  4416.  
  4417.                   00H       to read switch settings
  4418.                   01H       to read resistive inputs
  4419.  
  4420. Returns:
  4421.  
  4422.   If function successful
  4423.  
  4424.   Carry flag    = clear
  4425.  
  4426.   and, if called with DX = 00H
  4427.  
  4428.   AL            = switch settings (bits 4─7)
  4429.  
  4430.   or, if called with DX = 01H
  4431.  
  4432.   AX            = A(x) value
  4433.   BX            = A(y) value
  4434.   CX            = B(x) value
  4435.   DX            = B(y) value
  4436.  
  4437.   If function unsuccessful
  4438.  
  4439.   Carry flag    = set
  4440.  
  4441. Notes:
  4442.  
  4443.   ■ An error condition is returned if DX does not contain a valid
  4444.     subfunction number.
  4445.  
  4446.   ■ If no game adapter is installed, AL is returned as 00H for Subfunction
  4447.     00H (i.e., all switches open); AX, BX, CX, and DX are returned
  4448.     containing 00H for Subfunction 01H.
  4449.  
  4450.   ■ Using a 250 KOhm joystick, the potentiometer values usually lie within
  4451.     the srange 0─416 (0000─01A0H).
  4452.  
  4453.  
  4454. ────────────────────────────────────────────────────────────────────────────
  4455. Int 15H                                                          [AT] [PS/2]
  4456. Function 85H (133)
  4457. SysReq key
  4458. ────────────────────────────────────────────────────────────────────────────
  4459.  
  4460.   Invoked by the ROM BIOS keyboard driver when the SysReq key is detected.
  4461.  
  4462. Call with:
  4463.  
  4464.   AH            = 85H
  4465.   AL            = key status
  4466.  
  4467.                   00H       if key make (depression)
  4468.                   01H       if key break (release)
  4469.  
  4470. Returns:
  4471.  
  4472.   If function successful
  4473.  
  4474.   Carry flag    = clear
  4475.   AH            = 00H
  4476.  
  4477.   If function unsuccessful
  4478.  
  4479.   Carry flag    = set
  4480.   AH            = status
  4481.  
  4482. Note:
  4483.  
  4484.   ■ The ROM BIOS handler for this function call is a dummy routine that
  4485.     always returns a success status unless called with an invalid
  4486.     subfunction number in AL. A multitasking program manager would be
  4487.     expected to capture Int 15H so that it can be notified when the user
  4488.     strikes the SysReq key.
  4489.  
  4490.  
  4491. ────────────────────────────────────────────────────────────────────────────
  4492. Int 15H                                                          [AT] [PS/2]
  4493. Function 86H (134)
  4494. Delay
  4495. ────────────────────────────────────────────────────────────────────────────
  4496.  
  4497.   Suspends the calling program for a specified interval in microseconds.
  4498.  
  4499. Call with:
  4500.  
  4501.   AH            = 86H
  4502.   CX:DX         = microseconds to wait
  4503.  
  4504. Returns:
  4505.  
  4506.   If function successful (wait was performed)
  4507.  
  4508.   Carry flag    = clear
  4509.  
  4510.   If function unsuccessful (wait was not performed)
  4511.  
  4512.   Carry flag    = set
  4513.  
  4514. Notes:
  4515.  
  4516.   ■ The actual duration of the wait is always an integral multiple of 976
  4517.     microseconds.
  4518.  
  4519.   ■ Use of this function allows programmed, hardware-independent delays at a
  4520.     finer resolution than can be obtained through use of the MS-DOS Get Time
  4521.     function (Int 21H Function 2CH, which returns time in hundredths of a
  4522.     second).
  4523.  
  4524.   ■ See also Int 15H Function 83H, which triggers a semaphore after a
  4525.     specified interval but does not suspend the calling program.
  4526.  
  4527.  
  4528. ────────────────────────────────────────────────────────────────────────────
  4529. Int 15H                                                          [AT] [PS/2]
  4530. Function 87H (135)
  4531. Move extended memory block
  4532. ────────────────────────────────────────────────────────────────────────────
  4533.  
  4534.   Transfers data between conventional memory and extended memory.
  4535.  
  4536. Call with:
  4537.  
  4538.   AH            = 87H
  4539.   CX            = number of words to move
  4540.   ES:SI         = segment:offset of Global Descriptor Table (see Notes)
  4541.  
  4542. Returns:
  4543.  
  4544.   If function successful
  4545.  
  4546.   Carry flag    = clear
  4547.   AH            = 00H
  4548.  
  4549.   If function unsuccessful
  4550.  
  4551.   Carry flag    = set
  4552.   AH            = status
  4553.  
  4554.                   01H       if RAM parity error
  4555.                   02H       if exception interrupt error
  4556.                   03H       if gate address line 20 failed
  4557.  
  4558. Notes:
  4559.  
  4560.   ■ Conventional memory lies at addresses below the 640 KB boundary, and is
  4561.     used for the execution of MS-DOS and its application programs. Extended
  4562.     memory lies at addresses above 1 MB, and can only be accessed by an
  4563.     80286 or 80386 CPU running in protected mode. As much as 15 MB of
  4564.     extended memory can be installed in an IBM PC/AT or compatible.
  4565.  
  4566.   ■ The Global Descriptor Table (GDT) used by this function must be set up
  4567.     as follows:
  4568.  
  4569.     Byte(s)     Contents
  4570.     ────────────────────────────────────────────────────────────────────────
  4571.     00H─0FH     reserved (should be 0)
  4572.     10H─11H     segment length in bytes (2*CX - 1 or greater)
  4573.     12H─14H     24-bit source address
  4574.     15H         access rights byte (always 93H)
  4575.     16H─17H     reserved (should be 0)
  4576.     18H─19H     segment length in bytes (2*CX - 1 or greater)
  4577.     1AH─1CH     24-bit destination address
  4578.     1DH         access rights byte (always 93H)
  4579.     1EH─2FH     reserved (should be 0)
  4580.     ────────────────────────────────────────────────────────────────────────
  4581.  
  4582.     The table is composed of six 8-byte descriptors to be used by the CPU in
  4583.     protected mode. The four descriptors in offsets 00H─0FH and 20H─2FH are
  4584.     filled in by the ROM BIOS before the CPU mode switch.
  4585.  
  4586.   ■ The addresses used in the descriptor table are linear (physical) 24-bit
  4587.     addresses in the range 000000H─FFFFFFH──not segments and offsets──with
  4588.     the least significant byte at the lowest address and the most
  4589.     significant byte at the highest address.
  4590.  
  4591.   ■ The block move is performed with interrupts disabled; thus, use of this
  4592.     function may interfere with the operation of communications programs,
  4593.     network drivers, or other software that relies on prompt servicing of
  4594.     hardware interrupts.
  4595.  
  4596.   ■ Programs and drivers that access extended memory with this function
  4597.     cannot be executed in the Compatibility Environment of OS/2.
  4598.  
  4599.   ■ This function is not supported on the PS/2 Models 25 and 30.
  4600.  
  4601.  
  4602. ────────────────────────────────────────────────────────────────────────────
  4603. Int 15H                                                          [AT] [PS/2]
  4604. Function 88H (136)
  4605. Get extended memory size
  4606. ────────────────────────────────────────────────────────────────────────────
  4607.  
  4608.   Returns the amount of extended memory installed in the system.
  4609.  
  4610. Call with:
  4611.  
  4612.   AH            = 88H
  4613.  
  4614. Returns:
  4615.  
  4616.   AX            = amount of extended memory (in KB)
  4617.  
  4618. Notes:
  4619.  
  4620.   ■ Extended memory is memory at addresses above 1 MB, which can only be
  4621.     accessed by an 80286 or 80386 CPU running in protected mode. Because
  4622.     MS-DOS is a real-mode operating system, extended memory can be used for
  4623.     storage of volatile data but cannot be used for execution of programs.
  4624.  
  4625.   ■ Programs and drivers that use this function cannot be executed in the
  4626.     Compatibility Environment of OS/2.
  4627.  
  4628.   ■ This function is not supported on the PS/2 Models 25 and 30.
  4629.  
  4630.  
  4631. ────────────────────────────────────────────────────────────────────────────
  4632. Int 15H                                                          [AT] [PS/2]
  4633. Function 89H (137)
  4634. Enter protected mode
  4635. ────────────────────────────────────────────────────────────────────────────
  4636.  
  4637.   Switches the CPU from real mode into protected mode.
  4638.  
  4639. Call with:
  4640.  
  4641.   AH            = 89H
  4642.   BH            = interrupt number for IRQ0, written to ICW2 of 8259 PIC #1
  4643.                   (must be evenly divisible by 8, determines IRQ0─IRQ7)
  4644.   BL            = interrupt number for IRQ8, written to ICW2 of 8259 PIC #2
  4645.                   (must be evenly divisible by 8, determines IRQ8─IRQ15)
  4646.   ES:SI         = segment:offset of Global Descriptor Table (GDT)
  4647.  
  4648. Returns:
  4649.  
  4650.   If function successful (CPU is in protected mode)
  4651.  
  4652.   Carry flag    = clear
  4653.   AH            = 00H
  4654.   CS            = user-defined selector
  4655.   DS            = user-defined selector
  4656.   ES            = user-defined selector
  4657.   SS            = user-defined selector
  4658.  
  4659.   If function unsuccessful (CPU is in real mode)
  4660.  
  4661.   Carry flag    = set
  4662.   AH            = FFH
  4663.  
  4664. Notes:
  4665.  
  4666.   ■ The Global Descriptor Table must contain eight descriptors set up as
  4667.     follows:
  4668.  
  4669.     Offset      Descriptor usage
  4670.     ────────────────────────────────────────────────────────────────────────
  4671.     00H         dummy descriptor (initialized to 0)
  4672.     08H         Global Descriptor Table (GDT)
  4673.     10H         Interrupt Descriptor Table (IDT)
  4674.     18H         user's data segment (DS)
  4675.     20H         user's extra segment (ES)
  4676.     28H         user's stack segment (SS)
  4677.     30H         user's code segment (CS)
  4678.     38H         BIOS code segment
  4679.     ────────────────────────────────────────────────────────────────────────
  4680.  
  4681.     The user must initialize the first seven descriptors; the eighth is
  4682.     filled in by the ROM BIOS to provide addressability for its own
  4683.     execution. The calling program may modify and use the eighth descriptor
  4684.     for any purpose after return from this function call.
  4685.  
  4686.   ■ This function is not supported on the PS/2 Models 25 and 30.
  4687.  
  4688.  
  4689. ────────────────────────────────────────────────────────────────────────────
  4690. Int 15H                                                          [AT] [PS/2]
  4691. Function 90H (144)
  4692. Device wait
  4693. ────────────────────────────────────────────────────────────────────────────
  4694.  
  4695.   Invoked by the ROM BIOS fixed disk, floppy disk, printer, network, and
  4696.   keyboard drivers prior to performing a programmed wait for I/O completion.
  4697.  
  4698. Call with:
  4699.  
  4700.   AH            = 90H
  4701.   AL            = device type
  4702.  
  4703.                   00H─7FH   serially reusable devices
  4704.                   80H─BFH   reentrant devices
  4705.                   C0H─FFH   wait-only calls, no corresponding Post function
  4706.  
  4707.   ES:BX         = segment:offset of request block for device types 80H─FFH
  4708.  
  4709. Returns:
  4710.  
  4711.   If no wait (driver must perform its own time-out)
  4712.  
  4713.   Carry flag    = clear
  4714.   AH            = 00H
  4715.  
  4716.   If wait was performed
  4717.  
  4718.   Carry flag    = set
  4719.  
  4720. Notes:
  4721.  
  4722.   ■ Predefined device types are:
  4723.  
  4724.     00H         disk (may time-out)
  4725.     01H         floppy disk (may time-out)
  4726.     02H         keyboard (no time-out)
  4727.     03H         pointing device (PS/2, may time-out)
  4728.     80H         network (no time-out)
  4729.     FCH         fixed disk reset (PS/2, may time-out)
  4730.     FDH         floppy disk drive motor start (may time-out)
  4731.     FEH         printer (may time-out)
  4732.  
  4733.   ■ For network adapters, ES:BX points to a network control block (NCB).
  4734.  
  4735.   ■ A multitasking program manager would be expected to capture Int 15H
  4736.     Function 90H so that it can dispatch other tasks while I/O is in
  4737.     progress. The default BIOS routine for this function simply returns with
  4738.     the carry flag clear and AH = 00H.
  4739.  
  4740.  
  4741. ────────────────────────────────────────────────────────────────────────────
  4742. Int 15H                                                          [AT] [PS/2]
  4743. Function 91H (145)
  4744. Device post
  4745. ────────────────────────────────────────────────────────────────────────────
  4746.  
  4747.   Invoked by the ROM BIOS fixed disk, floppy disk, network, and keyboard
  4748.   drivers to signal that I/O is complete and/or the device is ready.
  4749.  
  4750. Call with:
  4751.  
  4752.   AH            = 91H
  4753.   AL            = device type
  4754.  
  4755.                   00H─7FH   serially reusable devices
  4756.                   80H─BFH   reentrant devices
  4757.  
  4758.   ES:BX         = segment:offset of request block for device types 80H─BFH
  4759.  
  4760. Returns:
  4761.  
  4762.   AH            = 00H
  4763.  
  4764. Notes:
  4765.  
  4766.   ■ Predefined device types that may use Device Post are:
  4767.  
  4768.     00H         disk (may time-out)
  4769.     01H         floppy disk (may time-out)
  4770.     02H         keyboard (no time-out)
  4771.     03H         pointing device (PS/2, may time-out)
  4772.     80H         network (no time-out)
  4773.  
  4774.   ■ The ROM BIOS printer routine does not invoke this function because
  4775.     printer output is not interrupt driven.
  4776.  
  4777.   ■ A multitasking program manager would be expected to capture Int 15H
  4778.     Function 91H so that it can be notified when I/O is completed and
  4779.     awaken the requesting task. The default BIOS routine for this function
  4780.     simply returns with the carry flag clear and AH = 00H.
  4781.  
  4782.  
  4783. ────────────────────────────────────────────────────────────────────────────
  4784. Int 15H                                                          [AT] [PS/2]
  4785. Function C0H (192)
  4786. Get system environment
  4787. ────────────────────────────────────────────────────────────────────────────
  4788.  
  4789.   Returns a pointer to a table containing various information about the
  4790.   system configuration.
  4791.  
  4792. Call with:
  4793.  
  4794.   AH            = C0H
  4795.  
  4796. Returns:
  4797.  
  4798.   ES:BX         = segment:offset of configuration table (see Notes)
  4799.  
  4800. Notes:
  4801.  
  4802.   ■ The format of the system configuration table is as follows:
  4803.  
  4804.     Byte(s)   Contents
  4805.     ────────────────────────────────────────────────────────────────────────
  4806.     00H─01H   length of table in bytes
  4807.     02H       system model (see following Note)
  4808.     03H       system submodel (see following Note)
  4809.     04H       BIOS revision level
  4810.     05H       configuration flags
  4811.  
  4812.               Bit                  Significance (if set)
  4813.               0                    reserved
  4814.               1                    Micro Channel implemented
  4815.               2                    extended BIOS data area allocated
  4816.               3                    Wait for External Event is available
  4817.               4                    keyboard intercept (Int 15H Function
  4818.                                    4FH) available
  4819.               5                    real-time clock available
  4820.               6                    slave 8259 present (cascaded IRQ2)
  4821.               7                    DMA channel 3 used
  4822.     06H─09H   reserved
  4823.     ────────────────────────────────────────────────────────────────────────
  4824.  
  4825.   ■ The system model and type bytes are assigned as follows:
  4826.  
  4827.     Machine              Model byte          Submodel byte
  4828.     ────────────────────────────────────────────────────────────────────────
  4829.     PC                   FFH
  4830.     PC/XT                FEH
  4831.     PC/XT                FBH                 00H or 01H
  4832.     PCjr                 FDH
  4833.     PC/AT                FCH                 00H or 01H
  4834.     PC/XT-286            FCH                 02H
  4835.     PC Convertible       F9H
  4836.     PS/2 Model 30        FAH                 00H
  4837.     PS/2 Model 50        FCH                 04H
  4838.     PS/2 Model 60        FCH                 05H
  4839.     PS/2 Model 70        F8H                 04H or 09H
  4840.     PS/2 Model 80        F8H                 00H or 01H
  4841.     ────────────────────────────────────────────────────────────────────────
  4842.  
  4843.  
  4844. ────────────────────────────────────────────────────────────────────────────
  4845. Int 15H                                                               [PS/2]
  4846. Function C1H (193)
  4847. Get address of extended BIOS data area
  4848. ────────────────────────────────────────────────────────────────────────────
  4849.  
  4850.   Returns the segment address of the base of the extended BIOS data area.
  4851.  
  4852. Call with:
  4853.  
  4854.   AH            = C1H
  4855.  
  4856. Returns:
  4857.  
  4858.   If function successful
  4859.  
  4860.   Carry flag    = clear
  4861.   ES            = segment of extended BIOS data area
  4862.  
  4863.   If function unsuccessful
  4864.  
  4865.   Carry flag    = set
  4866.  
  4867. Notes:
  4868.  
  4869.   ■ The extended BIOS data area is allocated at the high end of conventional
  4870.     memory during the POST (Power-On-Self-Test) sequence. The word at
  4871.     0040:0013H (memory size) is updated to reflect the reduced amount of
  4872.     memory available for MS-DOS and application programs. The first byte in
  4873.     the extended BIOS data area is initialized to its length in KB.
  4874.  
  4875.   ■ A program can determine whether the extended BIOS data area exists with
  4876.     Int 15H Function C0H.
  4877.  
  4878.  
  4879. ────────────────────────────────────────────────────────────────────────────
  4880. Int 15H                                                               [PS/2]
  4881. Function C2H (194) Subfunction 00H
  4882. Enable/disable pointing device
  4883. ────────────────────────────────────────────────────────────────────────────
  4884.  
  4885.   Enables or disables the system's mouse or other pointing device.
  4886.  
  4887. Call with:
  4888.  
  4889.   AH            = C2H
  4890.   AL            = 00H
  4891.   BH            = enable/disable flag
  4892.  
  4893.                   00H =     disable
  4894.                   01H =     enable
  4895.  
  4896. Returns:
  4897.  
  4898.   If function successful
  4899.  
  4900.   Carry flag    = clear
  4901.   AH            = 00H
  4902.  
  4903.   If function unsuccessful
  4904.  
  4905.   Carry flag    = set
  4906.   AH            = status
  4907.  
  4908.                   01H       if invalid function call
  4909.                   02H       if invalid input
  4910.                   03H       if interface error
  4911.                   04H       if resend
  4912.                   05H       if no far call installed
  4913.  
  4914.  
  4915. ────────────────────────────────────────────────────────────────────────────
  4916. Int 15H                                                               [PS/2]
  4917. Function C2H (194) Subfunction 01H
  4918. Reset pointing device
  4919. ────────────────────────────────────────────────────────────────────────────
  4920.  
  4921.   Resets the system's mouse or other pointing device, setting the sample
  4922.   rate, resolution, and other characteristics to their default values.
  4923.  
  4924. Call with:
  4925.  
  4926.   AH            = C2H
  4927.   AL            = 01H
  4928.  
  4929. Returns:
  4930.  
  4931.   If function successful
  4932.  
  4933.   Carry flag    = clear
  4934.   AH            = 00H
  4935.   BH            = device ID
  4936.  
  4937.   If function unsuccessful
  4938.  
  4939.   Carry flag    = set
  4940.   AH            = status (see Int 15H Function C2H Subfunction 00H)
  4941.  
  4942. Notes:
  4943.  
  4944.   ■ After a reset operation, the state of the pointing device is as follows:
  4945.  
  4946.     ∙ disabled;
  4947.  
  4948.     ∙ sample rate at 100 reports per second;
  4949.  
  4950.     ∙ resolution at 4 counts per millimeter;
  4951.  
  4952.     ∙ and scaling at 1 to 1.
  4953.  
  4954.   The data package size is unchanged by this function.
  4955.  
  4956.   ■ The application can use the other Int 15H Function C2H subfunctions to
  4957.     initialize the pointing device to other sample rates, resolution, and
  4958.     scaling, and then enable the device with Int 15H Function C2H
  4959.     Subfunction 00H.
  4960.  
  4961.   ■ See also Int 15H Function C2H Subfunction 05H, which incidentally
  4962.     resets the pointing device in a similar manner.
  4963.  
  4964.  
  4965. ────────────────────────────────────────────────────────────────────────────
  4966. Int 15H                                                               [PS/2]
  4967. Function C2H (194) Subfunction 02H
  4968. Set sample rate
  4969. ────────────────────────────────────────────────────────────────────────────
  4970.  
  4971.   Sets the sampling rate of the system's mouse or other pointing device.
  4972.  
  4973. Call with:
  4974.  
  4975.   AH            = C2H
  4976.   AL            = 02H
  4977.   BH            = sample rate value
  4978.  
  4979.                   00H =     10 reports per second
  4980.                   01H =     20 reports per second
  4981.                   02H =     40 reports per second
  4982.                   03H =     60 reports per second
  4983.                   04H =     80 reports per second
  4984.                   05H =     100 reports per second
  4985.                   06H =     200 reports per second
  4986.  
  4987. Returns:
  4988.  
  4989.   If function successful
  4990.  
  4991.   Carry flag    = clear
  4992.   AH            = 00H
  4993.  
  4994.   If function unsuccessful
  4995.  
  4996.   Carry flag    = set
  4997.   AH            = status (see Int 15H Function C2H Subfunction 00H)
  4998.  
  4999. Note:
  5000.  
  5001.   ■ The default sample rate is 100 reports per second after a reset
  5002.     operation (Int 15H Function C2H Subfunction 01H).
  5003.  
  5004.  
  5005. ────────────────────────────────────────────────────────────────────────────
  5006. Int 15H                                                               [PS/2]
  5007. Function C2H (194) Subfunction 03H
  5008. Set resolution
  5009. ────────────────────────────────────────────────────────────────────────────
  5010.  
  5011.   Sets the resolution of the system's mouse or other pointing device.
  5012.  
  5013. Call with:
  5014.  
  5015.   AH            = C2H
  5016.   AL            = 03H
  5017.   BH            = resolution value
  5018.  
  5019.                   00H =     1 count per millimeter
  5020.                   01H =     2 counts per millimeter
  5021.                   02H =     4 counts per millimeter
  5022.                   03H =     8 counts per millimeter
  5023.  
  5024. Returns:
  5025.  
  5026.   If function successful
  5027.  
  5028.   Carry flag    = clear
  5029.   AH            = 00H
  5030.  
  5031.   If function unsuccessful
  5032.  
  5033.   Carry flag    = set
  5034.   AH            = status (see Int 15H Function C2H Subfunction 00H)
  5035.  
  5036. Note:
  5037.  
  5038.   ■ The default resolution is 4 counts per millimeter after a reset
  5039.     operation (Int 15H Function C2H Subfunction 01H).
  5040.  
  5041.  
  5042. ────────────────────────────────────────────────────────────────────────────
  5043. Int 15H                                                               [PS/2]
  5044. Function C2H (194) Subfunction 04H
  5045. Get pointing device type
  5046. ────────────────────────────────────────────────────────────────────────────
  5047.  
  5048.   Returns the identification code for the system's mouse or other pointing
  5049.   device.
  5050.  
  5051. Call with:
  5052.  
  5053.   AH            = C2H
  5054.   AL            = 04H
  5055.  
  5056. Returns:
  5057.  
  5058.   If function successful
  5059.  
  5060.   Carry flag    = clear
  5061.   AH            = 00H
  5062.   BH            = device ID
  5063.  
  5064.   If function unsuccessful
  5065.  
  5066.   Carry flag    = set
  5067.   AH            = status (see Int 15H Function C2H Subfunction 00H)
  5068.  
  5069.  
  5070. ────────────────────────────────────────────────────────────────────────────
  5071. Int 15H                                                               [PS/2]
  5072. Function C2H (194) Subfunction 05H
  5073. Initialize pointing device interface
  5074. ────────────────────────────────────────────────────────────────────────────
  5075.  
  5076.   Sets the data package size for the system's mouse or other pointing
  5077.   device, and initializes the resolution, sampling rate, and scaling to
  5078.   their default values.
  5079.  
  5080. Call with:
  5081.  
  5082.   AH            = C2H
  5083.   AL            = 05H
  5084.   BH            = data package size in bytes (1─8)
  5085.  
  5086. Returns:
  5087.  
  5088.   If function successful
  5089.  
  5090.   Carry flag    = clear
  5091.   AH            = 00H
  5092.  
  5093.   If function unsuccessful
  5094.  
  5095.   Carry flag    = set
  5096.   AH            = status (see Int 15H Function C2H Subfunction 00H)
  5097.  
  5098. Note:
  5099.  
  5100.   ■ After this operation, the state of the pointing device is as follows:
  5101.  
  5102.     ∙ disabled;
  5103.  
  5104.     ∙ sample rate at 100 reports per second;
  5105.  
  5106.     ∙ resolution at 4 counts per millimeter;
  5107.  
  5108.     ∙ and scaling at 1 to 1.
  5109.  
  5110.  
  5111. ────────────────────────────────────────────────────────────────────────────
  5112. Int 15H                                                               [PS/2]
  5113. Function C2H (194) Subfunction 06H
  5114. Set scaling or get status
  5115. ────────────────────────────────────────────────────────────────────────────
  5116.  
  5117.   Returns the current status of the system's mouse or other pointing device
  5118.   or sets the device's scaling factor.
  5119.  
  5120. Call with:
  5121.  
  5122.   AH            = C2H
  5123.   AL            = 06H
  5124.   BH            = extended command
  5125.  
  5126.                   00H =     return device status
  5127.                   01H =     set scaling at 1:1
  5128.                   02H =     set scaling at 2:1
  5129.  
  5130. Returns:
  5131.  
  5132.   If function successful
  5133.  
  5134.   Carry flag    = clear
  5135.   AH            = 00H
  5136.  
  5137.   and, if called with BH = 00H
  5138.  
  5139.   BL            = status byte
  5140.  
  5141.                   Bit       Significance
  5142.                   0 =       1 if right button pressed
  5143.                   1 =       reserved
  5144.                   2 =       1 if left button pressed
  5145.                   3 =       reserved
  5146.                   4 =       0 if 1:1 scaling
  5147.                             1 if 2:1 scaling
  5148.                   5 =       0 if device disabled
  5149.                             1 if device enabled
  5150.                   6 =       0 if stream mode
  5151.                             1 if remote mode
  5152.                   7 =       reserved
  5153.  
  5154.   CL            = resolution
  5155.  
  5156.                   00H =     1 count per millimeter
  5157.                   01H =     2 counts per millimeter
  5158.                   02H =     4 counts per millimeter
  5159.                   03H =     8 counts per millimeter
  5160.  
  5161.   DL            = sample rate
  5162.  
  5163.                   0AH =     10 reports per second
  5164.                   14H =     20 reports per second
  5165.                   28H =     40 reports per second
  5166.                   3CH =     60 reports per second
  5167.                   50H =     80 reports per second
  5168.                   64H =     100 reports per second
  5169.                   C8H =     200 reports per second
  5170.  
  5171.   If function unsuccessful
  5172.  
  5173.   Carry flag    = set
  5174.   AH            = status (see Int 15H Function C2H Subfunction 00H)
  5175.  
  5176.  
  5177. ────────────────────────────────────────────────────────────────────────────
  5178. Int 15H                                                               [PS/2]
  5179. Function C2H (194) Subfunction 07H
  5180. Set pointing device handler address
  5181. ────────────────────────────────────────────────────────────────────────────
  5182.  
  5183.   Notifies the ROM BIOS pointing device driver of the address for a routine
  5184.   to be called each time pointing device data is available.
  5185.  
  5186. Call with:
  5187.  
  5188.   AH            = C2H
  5189.   AL            = 07H
  5190.   ES:BX         = segment:offset of user routine
  5191.  
  5192. Returns:
  5193.  
  5194.   If function successful
  5195.  
  5196.   Carry flag    = clear
  5197.  
  5198.   If function unsuccessful
  5199.  
  5200.   Carry flag    = set
  5201.   AH            = status (see Int 15H Function C2H Subfunction 00H)
  5202.  
  5203. Notes:
  5204.  
  5205.   ■ The user's handler for pointing device data is entered via a far call
  5206.     with four parameters on the stack:
  5207.  
  5208.     SS:SP+0AH   status
  5209.     SS:SP+08H   x coordinate
  5210.     SS:SP+06H   y coordinate
  5211.     SS:SP+04H   z coordinate (always 0)
  5212.  
  5213.     The handler must exit via a far return without removing the parameters
  5214.     from the stack.
  5215.  
  5216.   ■ The status parameter passed to the user's handler is interpreted as
  5217.     follows:
  5218.  
  5219.     Bit(s)      Significance (if set)
  5220.     ────────────────────────────────────────────────────────────────────────
  5221.     0           left button pressed
  5222.     1           right button pressed
  5223.     2─3         reserved
  5224.     4           sign of x data is negative
  5225.     5           sign of y data is negative
  5226.     6           x data has overflowed
  5227.     7           y data has overflowed
  5228.     8─15        reserved
  5229.     ────────────────────────────────────────────────────────────────────────
  5230.  
  5231.  
  5232. ────────────────────────────────────────────────────────────────────────────
  5233. Int 15H                                                               [PS/2]
  5234. Function C3H (195)
  5235. Set watchdog time-out
  5236. ────────────────────────────────────────────────────────────────────────────
  5237.  
  5238.   Enables or disables a watchdog timer.
  5239.  
  5240. Call with:
  5241.  
  5242.   AH            = C3H
  5243.   AL            = subfunction
  5244.  
  5245.                   00H       to disable watchdog time-out
  5246.                   01H       to enable watchdog time-out
  5247.  
  5248.   BX            = watchdog timer counter (if AL = 01H)
  5249.  
  5250. Returns:
  5251.  
  5252.   If function successful
  5253.  
  5254.   Carry flag    = clear
  5255.  
  5256.   If function unsuccessful
  5257.  
  5258.   Carry flag    = set
  5259.  
  5260. Notes:
  5261.  
  5262.   ■ The watchdog timer generates an NMI interrupt.
  5263.  
  5264.   ■ This function is not available on the PS/2 Models 25 and 30.
  5265.  
  5266.  
  5267. ────────────────────────────────────────────────────────────────────────────
  5268. Int 15H                                                               [PS/2]
  5269. Function C4H (196)
  5270. Programmable option select
  5271. ────────────────────────────────────────────────────────────────────────────
  5272.  
  5273.   Returns the base Programmable Option Select register address, enables a
  5274.   slot for setup, or enables an adapter.
  5275.  
  5276. Call with:
  5277.  
  5278.   AH            = C4H
  5279.   AL            = subfunction
  5280.  
  5281.                   00H       to return base POS adapter register address
  5282.                   01H       to enable slot
  5283.                   02H       to enable adapter
  5284.  
  5285.   BL            = slot number (if AL = 01H)
  5286.  
  5287. Returns:
  5288.  
  5289.   If function successful
  5290.  
  5291.   Carry flag    = clear
  5292.  
  5293.   and, if called with AL = 00H
  5294.  
  5295.   DX            = base POS adapter register address
  5296.  
  5297.   If function unsuccessful
  5298.  
  5299.   Carry flag    = set
  5300.  
  5301. Notes:
  5302.  
  5303.   ■ This function is available only on machines using the Micro Channel
  5304.     Architecture (MCA) bus.
  5305.  
  5306.   ■ After a slot is enabled with Subfunction 01H, specific information can
  5307.     be obtained for the adapter in that slot by performing port input
  5308.     operations:
  5309.  
  5310.     Port        Function
  5311.     100H        MCA ID (low byte)
  5312.     101H        MCA ID (high byte)
  5313.     102H        Option Select Byte 1
  5314.                 bit 0 = 1 if enabled, = 0 if disabled
  5315.     103H        Option Select Byte 2
  5316.     104H        Option Select Byte 3
  5317.     105H        Option Select Byte 4
  5318.                 bits 6─7 = channel check indicators
  5319.     106H        Subaddress Extension (low byte)
  5320.     107H        Subaddress Extension (high byte)
  5321.  
  5322.  
  5323. ────────────────────────────────────────────────────────────────────────────
  5324. Int 16H                                                     [PC] [AT] [PS/2]
  5325. Function 00H
  5326. Read character from keyboard
  5327. ────────────────────────────────────────────────────────────────────────────
  5328.  
  5329.   Reads a character from the keyboard, also returning the keyboard scan
  5330.   code.
  5331.  
  5332. Call with:
  5333.  
  5334.   AH            = 00H
  5335.  
  5336. Returns:
  5337.  
  5338.   AH            = keyboard scan code
  5339.   AL            = ASCII character
  5340.  
  5341.  
  5342. ────────────────────────────────────────────────────────────────────────────
  5343. Int 16H                                                     [PC] [AT] [PS/2]
  5344. Function 01H
  5345. Get keyboard status
  5346. ────────────────────────────────────────────────────────────────────────────
  5347.  
  5348.   Determines whether a character is ready for input, returning a flag and
  5349.   also the character itself, if one is waiting.
  5350.  
  5351. Call with:
  5352.  
  5353.   AH            = 01H
  5354.  
  5355. Returns:
  5356.  
  5357.   If key waiting to be input
  5358.  
  5359.   Zero flag     = clear
  5360.   AH            = keyboard scan code
  5361.   AL         
  5362.   = character
  5363.  
  5364.   If no key waiting
  5365.  
  5366.   Zero flag     = set
  5367.  
  5368. Note:
  5369.  
  5370.   ■ The character returned by this function when the zero flag is clear is
  5371.     not removed from the type-ahead buffer. The same character and scan code
  5372.     will be returned by the next call to Int 16H Function 00H.
  5373.  
  5374.  
  5375. ────────────────────────────────────────────────────────────────────────────
  5376. Int 16H                                                     [PC] [AT] [PS/2]
  5377. Function 02H
  5378. Get keyboard flags
  5379. ────────────────────────────────────────────────────────────────────────────
  5380.  
  5381.   Returns the ROM BIOS flags byte that describes the state of the various
  5382.   keyboard toggles and shift keys.
  5383.  
  5384. Call with:
  5385.  
  5386.   AH            = 02H
  5387.  
  5388. Returns:
  5389.  
  5390.   AL            = flags
  5391.                   Bit       Significance (if set)
  5392.                   0         right Shift key is down
  5393.                   1         left Shift key is down
  5394.                   2         Ctrl key is down
  5395.                   3         Alt key is down
  5396.                   4         Scroll Lock on
  5397.                   5         Num Lock on
  5398.                   6         Caps Lock on
  5399.                   7         Insert on
  5400.  
  5401. Note:
  5402.  
  5403.   ■ The keyboard flags byte is stored in the ROM BIOS data area at
  5404.     0000:0417H.
  5405.  
  5406.  
  5407. ────────────────────────────────────────────────────────────────────────────
  5408. Int 16H                                                     [PC] [AT] [PS/2]
  5409. Function 03H
  5410. Set repeat rate
  5411. ────────────────────────────────────────────────────────────────────────────
  5412.  
  5413.   Sets the ROM BIOS key repeat ("typematic") rate and delay.
  5414.  
  5415. Call with:
  5416.  
  5417.   On the PC/AT and PS/2
  5418.  
  5419.   AH            = 03H
  5420.   AL            = 05H
  5421.   BH            = repeat delay (see Notes)
  5422.   BL            = repeat rate (see Notes)
  5423.  
  5424.   On the PCjr
  5425.  
  5426.   AH            = 03H
  5427.   AL            = subfunction
  5428.  
  5429.                   00H       to restore default rate and delay
  5430.                   01H       to increase initial delay
  5431.                   02H       to decrease repeat rate by one-half
  5432.                   03H       to increase delay and decrease repeat rate by
  5433.                             one-half
  5434.                   04H       to turn off keyboard repeat
  5435.  
  5436. Returns:
  5437.  
  5438.   Nothing
  5439.  
  5440. Notes:
  5441.  
  5442.   ■ Subfunctions 00H─04H are available on the PCjr but are not supported by
  5443.     the PC or PC/XT ROM BIOS. Subfunction 05H is available on PC/ATs with
  5444.     ROM BIOS's dated 11/15/85 and later, and on the PS/2.
  5445.  
  5446.   ■ On the PC/AT and PS/2, the value in BH controls the amount of delay
  5447.     before the first repeat key is generated. The delay is always a multiple
  5448.     of 250 milliseconds:
  5449.  
  5450.     Value       Delay (msec.)
  5451.     00H         250
  5452.     01H         500
  5453.     02H         750
  5454.     03H         1000
  5455.  
  5456.   ■ On the PC/AT and PS/2, the value for the repeat rate in characters per
  5457.     second can be chosen from the following table:
  5458.  
  5459.     Value       Repeat rate (characters per second)
  5460.     00H         30.0
  5461.     01H         26.7
  5462.     02H         24.0
  5463.     03H         21.8
  5464.     04H         20.0
  5465.     05H         18.5
  5466.     06H         17.1
  5467.     07H         16.0
  5468.     08H         15.0
  5469.     09H         13.3
  5470.     0AH         12.0
  5471.     0BH         10.9
  5472.     0CH         10.0
  5473.     0DH          9.2
  5474.     0EH          8.6
  5475.     0FH          8.0
  5476.     10H          7.5
  5477.     11H          6.7
  5478.     12H          6.0
  5479.     13H          5.5
  5480.     14H          5.0
  5481.     15H          4.6
  5482.     16H          4.3
  5483.     17H          4.0
  5484.     18H          3.7
  5485.     19H          3.3
  5486.     1AH          3.0
  5487.     1BH          2.7
  5488.     1CH          2.5
  5489.     1DH          2.3
  5490.     1EH          2.1
  5491.     1FH          2.0
  5492.  
  5493.  
  5494. ────────────────────────────────────────────────────────────────────────────
  5495. Int 16H                                                                 [PC]
  5496. Function 04H
  5497. Set keyclick
  5498. ────────────────────────────────────────────────────────────────────────────
  5499.  
  5500.   Turns the keyboard click on or off.
  5501.  
  5502. Call with:
  5503.  
  5504.   AH            = 04H
  5505.   AL            = subfunction
  5506.  
  5507.                   00H       to turn off keyboard click
  5508.                   01H       to turn on keyboard click
  5509.  
  5510. Returns:
  5511.  
  5512.   Nothing
  5513.  
  5514. Note:
  5515.  
  5516.   ■ This function is supported by the PCjr BIOS only.
  5517.  
  5518.  
  5519. ────────────────────────────────────────────────────────────────────────────
  5520. Int 16H                                                          [AT] [PS/2]
  5521. Function 05H
  5522. Push character and scan code
  5523. ────────────────────────────────────────────────────────────────────────────
  5524.  
  5525.   Places a character and scan code in the keyboard type-ahead buffer.
  5526.  
  5527. Call with:
  5528.  
  5529.   AH            = 05H
  5530.   CH            = scan code
  5531.   CL            = character
  5532.  
  5533. Returns:
  5534.  
  5535.   If function successful
  5536.  
  5537.   Carry flag    = clear
  5538.   AL            = 00H
  5539.  
  5540.   If function unsuccessful (type-ahead buffer is full)
  5541.  
  5542.   Carry flag    = set
  5543.   AL            = 01H
  5544.  
  5545. Note:
  5546.  
  5547.   ■ This function can be used by keyboard enhancers and other utilities to
  5548.     interpolate keys into the data stream seen by application programs.
  5549.  
  5550.  
  5551. ────────────────────────────────────────────────────────────────────────────
  5552. Int 16H                                                          [AT] [PS/2]
  5553. Function 10H (16)
  5554. Read character from enhanced keyboard
  5555. ────────────────────────────────────────────────────────────────────────────
  5556.  
  5557.   Reads a character and scan code from the keyboard type-ahead buffer.
  5558.  
  5559. Call with:
  5560.  
  5561.   AH            = 10H
  5562.  
  5563. Returns:
  5564.  
  5565.   AH            = keyboard scan code
  5566.   AL            = ASCII character
  5567.  
  5568. Note:
  5569.  
  5570.   ■ Use this function for the enhanced keyboard instead of Int 16H Function
  5571.     00H. It allows applications to obtain the scan codes for the additional
  5572.     F11, F12, and cursor control keys.
  5573.  
  5574.  
  5575. ────────────────────────────────────────────────────────────────────────────
  5576. Int 16H                                                          [AT] [PS/2]
  5577. Function 11H (17)
  5578. Get enhanced keyboard status
  5579. ────────────────────────────────────────────────────────────────────────────
  5580.  
  5581.   Determines whether a character is ready for input, returning a flag and
  5582.   also the character itself, if one is waiting.
  5583.  
  5584. Call with:
  5585.  
  5586.   AH            = 11H
  5587.  
  5588. Returns:
  5589.  
  5590.   If key waiting to be input
  5591.  
  5592.   Zero flag     = clear
  5593.   AH            = keyboard scan code
  5594.   AL            = character
  5595.  
  5596.   If no key waiting
  5597.  
  5598.   Zero flag     = set
  5599.  
  5600. Notes:
  5601.  
  5602.   ■ Use this function for the enhanced keyboard instead of Int 16H Function
  5603.     00H. It allows applications to test for the additional F11, F12, and
  5604.     cursor control keys.
  5605.  
  5606.   ■ The character returned by this function when the zero flag is clear is
  5607.     not removed from the type-ahead buffer. The same character and scan code
  5608.     will be returned by the next call to Int 16H Function 10H.
  5609.  
  5610.  
  5611. ────────────────────────────────────────────────────────────────────────────
  5612. Int 16H                                                          [AT] [PS/2]
  5613. Function 12H (18)
  5614. Get enhanced keyboard flags
  5615. ────────────────────────────────────────────────────────────────────────────
  5616.  
  5617.   Obtains the status of various enhanced keyboard special keys and keyboard
  5618.   driver states.
  5619.  
  5620. Call with:
  5621.  
  5622.   AH            = 12H
  5623.  
  5624. Returns:
  5625.  
  5626.   AX            = flags
  5627.  
  5628.                   Bit       Significance (if set)
  5629.                   0         right Shift key is down
  5630.                   1         left Shift key is down
  5631.                   2         either Ctrl key is down
  5632.                   3         either Alt key is down
  5633.                   4         Scroll Lock toggle is on
  5634.                   5         Num Lock toggle is on
  5635.                   6         Caps Lock toggle is on
  5636.                   7         Insert toggle is on
  5637.                   8         left Ctrl key is down
  5638.                   9         left Alt key is down
  5639.                   10        right Ctrl key is down
  5640.                   11        right Alt key is down
  5641.                   12        Scroll key is down
  5642.                   13        Num Lock key is down
  5643.                   14        Caps Lock key is down
  5644.                   15        SysReq key is down
  5645.  
  5646. Note:
  5647.  
  5648.   ■ Use this function for the enhanced keyboard instead of Int 16H Function
  5649.     02H.
  5650.  
  5651.  
  5652. ────────────────────────────────────────────────────────────────────────────
  5653. Int 17H                                                     [PC] [AT] [PS/2]
  5654. Function 00H
  5655. Write character to printer
  5656. ────────────────────────────────────────────────────────────────────────────
  5657.  
  5658.   Sends a character to the specified parallel printer interface port and
  5659.   returns the current status of the port.
  5660.  
  5661. Call with:
  5662.  
  5663.   AH            = 00H
  5664.   AL            = character
  5665.   DX            = printer number (0 = LPT1, 1 = LPT2, 2 = LPT3)
  5666.  
  5667. Returns:
  5668.  
  5669.   AH            = status
  5670.  
  5671.                   Bit       Significance (if set)
  5672.                   0         printer timed-out
  5673.                   1         unused
  5674.                   2         unused
  5675.                   3         I/O error
  5676.                   4         printer selected
  5677.                   5         out of paper
  5678.                   6         printer acknowledge
  5679.                   7         printer not busy
  5680.  
  5681.  
  5682. ────────────────────────────────────────────────────────────────────────────
  5683. Int 17H                                                     [PC] [AT] [PS/2]
  5684. Function 01H
  5685. Initialize printer port
  5686. ────────────────────────────────────────────────────────────────────────────
  5687.  
  5688.   Initializes the specified parallel printer interface port and returns its
  5689.   status.
  5690.  
  5691. Call with:
  5692.  
  5693.   AH            = 01H
  5694.   DX            = printer number (0 = LPT1, 1 = LPT2, 2 = LPT3)
  5695.  
  5696. Returns:
  5697.  
  5698.   AH            = status (see Int 17H Function 00H)
  5699.  
  5700.  
  5701. ────────────────────────────────────────────────────────────────────────────
  5702. Int 17H                                                     [PC] [AT] [PS/2]
  5703. Function 02H
  5704. Get printer status
  5705. ────────────────────────────────────────────────────────────────────────────
  5706.  
  5707.   Returns the current status of the specified parallel printer interface
  5708.   port.
  5709.  
  5710. Call with:
  5711.  
  5712.   AH            = 02H
  5713.   DX            = printer number (0 = LPT1, 1 = LPT2, 2 = LPT3)
  5714.  
  5715. Returns:
  5716.  
  5717.   AH            = status (see Int 17H Function 00H)
  5718.  
  5719.  
  5720. ────────────────────────────────────────────────────────────────────────────
  5721. Int 18H                                                     [PC] [AT] [PS/2]
  5722. ROM BASIC
  5723. ────────────────────────────────────────────────────────────────────────────
  5724.  
  5725.   Transfers control to ROM BASIC.
  5726.  
  5727. Call with:
  5728.  
  5729.   Nothing
  5730.  
  5731. Returns:
  5732.  
  5733.   Nothing
  5734.  
  5735. Note:
  5736.  
  5737.   ■ This function is invoked when the system is turned on or restarted if
  5738.     attempts to read a boot sector from the fixed disk or floppy disk drives
  5739.     are unsuccessful.
  5740.  
  5741.  
  5742. ────────────────────────────────────────────────────────────────────────────
  5743. Int 19H                                                     [PC] [AT] [PS/2]
  5744. Reboot system
  5745. ────────────────────────────────────────────────────────────────────────────
  5746.  
  5747.   Reboots the operating system from the floppy disk or fixed disk drive.
  5748.  
  5749. Call with:
  5750.  
  5751.   Nothing
  5752.  
  5753. Returns:
  5754.  
  5755.   Nothing
  5756.  
  5757. Notes:
  5758.  
  5759.   ■ The bootstrap routine reads Sector 1, Track 0 into memory at location
  5760.     0000:7C00H and transfers control to the same address. If attempts to
  5761.     read a boot sector from the floppy disk or fixed disk are unsuccessful,
  5762.     control is transferred to ROM BASIC by execution of an Int 18H.
  5763.  
  5764.   ■ If location 0000:0472H does not contain the value 1234H, a memory test
  5765.     will be performed before reading the boot sector.
  5766.  
  5767.  
  5768. ────────────────────────────────────────────────────────────────────────────
  5769. Int 1AH                                                          [AT] [PS/2]
  5770. Function 00H
  5771. Get tick count
  5772. ────────────────────────────────────────────────────────────────────────────
  5773.  
  5774.   Returns the contents of the clock tick counter.
  5775.  
  5776. Call with:
  5777.  
  5778.   AH            = 00H
  5779.  
  5780. Returns:
  5781.  
  5782.   AL            = rolled-over flag
  5783.  
  5784.                   00H       if midnight not passed since last read
  5785.                   <>00H     if midnight was passed since last read
  5786.  
  5787.   CX:DX         = tick count (high 16 bits in CX)
  5788.  
  5789. Notes:
  5790.  
  5791.   ■ This function is supported by the PC/XT and PCjr ROM BIOS, but is not
  5792.     present in the ROM BIOS for the original PC.
  5793.  
  5794.   ■ The returned value is the cumulative number of clock ticks since
  5795.     midnight. There are 18.2 clock ticks per second. When the counter
  5796.     reaches 1,573,040, it is cleared to zero, and the rolled-over flag is
  5797.     set.
  5798.  
  5799.   ■ The rolled-over flag is cleared by this function call, so the flag will
  5800.     only be returned nonzero once per day.
  5801.  
  5802.   ■ Int 1AH Function 01H can be used to set the clock tick counter to an
  5803.     arbitrary 32-bit value.
  5804.  
  5805.  
  5806. ────────────────────────────────────────────────────────────────────────────
  5807. Int 1AH                                                          [AT] [PS/2]
  5808. Function 01H
  5809. Set tick count
  5810. ────────────────────────────────────────────────────────────────────────────
  5811.  
  5812.   Stores a 32-bit value in the clock tick counter.
  5813.  
  5814. Call with:
  5815.  
  5816.   AH            = 01H
  5817.   CX:DX         = tick count (high 16 bits in CX)
  5818.  
  5819. Returns:
  5820.  
  5821.   Nothing
  5822.  
  5823. Notes:
  5824.  
  5825.   ■ This function is supported by the PC/XT and PCjr ROM BIOS, but is not
  5826.     present in the ROM BIOS for the original PC.
  5827.  
  5828.   ■ Int 1AH Function 00H is used to read the value of the clock tick
  5829.     counter.
  5830.  
  5831.   ■ The rolled-over flag is cleared by this function call.
  5832.  
  5833.  
  5834. ────────────────────────────────────────────────────────────────────────────
  5835. Int 1AH                                                          [AT] [PS/2]
  5836. Function 02H
  5837. Get time
  5838. ────────────────────────────────────────────────────────────────────────────
  5839.  
  5840.   Reads the current time from the CMOS time/date chip.
  5841.  
  5842. Call with:
  5843.  
  5844.   AH            = 02H
  5845.  
  5846. Returns:
  5847.  
  5848.   CH            = hours in binary coded decimal (BCD)
  5849.   CL            = minutes in BCD
  5850.   DH            = seconds in BCD
  5851.   DL            = daylight-saving-time code
  5852.  
  5853.                   00H       if standard time
  5854.                   01H       if daylight saving time
  5855.  
  5856.   and, if clock running
  5857.  
  5858.   Carry flag    = clear
  5859.  
  5860.   or, if clock stopped
  5861.  
  5862.   Carry flag    = set
  5863.  
  5864.  
  5865. ────────────────────────────────────────────────────────────────────────────
  5866. Int 1AH                                                          [AT] [PS/2]
  5867. Function 03H
  5868. Set time
  5869. ────────────────────────────────────────────────────────────────────────────
  5870.  
  5871.   Sets the time in the CMOS time/date chip.
  5872.  
  5873. Call with:
  5874.  
  5875.   AH            = 03H
  5876.   CH            = hours in binary coded decimal (BCD)
  5877.   CL            = minutes in BCD
  5878.   DH            = seconds in BCD
  5879.   DL            = daylight-saving-time code
  5880.  
  5881.                   00H       if standard time
  5882.                   01H       if daylight saving time
  5883.  
  5884. Returns:
  5885.  
  5886.   Nothing
  5887.  
  5888.  
  5889. ────────────────────────────────────────────────────────────────────────────
  5890. Int 1AH                                                          [AT] [PS/2]
  5891. Function 04H
  5892. Get date
  5893. ────────────────────────────────────────────────────────────────────────────
  5894.  
  5895.   Reads the current date from the CMOS time/date chip.
  5896.  
  5897. Call with:
  5898.  
  5899.   AH            = 04H
  5900.  
  5901. Returns:
  5902.  
  5903.   CH            = century (19 or 20) in binary coded decimal (BCD)
  5904.   CL            = year in BCD
  5905.   DH            = month in BCD
  5906.   DL            = day in BCD
  5907.  
  5908.   and, if clock running
  5909.  
  5910.   Carry flag    = clear
  5911.  
  5912.   or, if clock stopped
  5913.  
  5914.   Carry flag    = set
  5915.  
  5916.  
  5917. ────────────────────────────────────────────────────────────────────────────
  5918. Int 1AH                                                          [AT] [PS/2]
  5919. Function 05H
  5920. Set date
  5921. ────────────────────────────────────────────────────────────────────────────
  5922.  
  5923.   Sets the date in the CMOS time/date chip.
  5924.  
  5925. Call with:
  5926.  
  5927.   AH            = 05H
  5928.   CH            = century (19 or 20) in binary coded decimal (BCD)
  5929.   CL            = year in BCD
  5930.   DH            = month in BCD
  5931.   DL            = day in BCD
  5932.  
  5933. Returns:
  5934.  
  5935.   Nothing
  5936.  
  5937.  
  5938. ────────────────────────────────────────────────────────────────────────────
  5939. Int 1AH                                                          [AT] [PS/2]
  5940. Function 06H
  5941. Set alarm
  5942. ────────────────────────────────────────────────────────────────────────────
  5943.  
  5944.   Sets an alarm in the CMOS date/time chip.
  5945.  
  5946. Call with:
  5947.  
  5948.   AH            = 06H
  5949.   CH            = hours in binary coded decimal (BCD)
  5950.   CL            = minutes in BCD
  5951.   DH            = seconds in BCD
  5952.  
  5953. Returns:
  5954.  
  5955.   If function successful
  5956.  
  5957.   Carry flag    = clear
  5958.  
  5959.   If function unsuccessful (alarm already set, or clock stopped)
  5960.  
  5961.   Carry flag    = set
  5962.  
  5963. Notes:
  5964.  
  5965.   ■ A side effect of this function is that the clock chip's interrupt level
  5966.     (IRQ8) is enabled.
  5967.  
  5968.   ■ Only one alarm may be active at any given time. The alarm occurs every
  5969.     24 hours at the specified time until it is reset with Int 1AH Function
  5970.     07H.
  5971.  
  5972.   ■ The program using this function must place the address of its interrupt
  5973.     handler for the alarm in the vector for Int 4AH.
  5974.  
  5975.  
  5976. ────────────────────────────────────────────────────────────────────────────
  5977. Int 1AH                                                          [AT] [PS/2]
  5978. Function 07H
  5979. Reset alarm
  5980. ────────────────────────────────────────────────────────────────────────────
  5981.  
  5982.   Cancels any pending alarm request on the CMOS date/time chip.
  5983.  
  5984. Call with:
  5985.  
  5986.   AH            = 07H
  5987.  
  5988. Returns:
  5989.  
  5990.   Nothing
  5991.  
  5992. Note:
  5993.  
  5994.   ■ This function does not disable the clock chip's interrupt level (IRQ8).
  5995.  
  5996.  
  5997. ────────────────────────────────────────────────────────────────────────────
  5998. Int 1AH                                                               [PS/2]
  5999. Function 0AH (10)
  6000. Get day count
  6001. ────────────────────────────────────────────────────────────────────────────
  6002.  
  6003.   Returns the contents of the system's day counter.
  6004.  
  6005. Call with:
  6006.  
  6007.   AH            = 0AH
  6008.  
  6009. Returns:
  6010.  
  6011.   If function successful
  6012.  
  6013.   Carry flag    = clear
  6014.   CX            = count of days since January 1, 1980
  6015.  
  6016.   If function unsuccessful
  6017.  
  6018.   Carry flag    = set
  6019.  
  6020.  
  6021. ────────────────────────────────────────────────────────────────────────────
  6022. Int 1AH                                                               [PS/2]
  6023. Function 0BH (11)
  6024. Set day count
  6025. ────────────────────────────────────────────────────────────────────────────
  6026.  
  6027.   Stores an arbitrary value in the system's day counter.
  6028.  
  6029. Call with:
  6030.  
  6031.   AH            = 0BH
  6032.   CX            = count of days since January 1, 1980
  6033.  
  6034. Returns:
  6035.  
  6036.   If function successful
  6037.  
  6038.   Carry flag    = clear
  6039.  
  6040.   If function unsuccessful
  6041.  
  6042.   Carry flag    = set
  6043.  
  6044.  
  6045. ────────────────────────────────────────────────────────────────────────────
  6046. Int 1AH                                                                 [PC]
  6047. Function 80H (128)
  6048. Set sound source
  6049. ────────────────────────────────────────────────────────────────────────────
  6050.  
  6051.   Sets up the source for tones that will appear on the PCjr's "Audio Out" or
  6052.   RF modulator.
  6053.  
  6054. Call with:
  6055.  
  6056.   AH            = 80H
  6057.   AL            = sound source
  6058.  
  6059.                   00H       if 8253 programmable timer, channel 2
  6060.                   01H       if cassette input
  6061.                   02H       if "Audio In" line on I/O channel
  6062.                   03H       if sound generator chip
  6063.  
  6064. Returns:
  6065.  
  6066.   Nothing
  6067.  
  6068. Note:
  6069.  
  6070.   ■ This function is supported on the PCjr only.
  6071.  
  6072.  
  6073. ────────────────────────────────────────────────────────────────────────────
  6074. Int 33H
  6075. Microsoft Mouse driver
  6076. ────────────────────────────────────────────────────────────────────────────
  6077.  
  6078.   The Microsoft Mouse driver makes its functions available to application
  6079.   programs via Int 33H. These functions have become a de facto standard for
  6080.   pointer device drivers of all varieties. Unlike the other function calls
  6081.   described in this section, the Microsoft Mouse driver is not part of the
  6082.   ROM BIOS but is loaded by a DEVICE= directive in the CONFIG.SYS file. All
  6083.   mouse-function information applies to the Microsoft Mouse driver version
  6084.   6. Earlier versions of the driver may not support all of these functions.
  6085.  
  6086.  
  6087. ────────────────────────────────────────────────────────────────────────────
  6088. Int 33H
  6089. Function 00H
  6090. Reset mouse and get status
  6091. ────────────────────────────────────────────────────────────────────────────
  6092.  
  6093.   Initializes the mouse driver and returns the driver status. If the mouse
  6094.   pointer was previously visible, it is removed from the screen, and any
  6095.   previously installed user handlers for mouse events are disabled.
  6096.  
  6097. Call with:
  6098.  
  6099.   AX            = 0000H
  6100.  
  6101. Returns:
  6102.  
  6103.   If mouse support is available
  6104.  
  6105.   AX            = FFFFH
  6106.   BX            = number of mouse buttons
  6107.  
  6108.   If mouse support is not available
  6109.  
  6110.   AX            = 0000H
  6111.  
  6112. Note:
  6113.  
  6114.   ■ After a call to this function, the mouse driver is initialized to the
  6115.     following state:
  6116.  
  6117.     ∙ Mouse pointer at screen center (see Int 33H Functions 03H and 04H)
  6118.  
  6119.     ∙ Display page for mouse pointer set to zero (see Int 33H Functions
  6120.       1DH and 1EH)
  6121.  
  6122.     ∙ Mouse pointer hidden (see Int 33H Functions 01H, 02H, and 10H)
  6123.  
  6124.     ∙ Mouse pointer set to default arrow shape in graphics modes, or reverse
  6125.       block in text modes (see Int 33H Functions 09H and 0AH)
  6126.  
  6127.     ∙ User mouse event handler disabled (see Int 33H Functions 0CH and
  6128.       14H)
  6129.  
  6130.     ∙ Light pen emulation enabled (see Int 33H Functions 0DH and 0EH)
  6131.  
  6132.     ∙ Horizontal mickeys to pixels ratio at 8 to 8, vertical ratio at 16 to
  6133.       8 (see Int 33H Function 0FH)
  6134.  
  6135.     ∙ Double speed threshold set to 64 mickeys/second (see Int 33H Function
  6136.       19H)
  6137.  
  6138.     ∙ Minimum and maximum horizontal and vertical pointer position limits
  6139.       set to include the entire screen in the current display mode (see Int
  6140.       33H Functions 07H and 08H)
  6141.  
  6142.  
  6143. ────────────────────────────────────────────────────────────────────────────
  6144. Int 33H
  6145. Function 01H
  6146. Show mouse pointer
  6147. ────────────────────────────────────────────────────────────────────────────
  6148.  
  6149.   Displays the mouse pointer, and cancels any mouse pointer exclusion area
  6150.   previously defined with Int 33H Function 10H.
  6151.  
  6152. Call with:
  6153.  
  6154.   AX            = 0001H
  6155.  
  6156. Returns:
  6157.  
  6158.   Nothing
  6159.  
  6160. Note:
  6161.  
  6162.   ■ A counter is maintained which is decremented by calls to Int 33H
  6163.     Function 02H (Hide Mouse Pointer) and incremented (if nonzero) by this
  6164.     function. When the counter is zero or becomes zero, the mouse pointer is
  6165.     displayed. When the mouse driver is reset with Int 33H Function 00H,
  6166.     the counter is forced to -1.
  6167.  
  6168.  
  6169. ────────────────────────────────────────────────────────────────────────────
  6170. Int 33H
  6171. Function 02H
  6172. Hide mouse pointer
  6173. ────────────────────────────────────────────────────────────────────────────
  6174.  
  6175.   Removes the mouse pointer from the display. The driver continues to track
  6176.   the mouse position.
  6177.  
  6178. Call with:
  6179.  
  6180.   AX            = 0002H
  6181.  
  6182. Returns:
  6183.  
  6184.   Nothing
  6185.  
  6186. Note:
  6187.  
  6188.   ■ A counter is maintained which is decremented by calls to this function
  6189.     and incremented (if nonzero) by Int 33H Function 01H (Show Mouse
  6190.     Pointer). When the counter is zero, the mouse pointer is displayed. When
  6191.     the mouse driver is reset with Int 33H Function 00H, the counter is
  6192.     forced to -1.
  6193.  
  6194.  
  6195. ────────────────────────────────────────────────────────────────────────────
  6196. Int 33H
  6197. Function 03H
  6198. Get mouse position and button status
  6199. ────────────────────────────────────────────────────────────────────────────
  6200.  
  6201.   Returns the current mouse button status and pointer position.
  6202.  
  6203. Call with:
  6204.  
  6205.   AX            = 0003H
  6206.  
  6207. Returns:
  6208.  
  6209.   BX            = mouse button status
  6210.  
  6211.                   Bit(s)    Significance (if set)
  6212.                   0         left button is down
  6213.                   1         right button is down
  6214.                   2         center button is down
  6215.                   3─15      reserved (0)
  6216.  
  6217.   CX            = horizontal (X) coordinate
  6218.   DX            = vertical (Y) coordinate
  6219.  
  6220. Note:
  6221.  
  6222.   ■ Coordinates are returned in pixels regardless of the current display
  6223.     mode. Position (x,y) = (0,0) is the upper left corner of the screen.
  6224.  
  6225.  
  6226. ────────────────────────────────────────────────────────────────────────────
  6227. Int 33H
  6228. Function 04H
  6229. Set mouse pointer position
  6230. ────────────────────────────────────────────────────────────────────────────
  6231.  
  6232.   Sets the position of the mouse pointer. The pointer is displayed at the
  6233.   new position unless it has been hidden with Int 33H Function 02H, or the
  6234.   new position lies within an exclusion area defined with Int 33H Function
  6235.   10H.
  6236.  
  6237. Call with:
  6238.  
  6239.   AX            = 0004H
  6240.   CX            = horizontal (X) coordinate
  6241.   DX            = vertical (Y) coordinate
  6242.  
  6243. Returns:
  6244.  
  6245.   Nothing
  6246.  
  6247. Notes:
  6248.  
  6249.   ■ Coordinates are specified in pixels regardless of the current display
  6250.     mode. Position (x,y) = (0,0) is the upper left corner of the screen.
  6251.  
  6252.   ■ The position is adjusted if necessary to lie within the horizontal and
  6253.     vertical limits specified with a previous call to Int 33H Functions
  6254.     07H and 08H.
  6255.  
  6256.  
  6257. ────────────────────────────────────────────────────────────────────────────
  6258. Int 33H
  6259. Function 05H
  6260. Get button press information
  6261. ────────────────────────────────────────────────────────────────────────────
  6262.  
  6263.   Returns the current status of all mouse buttons, and the number of presses
  6264.   and position of the last press for a specified mouse button since the last
  6265.   call to this function for that button. The press counter for the button is
  6266.   reset to zero.
  6267.  
  6268. Call with:
  6269.  
  6270.   AX            = 0005H
  6271.   BX            = button identifier
  6272.  
  6273.                   0 =       left button
  6274.                   1 =       right button
  6275.                   2 =       center button
  6276.  
  6277. Returns:
  6278.  
  6279.   AX            = button status
  6280.  
  6281.                   Bit(s)    Significance (if set)
  6282.                   0         left button is down
  6283.                   1         right button is down
  6284.                   2         center button is down
  6285.                   3─15      reserved (0)
  6286.  
  6287.   BX            = button press counter
  6288.   CX            = horizontal (X) coordinate of last button press
  6289.   DX            = vertical (Y) coordinate of last button press
  6290.  
  6291.  
  6292. ────────────────────────────────────────────────────────────────────────────
  6293. Int 33H
  6294. Function 06H
  6295. Get button release information
  6296. ────────────────────────────────────────────────────────────────────────────
  6297.  
  6298.   Returns the current status of all mouse buttons, and the number of
  6299.   releases and position of the last release for a specified mouse button
  6300.   since the last call to this function for that button. The release counter
  6301.   for the button is reset to zero.
  6302.  
  6303. Call with:
  6304.  
  6305.   AX            = 0006H
  6306.   BX            = button identifier
  6307.  
  6308.                   0 =       left button
  6309.                   1 =       right button
  6310.                   2 =       center button
  6311.  
  6312. Returns:
  6313.  
  6314.   AX            = button status
  6315.  
  6316.                   Bit(s)    Significance (if set)
  6317.                   0         left button is down
  6318.                   1         right button is down
  6319.                   2         center button is down
  6320.                   3─15      reserved (0)
  6321.  
  6322.   BX            = button release counter
  6323.   CX            = horizontal (X) coordinate of last button release
  6324.   DX            = vertical (Y) coordinate of last button release
  6325.  
  6326.  
  6327. ────────────────────────────────────────────────────────────────────────────
  6328. Int 33H
  6329. Function 07H
  6330. Set horizontal limits for pointer
  6331. ────────────────────────────────────────────────────────────────────────────
  6332.  
  6333.   Limits the mouse pointer display area by assigning minimum and maximum
  6334.   horizontal (X) coordinates for the mouse pointer.
  6335.  
  6336. Call with:
  6337.  
  6338.   AX            = 0007H
  6339.   CX            = minimum horizontal (X) coordinate
  6340.   DX            = maximum horizontal (X) coordinate
  6341.  
  6342. Returns:
  6343.  
  6344.   Nothing
  6345.  
  6346. Notes:
  6347.  
  6348.   ■ If the minimum value is greater than the maximum value, the two values
  6349.     are swapped.
  6350.  
  6351.   ■ The mouse pointer will be moved if necessary so that it lies within the
  6352.     specified horizontal coordinates.
  6353.  
  6354.   ■ See also Int 33H Function 10H, which defines an exclusion area for the
  6355.     mouse pointer.
  6356.  
  6357.  
  6358. ────────────────────────────────────────────────────────────────────────────
  6359. Int 33H
  6360. Function 08H
  6361. Set vertical limits for pointer
  6362. ────────────────────────────────────────────────────────────────────────────
  6363.  
  6364.   Limits the mouse pointer display area by assigning minimum and maximum
  6365.   vertical (Y) coordinates for the mouse pointer.
  6366.  
  6367. Call with:
  6368.  
  6369.   AX            = 0008H
  6370.   CX            = minimum vertical (Y) coordinate
  6371.   DX            = maximum vertical (Y) coordinate
  6372.  
  6373. Returns:
  6374.  
  6375.   Nothing
  6376.  
  6377. Notes:
  6378.  
  6379.   ■ If the minimum value is greater than the maximum value, the two values
  6380.     are swapped.
  6381.  
  6382.   ■ The mouse pointer will be moved if necessary so that it lies within the
  6383.     specified vertical coordinates.
  6384.  
  6385.   ■ See also Int 33H Function 10H, which defines an exclusion area for the
  6386.     mouse pointer.
  6387.  
  6388.  
  6389. ────────────────────────────────────────────────────────────────────────────
  6390. Int 33H
  6391. Function 09H
  6392. Set graphics pointer shape
  6393. ────────────────────────────────────────────────────────────────────────────
  6394.  
  6395.   Defines the shape, color, and hot spot of the mouse pointer in graphics
  6396.   modes.
  6397.  
  6398. Call with:
  6399.  
  6400.   AX            = 0009H
  6401.   BX            = hot spot offset from left
  6402.   CX            = hot spot offset from top
  6403.   ES:DX         = segment:offset of pointer image buffer
  6404.  
  6405. Returns:
  6406.  
  6407.   Nothing
  6408.  
  6409. Notes:
  6410.  
  6411.   ■ The pointer image buffer is 64 bytes long. The first 32 bytes contain a
  6412.     bit mask which is ANDed with the screen image, and the second 32 bytes
  6413.     contain a bit mask which is XORed with the screen image.
  6414.  
  6415.   ■ The hot spot is relative to the upper left corner of the pointer image,
  6416.     and each pixel offset must be in the range -16 through 16. In display
  6417.     modes 4 and 5, the horizontal offset must be an even number.
  6418.  
  6419.  
  6420. ────────────────────────────────────────────────────────────────────────────
  6421. Int 33H
  6422. Function 0AH (10)
  6423. Set text pointer type
  6424. ────────────────────────────────────────────────────────────────────────────
  6425.  
  6426.   Defines the shape and attributes of the mouse pointer in text modes.
  6427.  
  6428. Call with:
  6429.  
  6430.   AX            = 000AH
  6431.   BX            = pointer type
  6432.  
  6433.                   0 =       software cursor
  6434.                   1 =       hardware cursor
  6435.  
  6436.   CX            = AND mask value (if BX = 0) or
  6437.                   starting line for cursor (if BX = 1)
  6438.   DX            = XOR mask value (if BX = 0) or
  6439.                   ending line for cursor (if BX = 1)
  6440.  
  6441. Returns:
  6442.  
  6443.   Nothing
  6444.  
  6445. Notes:
  6446.  
  6447.   ■ If the software text cursor is selected (BX = 0), the masks in CX and DX
  6448.     are mapped as follows:
  6449.  
  6450.     Bit(s)      Significance
  6451.     ────────────────────────────────────────────────────────────────────────
  6452.     0─7         character code
  6453.     8─10        foreground color
  6454.     11          intensity
  6455.     12─14       background color
  6456.     15          blink
  6457.     ────────────────────────────────────────────────────────────────────────
  6458.  
  6459.     For example, the following values would yield a software mouse cursor
  6460.     that inverts the foreground and background colors:
  6461.  
  6462.     AX          = 000AH
  6463.     BX          = 0000H
  6464.     CX          = 77FFH
  6465.     DX          = 7700H
  6466.  
  6467.   ■ When the hardware text cursor is selected (BX = 1), the values in CX and
  6468.     DX are the starting and ending scan lines for the blinking cursor
  6469.     generated by the video adapter. The maximum scan line which may be used
  6470.     depends on the type of adapter and the current display mode.
  6471.  
  6472.  
  6473. ────────────────────────────────────────────────────────────────────────────
  6474. Int 33H
  6475. Function 0BH (11)
  6476. Read mouse motion counters
  6477. ────────────────────────────────────────────────────────────────────────────
  6478.  
  6479.   Returns the net mouse displacement since the last call to this function.
  6480.   The returned value is in mickeys; a positive number indicates travel to
  6481.   the right or downwards, a negative number indicates travel to the left or
  6482.   upwards. One mickey represents approximately 1/200 of an inch of mouse
  6483.   movement.
  6484.  
  6485. Call with:
  6486.  
  6487.   AX            = 000BH
  6488.  
  6489. Returns:
  6490.  
  6491.   CX            = horizontal (X) mickey count
  6492.   DX            = vertical (Y) mickey count
  6493.  
  6494.  
  6495. ────────────────────────────────────────────────────────────────────────────
  6496. Int 33H
  6497. Function 0CH (12)
  6498. Set user-defined mouse event handler
  6499. ────────────────────────────────────────────────────────────────────────────
  6500.  
  6501.   Sets the address and event mask for an application program's mouse event
  6502.   handler. The handler is called by the mouse driver whenever the specified
  6503.   mouse events occur.
  6504.  
  6505. Call with:
  6506.  
  6507.   AX            = 000CH
  6508.   CX            = event mask
  6509.  
  6510.                   Bit(s)    Significance (if set)
  6511.                   0         mouse movement
  6512.                   1         left button pressed
  6513.                   2         left button released
  6514.                   3         right button pressed
  6515.                   4         right button released
  6516.                   5         center button pressed
  6517.                   6         center button released
  6518.                   7─15      reserved (0)
  6519.  
  6520.   ES:DX         = segment:offset of handler
  6521.  
  6522. Returns:
  6523.  
  6524.   Nothing
  6525.  
  6526. Notes:
  6527.  
  6528.   ■ The user-defined event handler is entered from the mouse driver by a far
  6529.     call with registers set up as follows:
  6530.  
  6531.     AX             mouse event flags (see event mask)
  6532.     BX             button state
  6533.  
  6534.                    Bit(s)     Significance (if set)
  6535.                    0          left button is down
  6536.                    1          right button is down
  6537.                    2          center button is down
  6538.                    3─15       reserved (0)
  6539.  
  6540.     CX             horizontal (X) pointer coordinate
  6541.     DX             vertical (Y) pointer coordinate
  6542.     SI             last raw vertical mickey count
  6543.     DI             last raw horizontal mickey count
  6544.     DS             mouse driver data segment
  6545.  
  6546.   ■ If an event does not generate a call to the user-defined handler because
  6547.     its bit is not set in the event mask, it is still reported in the event
  6548.     flags during calls to the handler for events which are enabled.
  6549.  
  6550.   ■ Calls to the handler are disabled with Int 33H Function 00H or by
  6551.     calling this function with an event mask of zero.
  6552.  
  6553.   ■ See also Int 33H Functions 14H and 18H.
  6554.  
  6555.  
  6556. ────────────────────────────────────────────────────────────────────────────
  6557. Int 33H
  6558. Function 0DH (13)
  6559. Turn on light pen emulation
  6560. ────────────────────────────────────────────────────────────────────────────
  6561.  
  6562.   Enables light pen emulation by the mouse driver for IBM BASIC. A "pen
  6563.   down" condition is created by pressing the left and right mouse buttons
  6564.   simultaneously.
  6565.  
  6566. Call with:
  6567.  
  6568.   AX            = 000DH
  6569.  
  6570. Returns:
  6571.  
  6572.   Nothing
  6573.  
  6574.  
  6575. ────────────────────────────────────────────────────────────────────────────
  6576. Int 33H
  6577. Function 0EH (14)
  6578. Turn off light pen emulation
  6579. ────────────────────────────────────────────────────────────────────────────
  6580.  
  6581.   Disables light pen emulation by the mouse driver for IBM BASIC.
  6582.  
  6583. Call with:
  6584.  
  6585.   AX            = 000EH
  6586.  
  6587. Returns:
  6588.  
  6589.   Nothing
  6590.  
  6591.  
  6592. ────────────────────────────────────────────────────────────────────────────
  6593. Int 33H
  6594. Function 0FH (15)
  6595. Set mickeys to pixels ratio
  6596. ────────────────────────────────────────────────────────────────────────────
  6597.  
  6598.   Sets the number of mickeys per 8 pixels for horizontal and vertical mouse
  6599.   motion. One mickey represents approximately 1/200 of an inch of mouse
  6600.   travel.
  6601.  
  6602. Call with:
  6603.  
  6604.   AX            = 000FH
  6605.   CX            = horizontal mickeys (1─32,767, default = 8)
  6606.   DX            = vertical mickeys (1─32,767, default = 16)
  6607.  
  6608. Returns:
  6609.  
  6610.   Nothing
  6611.  
  6612.  
  6613. ────────────────────────────────────────────────────────────────────────────
  6614. Int 33H
  6615. Function 10H (16)
  6616. Set mouse pointer exclusion area
  6617. ────────────────────────────────────────────────────────────────────────────
  6618.  
  6619.   Defines an exclusion area for the mouse pointer. When the mouse pointer
  6620.   lies within the specified area, it is not displayed.
  6621.  
  6622. Call with:
  6623.  
  6624.   AX            = 0010H
  6625.   CX            = upper left X coordinate
  6626.   DX            = upper left Y coordinate
  6627.   SI            = lower right X coordinate
  6628.   DI            = lower right Y coordinate
  6629.  
  6630. Returns:
  6631.  
  6632.   Nothing
  6633.  
  6634. Note:
  6635.  
  6636.   ■ The exclusion area is replaced by another call to this function or
  6637.     cancelled by Int 33H Functions 00H or 01H.
  6638.  
  6639.  
  6640. ────────────────────────────────────────────────────────────────────────────
  6641. Int 33H
  6642. Function 13H (19)
  6643. Set double speed threshold
  6644. ────────────────────────────────────────────────────────────────────────────
  6645.  
  6646.   Sets the threshold speed for doubling pointer motion on the screen. The
  6647.   default threshold speed is 64 mickeys/second.
  6648.  
  6649. Call with:
  6650.  
  6651.   AX            = 0013H
  6652.   DX            = threshold speed in mickeys/second
  6653.  
  6654. Returns:
  6655.  
  6656.   Nothing
  6657.  
  6658. Note:
  6659.  
  6660.   ■ Doubling of pointer motion can be effectively disabled by setting the
  6661.     threshold to a very large value (such as 10,000).
  6662.  
  6663.  
  6664. ────────────────────────────────────────────────────────────────────────────
  6665. Int 33H
  6666. Function 14H (20)
  6667. Swap user-defined mouse event handlers
  6668. ────────────────────────────────────────────────────────────────────────────
  6669.  
  6670.   Sets the address and event mask for an application program's mouse event
  6671.   handler and returns the address and event mask for the previous handler.
  6672.   The newly installed handler is called by the mouse driver whenever the
  6673.   specified mouse events occur.
  6674.  
  6675. Call with:
  6676.  
  6677.   AX            = 0014H
  6678.   CX            = event mask
  6679.  
  6680.                   Bit(s)    Significance (if set)
  6681.                   0         mouse movement
  6682.                   1         left button pressed
  6683.                   2         left button released
  6684.                   3         right button pressed
  6685.                   4         right button released
  6686.                   5         center button pressed
  6687.                   6         center button released
  6688.                   7─15      reserved (0)
  6689.  
  6690.   ES:DX         = segment:offset of event handler
  6691.  
  6692. Returns:
  6693.  
  6694.   CX            = previous event mask
  6695.   ES:DX         = segment:offset of previous handler
  6696.  
  6697. Notes:
  6698.  
  6699.   ■ The Notes for Int 33H Function 0CH describe the information passed to
  6700.     the user-defined event handler. See also Int 33H Function 18H.
  6701.  
  6702.   ■ Calls to the event handler are disabled with Int 33H Function 00H or by
  6703.     setting an event mask of zero.
  6704.  
  6705.  
  6706. ────────────────────────────────────────────────────────────────────────────
  6707. Int 33H
  6708. Function 15H (21)
  6709. Get mouse save state buffer size
  6710. ────────────────────────────────────────────────────────────────────────────
  6711.  
  6712.   Gets the size of the buffer required to store the current state of the
  6713.   mouse driver.
  6714.  
  6715. Call with:
  6716.  
  6717.   AX            = 0015H
  6718.  
  6719. Returns:
  6720.  
  6721.   BX            = buffer size (bytes)
  6722.  
  6723. Note:
  6724.  
  6725.   ■ See also Int 33H Functions 16H and 17H.
  6726.  
  6727.  
  6728. ────────────────────────────────────────────────────────────────────────────
  6729. Int 33H
  6730. Function 16H (22)
  6731. Save mouse driver state
  6732. ────────────────────────────────────────────────────────────────────────────
  6733.  
  6734.   Saves the mouse driver state in a user buffer. The minimum size for the
  6735.   buffer must be determined by a previous call to Int 33H Function 15H.
  6736.  
  6737. Call with:
  6738.  
  6739.   AX            = 0016H
  6740.   ES:DX         = segment:offset of buffer
  6741.  
  6742. Returns:
  6743.  
  6744.   Nothing
  6745.  
  6746. Note:
  6747.  
  6748.   ■ Call this function before executing a child program with Int 21H
  6749.     Function 4BH (EXEC), in case the child also uses the mouse. After the
  6750.     EXEC call, restore the previous mouse driver state with Int 33H Function
  6751.     17H.
  6752.  
  6753.  
  6754. ────────────────────────────────────────────────────────────────────────────
  6755. Int 33H
  6756. Function 17H (23)
  6757. Restore mouse driver state
  6758. ────────────────────────────────────────────────────────────────────────────
  6759.  
  6760.   Restores the mouse driver state from a user buffer.
  6761.  
  6762. Call with:
  6763.  
  6764.   AX            = 0017H
  6765.   ES:DX         = segment:offset of buffer
  6766.  
  6767. Returns:
  6768.  
  6769.   Nothing
  6770.  
  6771. Note:
  6772.  
  6773.   ■ The mouse driver state must have been previously saved into the same
  6774.     buffer with Int 33H Function 16H. The format of the data in the buffer
  6775.     is undocumented and subject to change.
  6776.  
  6777.  
  6778. ────────────────────────────────────────────────────────────────────────────
  6779. Int 33H
  6780. Function 18H (24)
  6781. Set alternate mouse event handler
  6782. ────────────────────────────────────────────────────────────────────────────
  6783.  
  6784.   Sets the address and event mask for a an application program mouse event
  6785.   handler. As many as three handlers with distinct event masks can be
  6786.   registered with this function. When an event occurs that matches one of
  6787.   the masks, the corresponding handler is called by the mouse driver.
  6788.  
  6789. Call with:
  6790.  
  6791.   AX            = 0018H
  6792.   CX            = event mask
  6793.  
  6794.                   Bit(s)    Significance (if set)
  6795.                   0         mouse movement
  6796.                   1         left button pressed
  6797.                   2         left button released
  6798.                   3         right button pressed
  6799.                   4         right button released
  6800.                   5         Shift key pressed during button press or release
  6801.                   6         Ctrl key pressed during button press or release
  6802.                   7         Alt key pressed during button press or release
  6803.                   8─15      reserved (0)
  6804.  
  6805.   ES:DX         = segment:offset of handler
  6806.  
  6807. Returns:
  6808.  
  6809.   If function successful
  6810.  
  6811.   AX            = 0018H
  6812.  
  6813.   If function unsuccessful
  6814.  
  6815.   AX            = FFFFH
  6816.  
  6817. Notes:
  6818.  
  6819.   ■ When this function is called, at least one of the bits 5, 6, and 7 must
  6820.     be set in register CX.
  6821.  
  6822.   ■ The user-defined event handler is entered from the mouse driver by a far
  6823.     call with registers set up as follows:
  6824.  
  6825.     AX             mouse event flags (see event mask)
  6826.     BX             button state
  6827.  
  6828.                    Bit(s)     Significance (if set)
  6829.                    0          left button is down
  6830.                    1          right button is down
  6831.                    2          center button is down
  6832.                    3─15       reserved (0)
  6833.  
  6834.     CX             horizontal (X) pointer coordinate
  6835.     DX             vertical (Y) pointer coordinate
  6836.     SI             last raw vertical mickey count
  6837.     DI             last raw horizontal mickey count
  6838.     DS             mouse driver data segment
  6839.  
  6840.   ■ If an event does not generate a call to the user-defined handler because
  6841.     its bit is not set in the event mask, it can still be reported in the
  6842.     event flags during calls to the handler for events that are enabled.
  6843.  
  6844.   ■ Calls to the handler are disabled with Int 33H Function 00H.
  6845.  
  6846.   ■ See also Int 33H Functions 0CH and 14H.
  6847.  
  6848.  
  6849. ────────────────────────────────────────────────────────────────────────────
  6850. Int 33H
  6851. Function 19H (25)
  6852. Get address of alternate mouse event handler
  6853. ────────────────────────────────────────────────────────────────────────────
  6854.  
  6855.   Returns the address for the mouse event handler matching the specified
  6856.   event mask.
  6857.  
  6858. Call with:
  6859.  
  6860.   AX            = 0019H
  6861.   CX            = event mask (see Int 33H Function 18H)
  6862.  
  6863. Returns:
  6864.  
  6865.   If function successful
  6866.  
  6867.   CX            = event mask
  6868.   ES:DX         = segment:offset of alternate event handler
  6869.  
  6870.   If function unsuccessful (no handler installed or event mask does not
  6871.   match any installed handler)
  6872.  
  6873.   CX            = 0000H
  6874.  
  6875. Note:
  6876.  
  6877.   ■ Int 33H Function 18H allows as many as three event handlers with
  6878.     distinct event masks to be installed. This function can be called to
  6879.     search for a handler that matches a specific event, so that it can be
  6880.     replaced or disabled.
  6881.  
  6882.  
  6883. ────────────────────────────────────────────────────────────────────────────
  6884. Int 33H
  6885. Function 1AH (26)
  6886. Set mouse sensitivity
  6887. ────────────────────────────────────────────────────────────────────────────
  6888.  
  6889.   Sets the number of mickeys per 8 pixels for horizontal and vertical mouse
  6890.   motion and the threshold speed for doubling pointer motion on the screen.
  6891.   One mickey represents approximately 1/200 of an inch of mouse travel.
  6892.  
  6893. Call with:
  6894.  
  6895.   AX            = 001AH
  6896.   BX            = horizontal mickeys (1─32,767, default = 8)
  6897.   CX            = vertical mickeys (1─32,767, default = 16)
  6898.   DX            = double speed threshold in mickeys/second (default = 64)
  6899.  
  6900. Returns:
  6901.  
  6902.   Nothing
  6903.  
  6904. Note:
  6905.  
  6906.   ■ See also Int 33H Functions 0FH and 13H, which allow the mickeys to
  6907.     pixels ratio and threshold speed to be set separately, and Int 33H
  6908.     Function 1BH, which returns the current sensitivity values.
  6909.  
  6910.  
  6911. ────────────────────────────────────────────────────────────────────────────
  6912. Int 33H
  6913. Function 1BH (27)
  6914. Get mouse sensitivity
  6915. ────────────────────────────────────────────────────────────────────────────
  6916.  
  6917.   Returns the current mickeys to pixels ratios for vertical and horizontal
  6918.   screen movement and the threshold speed for doubling of pointer motion.
  6919.  
  6920. Call with:
  6921.  
  6922.   AX            = 001BH
  6923.  
  6924. Returns:
  6925.  
  6926.   BX            = horizontal mickeys (1─32,767, default = 8)
  6927.   CX            = vertical mickeys (1─32,767, default = 16)
  6928.   DX            = double speed threshold in mickeys/second (default = 64)
  6929.  
  6930. Note:
  6931.  
  6932.   ■ See also Int 33H Functions 0FH, 13H, and 1AH.
  6933.  
  6934.  
  6935. ────────────────────────────────────────────────────────────────────────────
  6936. Int 33H
  6937. Function 1CH (28)
  6938. Set mouse interrupt rate
  6939. ────────────────────────────────────────────────────────────────────────────
  6940.  
  6941.   Sets the rate at which the mouse driver polls the status of the mouse.
  6942.   Faster rates provide better resolution in graphics mode but may degrade
  6943.   the performance of application programs.
  6944.  
  6945. Call with:
  6946.  
  6947.   AX            = 001CH
  6948.   BX            = interrupt rate flags
  6949.  
  6950.                   Bit(s)    Significance
  6951.                   0         no interrupts allowed
  6952.                   1         30 interrupts/second
  6953.                   2         50 interrupts/second
  6954.                   3         100 interrupts/second
  6955.                   4         200 interrupts/second
  6956.                   5─15      reserved (0)
  6957.  
  6958. Returns:
  6959.  
  6960.   Nothing
  6961.  
  6962. Notes:
  6963.  
  6964.   ■ This function is applicable for the InPort Mouse only.
  6965.  
  6966.   ■ If more than one bit is set in register BX, the lowest order bit
  6967.     prevails.
  6968.  
  6969.  
  6970. ────────────────────────────────────────────────────────────────────────────
  6971. Int 33H
  6972. Function 1DH (29)
  6973. Select pointer page
  6974. ────────────────────────────────────────────────────────────────────────────
  6975.  
  6976.   Selects the display page for the mouse pointer.
  6977.  
  6978. Call with:
  6979.  
  6980.   AX            = 001DH
  6981.   BX            = page
  6982.  
  6983. Returns:
  6984.  
  6985.   Nothing
  6986.  
  6987. Note:
  6988.  
  6989.   ■ The valid page numbers depend on the current display mode. See Int 10H
  6990.     Function 05H.
  6991.  
  6992.  
  6993. ────────────────────────────────────────────────────────────────────────────
  6994. Int 33H
  6995. Function 1EH (30)
  6996. Get pointer page
  6997. ────────────────────────────────────────────────────────────────────────────
  6998.  
  6999.   Returns the current display page for the mouse pointer.
  7000.  
  7001. Call with:
  7002.  
  7003.   AX            = 001EH
  7004.  
  7005. Returns:
  7006.  
  7007.   BX            = page
  7008.  
  7009.  
  7010. ────────────────────────────────────────────────────────────────────────────
  7011. Int 33H
  7012. Function 1FH (31)
  7013. Disable mouse driver
  7014. ────────────────────────────────────────────────────────────────────────────
  7015.  
  7016.   Disables the mouse driver and returns the address of the previous Int 33H
  7017.   handler.
  7018.  
  7019. Call with:
  7020.  
  7021.   AX            = 001FH
  7022.  
  7023. Returns:
  7024.  
  7025.   If function successful
  7026.  
  7027.   AX            = 001FH
  7028.   ES:BX         = segment:offset of previous Int 33H handler
  7029.  
  7030.   If function unsuccessful
  7031.  
  7032.   AX            = FFFFH
  7033.  
  7034. Notes:
  7035.  
  7036.   ■ When this function is called, the mouse driver releases any interrupt
  7037.     vectors it has captured other than Int 33H (which may include Int 10H,
  7038.     Int 71H, and/or Int 74H). The application program can complete the
  7039.     process of logically removing the mouse driver by restoring the original
  7040.     contents of the Int 33H vector with Int 21H Function 25H, using the
  7041.     address returned by this function in ES:BX.
  7042.  
  7043.   ■ See also Int 33H Function 20H.
  7044.  
  7045.  
  7046. ────────────────────────────────────────────────────────────────────────────
  7047. Int 33H
  7048. Function 20H (32)
  7049. Enable mouse driver
  7050. ────────────────────────────────────────────────────────────────────────────
  7051.  
  7052.   Enables the mouse driver and the servicing of mouse interrupts.
  7053.  
  7054. Call with:
  7055.  
  7056.   AX            = 0020H
  7057.  
  7058. Returns:
  7059.  
  7060.   Nothing
  7061.  
  7062. Note:
  7063.  
  7064.   ■ See also Int 33H Function 1FH.
  7065.  
  7066.  
  7067. ────────────────────────────────────────────────────────────────────────────
  7068. Int 33H
  7069. Function 21H (33)
  7070. Reset mouse driver
  7071. ────────────────────────────────────────────────────────────────────────────
  7072.  
  7073.   Resets the mouse driver and returns driver status. If the mouse pointer
  7074.   was previously visible, it is removed from the screen, and any previously
  7075.   installed user handlers for mouse events are disabled.
  7076.  
  7077. Call with:
  7078.  
  7079.   AX            = 0021H
  7080.  
  7081. Returns:
  7082.  
  7083.   If mouse support is available
  7084.  
  7085.   AX            = FFFFH
  7086.   BX            = number of mouse buttons
  7087.  
  7088.   If mouse support is not available
  7089.  
  7090.   AX            = 0021H
  7091.  
  7092. Note:
  7093.  
  7094.   ■ This function differs from Int 33H Function 00H in that there is no
  7095.     initialization of the mouse hardware.
  7096.  
  7097.  
  7098. ────────────────────────────────────────────────────────────────────────────
  7099. Int 33H
  7100. Function 22H (34)
  7101. Set language for mouse driver messages
  7102. ────────────────────────────────────────────────────────────────────────────
  7103.  
  7104.   Selects the language that will be used by the mouse driver for prompts and
  7105.   error messages.
  7106.  
  7107. Call with:
  7108.  
  7109.   AX            = 0022H
  7110.   BX            = language number
  7111.  
  7112.                   0 =       English
  7113.                   1 =       French
  7114.                   2 =       Dutch
  7115.                   3 =       German
  7116.                   4 =       Swedish
  7117.                   5 =       Finnish
  7118.                   6 =       Spanish
  7119.                   7 =       Portuguese
  7120.                   8 =       Italian
  7121.  
  7122. Returns:
  7123.  
  7124.   Nothing
  7125.  
  7126. Note:
  7127.  
  7128.   ■ This function is only available in international versions of the
  7129.     Microsoft Mouse driver.
  7130.  
  7131.  
  7132. ────────────────────────────────────────────────────────────────────────────
  7133. Int 33H
  7134. Function 23H (35)
  7135. Get language number
  7136. ────────────────────────────────────────────────────────────────────────────
  7137.  
  7138.   Returns the number of the language that is used by the mouse driver for
  7139.   prompts and error messages.
  7140.  
  7141. Call with:
  7142.  
  7143.   AX            = 0023H
  7144.  
  7145. Returns:
  7146.  
  7147.   BX            = language number (see Int 33H Function 22H)
  7148.  
  7149. Note:
  7150.  
  7151.   ■ This function is only available in international versions of the
  7152.     Microsoft Mouse driver.
  7153.  
  7154.  
  7155. ────────────────────────────────────────────────────────────────────────────
  7156. Int 33H
  7157. Function 24H (36)
  7158. Get mouse information
  7159. ────────────────────────────────────────────────────────────────────────────
  7160.  
  7161.   Returns the mouse driver version number, mouse type, and the IRQ number of
  7162.   the interrupt used by the mouse adapter.
  7163.  
  7164. Call with:
  7165.  
  7166.   AX            = 0024H
  7167.  
  7168. Returns:
  7169.  
  7170.   BH            = major version number (6 for version 6.10, etc.)
  7171.   BL            = minor version number (0AH for version 6.10, etc.)
  7172.   CH            = mouse type
  7173.  
  7174.                   1 =       bus mouse
  7175.                   2 =       serial mouse
  7176.                   3 =       InPort mouse
  7177.                   4 =       PS/2 mouse
  7178.                   5 =       HP mouse
  7179.  
  7180.   CL            = IRQ number
  7181.  
  7182.                   0                    = PS/2
  7183.                   2, 3, 4, 5, or 7     = IRQ number
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189. ────────────────────────────────────────────────────────────────────────────
  7190. SECTION 4  LOTUS/INTEL/MICROSOFT EMS FUNCTIONS REFERENCE
  7191. ────────────────────────────────────────────────────────────────────────────
  7192.  
  7193.  
  7194. Notes to the Reader
  7195.  
  7196.   The Lotus/Intel/Microsoft Expanded Memory Specification (EMS) defines a
  7197.   hardware/software subsystem, compatible with 80x86-based microcomputers
  7198.   running MS-DOS, that allows applications to access as much as 32 MB of
  7199.   bank-switched random-access memory. The software component, called the
  7200.   Expanded Memory Manager (EMM), is installed during system initialization
  7201.   by a DEVICE= directive in the CONFIG.SYS file in the root directory on the
  7202.   boot disk.
  7203.  
  7204.   After ensuring that the EMM is present (see Chapter 11), an application
  7205.   program communicates directly with the EMM using software interrupt 67H. A
  7206.   particular EMM function is selected by the value in register AH and a
  7207.   success or error status is returned in register AH (error codes are listed
  7208.   on pages 207─209). Other parameters and results are passed or returned in
  7209.   registers or buffers.
  7210.  
  7211.   An icon in each function heading indicates the EMS version in which that
  7212.   function was first supported. You can assume that the function is
  7213.   available in all subsequent EMS versions unless explicitly noted
  7214.   otherwise.
  7215.  
  7216.   Version icons used in the synopsis, parameters, results, or Notes section
  7217.   refer to specific minor or major EMS versions, unless they include a +
  7218.   sign to indicate a version and all subsequent versions.
  7219.  
  7220.   The material in this section has been verified against the Expanded Memory
  7221.   Specification version 4.0, dated October 1987, Intel part number
  7222.   300275-005. This document can be obtained from Intel Corporation, 5200
  7223.   N.E. Elam Young Parkway, Hillsboro, OR 97124.
  7224.  
  7225.  
  7226. Summary of EMM Functions
  7227.  
  7228.  
  7229.   Function     Subfunction     Description
  7230.   ──────────────────────────────────────────────────────────────────────────
  7231.   40H (64)                    Get Status
  7232.   41H (65)                    Get Page Frame Address
  7233.   42H (66)                    Get Number of Pages
  7234.   43H (67)                    Allocate Handle and Pages
  7235.   44H (68)                    Map Expanded Memory Page
  7236.   45H (69)                    Release Handle and Expanded Memory
  7237.   46H (70)                    Get Version
  7238.   47H (71)                    Save Page Map
  7239.   48H (72)                    Restore Page Map
  7240.   49H (73)                    Reserved
  7241.   4AH (74)                    Reserved
  7242.   4BH (75)                    Get Handle Count
  7243.   4CH (76)                    Get Handle Pages
  7244.   4DH (77)                    Get Pages for All Handles
  7245.   4EH (78)     00H            Save Page Map
  7246.   4EH (78)     01H            Restore Page Map
  7247.   4EH (78)     02H            Save and Restore Page Map
  7248.   4EH (78)     03H            Get Size of Page Map Information
  7249.   4FH (79)     00H            Save Partial Page Map
  7250.   4FH (79)     01H            Restore Partial Page Map
  7251.   4FH (79)     02H            Get Size of Partial Page Map Information
  7252.   50H (80)     00H            Map Multiple Pages by Number
  7253.   50H (80)     01H            Map Multiple Pages by Address
  7254.   51H (81)                    Reallocate Pages for Handle
  7255.   52H (82)     00H            Get Handle Attribute
  7256.   52H (82)     01H            Set Handle Attribute
  7257.   52H (82)     02H            Get Attribute Capability
  7258.   53H (83)     00H            Get Handle Name
  7259.   53H (83)     01H            Set Handle Name
  7260.   54H (84)     00H            Get All Handle Names
  7261.   54H (84)     01H            Search for Handle Name
  7262.   54H (84)     02H            Get Total Handles
  7263.   55H (85)     00H            Map Pages by Number and Jump
  7264.   55H (85)     01H            Map Pages by Address and Jump
  7265.   56H (86)     00H            Map Pages by Number and Call
  7266.   56H (86)     01H            Map Pages by Address and Call
  7267.   56H (86)     02H            Get Space for Map Page and Call
  7268.   57H (87)     00H            Move Memory Region
  7269.   57H (87)     01H            Exchange Memory Regions
  7270.   58H (88)     00H            Get Addresses of Mappable Pages
  7271.   58H (88)     01H            Get Number of Mappable Pages
  7272.   59H (89)     00H            Get Hardware Configuration
  7273.   59H (89)     01H            Get Number of Raw Pages
  7274.   5AH (90)     00H            Allocate Handle and Standard Pages
  7275.   5AH (90)     01H            Allocate Handle and Raw Pages
  7276.   5BH (91)     00H            Get Alternate Map Registers
  7277.   5BH (91)     01H            Set Alternate Map Registers
  7278.   5BH (91)     02H            Get Size of Alternate Map Register Save Area
  7279.   5BH (91)     03H            Allocate Alternate Map Register Set
  7280.   5BH (91)     04H            Deallocate Alternate Map Register Set
  7281.   5BH (91)     05H            Allocate DMA Register Set
  7282.   5BH (91)     06H            Enable DMA on Alternate Map Register Set
  7283.   5BH (91)     07H            Disable DMA on Alternate Map Register Set
  7284.   5BH (91)     08H            Deallocate DMA Register Set
  7285.   5CH (92)                    Prepare Expanded Memory Manager for Warm Boot
  7286.   5DH (93)     00H            Enable EMM Operating-System Functions
  7287.   5DH (93)     01H            Disable EMM Operating-System Functions
  7288.   5DH (93)     02H            Release Access Key
  7289.   ──────────────────────────────────────────────────────────────────────────
  7290.  
  7291.  
  7292.  
  7293. ────────────────────────────────────────────────────────────────────────────
  7294. Int 67H                                                            [EMS 3.0]
  7295. Function 40H (64)
  7296. Get status
  7297. ────────────────────────────────────────────────────────────────────────────
  7298.  
  7299.   Returns a status code indicating whether the expanded memory software and
  7300.   hardware are present and functional.
  7301.  
  7302. Call with:
  7303.  
  7304.   AH            = 40H
  7305.  
  7306. Returns:
  7307.  
  7308.   If function successful
  7309.  
  7310.   AH            = 00H
  7311.  
  7312.   If function unsuccessful
  7313.  
  7314.   AH            = error code
  7315.  
  7316. Note:
  7317.  
  7318.   ■ This call should be used only after an application has established that
  7319.     the Expanded Memory Manager is in fact present, using one of the
  7320.     techniques described in Chapter 11.
  7321.  
  7322.  
  7323. ────────────────────────────────────────────────────────────────────────────
  7324. Int 67H                                                            [EMS 3.0]
  7325. Function 41H (65)
  7326. Get page frame address
  7327. ────────────────────────────────────────────────────────────────────────────
  7328.  
  7329.   Returns the segment address of the page frame used by the Expanded Memory
  7330.   Manager.
  7331.  
  7332. Call with:
  7333.  
  7334.   AH            = 41H
  7335.  
  7336. Returns:
  7337.  
  7338.   If function successful
  7339.  
  7340.   AH            = 00H
  7341.   BX            = segment base of page frame
  7342.  
  7343.   If function unsuccessful
  7344.  
  7345.   AH            = error code
  7346.  
  7347. Notes:
  7348.  
  7349.   ■ The page frame is divided into four 16 KB pages, which are used to map
  7350.     logical expanded memory pages into the physical memory space of the CPU.
  7351.  
  7352.   ■ The application need not have already acquired an EMM handle to use this
  7353.     function.
  7354.  
  7355.   ■ [EMS 4.0] Mapping of expanded memory pages is not necessarily limited to
  7356.     the 64 KB page frame. See also Int 67H Function 58H Subfunction 00H.
  7357.  
  7358.  
  7359. ────────────────────────────────────────────────────────────────────────────
  7360. Int 67H                                                            [EMS 3.0]
  7361. Function 42H (66)
  7362. Get number of pages
  7363. ────────────────────────────────────────────────────────────────────────────
  7364.  
  7365.   Obtains the total number of logical expanded memory pages present in the
  7366.   system and the number of pages that are not already allocated.
  7367.  
  7368. Call with:
  7369.  
  7370.   AH            = 42H
  7371.  
  7372. Returns:
  7373.  
  7374.   If function successful
  7375.  
  7376.   AH            = 00H
  7377.   BX            = unallocated pages
  7378.   DX            = total pages
  7379.  
  7380.   If function unsuccessful
  7381.  
  7382.   AH            = error code
  7383.  
  7384. Notes:
  7385.  
  7386.   ■ The application need not have already acquired an EMM handle to use this
  7387.     function.
  7388.  
  7389.   ■ [EMS 4.0] See also Int 67H Function 59H Subfunction 01H.
  7390.  
  7391.  
  7392. ────────────────────────────────────────────────────────────────────────────
  7393. Int 67H                                                            [EMS 3.0]
  7394. Function 43H (67)
  7395. Allocate handle and pages
  7396. ────────────────────────────────────────────────────────────────────────────
  7397.  
  7398.   Obtains an EMM handle and allocates logical pages of expanded memory to be
  7399.   controlled by that handle.
  7400.  
  7401. Call with:
  7402.  
  7403.   AH            = 43H
  7404.   BX            = number of pages to allocate (must be nonzero)
  7405.  
  7406. Returns:
  7407.  
  7408.   If function successful
  7409.  
  7410.   AH            = 00H
  7411.   DX            = EMM handle
  7412.  
  7413.   If function unsuccessful
  7414.  
  7415.   AH            = error code
  7416.  
  7417. Notes:
  7418.  
  7419.   ■ This is the equivalent of a file open function for the expanded memory
  7420.     manager. The handle that is returned is analogous to a file handle and
  7421.     owns a certain number of expanded memory pages. The handle must be used
  7422.     with every subsequent request to map memory and must be released by a
  7423.     close operation before the application terminates.
  7424.  
  7425.   ■ This function may fail because there are no handles left to allocate or
  7426.     because there is an insufficient number of expanded memory pages to
  7427.     satisfy the request. In the latter case, Int 67H Function 42H can be
  7428.     used to determine the actual number of pages available.
  7429.  
  7430.   ■ [EMS 4.0] Int 67H Function 51H can be called to change the number of
  7431.     pages allocated to an EMM handle.
  7432.  
  7433.   ■ [EMS 4.0] The pages allocated by this function are always 16 KB for
  7434.     compatibility with earlier versions of EMS. See also Int 67H Function
  7435.     5AH Subfunctions 00H and 01H.
  7436.  
  7437.   ■ [EMS 4.0] Handle 0000H is always available for use by the operating
  7438.     system, and a prior call to this function is not required. The operating
  7439.     system must call Int 67H Function 51H to assign the desired number of
  7440.     pages to its reserved handle.
  7441.  
  7442.  
  7443. ────────────────────────────────────────────────────────────────────────────
  7444. Int 67H                                                            [EMS 3.0]
  7445. Function 44H (68)
  7446. Map expanded memory page
  7447. ────────────────────────────────────────────────────────────────────────────
  7448.  
  7449.   Maps one of the logical pages of expanded memory assigned to a handle onto
  7450.   a physical memory page that can be accessed by the CPU.
  7451.  
  7452. Call with:
  7453.  
  7454.   AH            = 44H
  7455.   AL            = physical page
  7456.   BX            = logical page
  7457.   DX            = EMM handle
  7458.  
  7459. Returns:
  7460.  
  7461.   If function successful
  7462.  
  7463.   AH            = 00H
  7464.  
  7465.   If function unsuccessful
  7466.  
  7467.   AH            = error code
  7468.  
  7469. Notes:
  7470.  
  7471.   ■ The logical page number is in the range {0...n-1}, where n is the number
  7472.     of pages allocated or reallocated to the handle by a previous call to
  7473.     Int 67H Function 43H, 51H, or 5AH. Logical pages allocated by Int 67H
  7474.     Function 43H or Function 5AH Subfunction 00H are always 16 KB long;
  7475.     logical pages allocated by Int 67H Function 5AH Subfunction 01H are
  7476.     referred to as raw pages and are not necessarily 16 KB.
  7477.  
  7478.   ■ [EMS 3] The physical page is in the range 0─3 and lies within the EMM
  7479.     page frame, whose base address is obtained from Int 67H Function 41H.
  7480.  
  7481.   ■ [EMS 4.0] A list of the available physical pages and their addresses may
  7482.     be obtained from Int 67H Function 58H Subfunction 00H.
  7483.  
  7484.   ■ [EMS 4.0] If this function is called with BX = -1, the specified
  7485.     physical page is unmapped (made inaccessible for reading or writing).
  7486.  
  7487.  
  7488. ────────────────────────────────────────────────────────────────────────────
  7489. Int 67H                                                            [EMS 3.0]
  7490. Function 45H (69)
  7491. Release handle and expanded memory
  7492. ────────────────────────────────────────────────────────────────────────────
  7493.  
  7494.   Deallocates the expanded memory pages assigned to a handle and then
  7495.   releases the handle.
  7496.  
  7497. Call with:
  7498.  
  7499.   AH            = 45H
  7500.   DX            = EMM handle
  7501.  
  7502. Returns:
  7503.  
  7504.   If function successful
  7505.  
  7506.   AH            = 00H
  7507.  
  7508.   If function unsuccessful
  7509.  
  7510.   AH            = error code
  7511.  
  7512. Notes:
  7513.  
  7514.   ■ If this function is not called before a program terminates, the EMS
  7515.     pages it owned remain unavailable until the system is restarted.
  7516.     Programs that use EMS should install their own Ctrl-C handlers and
  7517.     critical-error handlers (Ints 23H and 24H) so that they cannot be
  7518.     terminated unexpectedly.
  7519.  
  7520.   ■ [EMS 4.0] When a handle is released, its name is set to all ASCII nulls.
  7521.  
  7522.  
  7523. ────────────────────────────────────────────────────────────────────────────
  7524. Int 67H                                                            [EMS 3.0]
  7525. Function 46H (70)
  7526. Get version
  7527. ────────────────────────────────────────────────────────────────────────────
  7528.  
  7529.   Returns the EMS version supported by the expanded memory manager.
  7530.  
  7531. Call with:
  7532.  
  7533.   AH            = 46H
  7534.  
  7535. Returns:
  7536.  
  7537.   If function successful
  7538.  
  7539.   AH            = 00H
  7540.   AL            = version number
  7541.  
  7542.   If function unsuccessful
  7543.  
  7544.   AH            = error code
  7545.  
  7546. Notes:
  7547.  
  7548.   ■ The version number is returned in binary code decimal (BCD) format, with
  7549.     the integer portion in the upper 4 bits of AL and the fractional portion
  7550.     in the lower 4 bits. For example, under an EMM that supports EMS version
  7551.     3.2, AL is returned as the value 32H.
  7552.  
  7553.   ■ Applications should always check the EMM version number to ensure that
  7554.     all of the EMM functions they require are available.
  7555.  
  7556.  
  7557. ────────────────────────────────────────────────────────────────────────────
  7558. Int 67H                                                            [EMS 3.0]
  7559. Function 47H (71)
  7560. Save page map
  7561. ────────────────────────────────────────────────────────────────────────────
  7562.  
  7563.   Saves the contents of the page-mapping registers on the expanded memory
  7564.   hardware, associating those contents with a particular EMM handle.
  7565.  
  7566. Call with:
  7567.  
  7568.   AH            = 47H
  7569.   DX            = EMM handle
  7570.  
  7571. Returns:
  7572.  
  7573.   If function successful
  7574.  
  7575.   AH            = 00H
  7576.  
  7577.   If function unsuccessful
  7578.  
  7579.   AH            = error code
  7580.  
  7581. Notes:
  7582.  
  7583.   ■ This function is used by interrupt handlers or device drivers that must
  7584.     access expanded memory. The EMM handle supplied to this function is the
  7585.     handle that was assigned to the handler or driver during its own
  7586.     initialization sequence, not to the program that was interrupted.
  7587.  
  7588.   ■ The mapping context is restored by a subsequent call to Int 67H Function
  7589.     48H.
  7590.  
  7591.   ■ [EMS 4.0] This function saves only the mapping state for the 64 KB page
  7592.     frame defined in EMS 3. Programs that are written to take advantage of
  7593.     the additional capabilities of EMS 4.0 should use Int 67H Function 4EH
  7594.     or 4FH in preference to this function.
  7595.  
  7596.  
  7597. ────────────────────────────────────────────────────────────────────────────
  7598. Int 67H                                                            [EMS 3.0]
  7599. Function 48H (72)
  7600. Restore page map
  7601. ────────────────────────────────────────────────────────────────────────────
  7602.  
  7603.   Restores the contents of the page-mapping registers on the expanded memory
  7604.   hardware to the values associated with the specified handle by a previous
  7605.   call to Int 67H Function 47H.
  7606.  
  7607. Call with:
  7608.  
  7609.   AH            = 48H
  7610.   DX            = EMM handle
  7611.  
  7612. Returns:
  7613.  
  7614.   If function successful
  7615.  
  7616.   AH            = 00H
  7617.  
  7618.   If function unsuccessful
  7619.  
  7620.   AH            = error code
  7621.  
  7622. Notes:
  7623.  
  7624.   ■ This function is used by interrupt handlers or device drivers that must
  7625.     access expanded memory. The EMM handle supplied to this function is the
  7626.     handle that was assigned to the handler or driver during its own
  7627.     initialization sequence, not to the program that was interrupted.
  7628.  
  7629.   ■ [EMS 4.0] This function restores only the mapping state for the 64 KB
  7630.     page frame defined in EMS 3. Programs that are written to take advantage
  7631.     of the additional capabilities of EMS 4.0 should use Int 67H Function
  7632.     4EH or 4FH in preference to this function.
  7633.  
  7634.  
  7635. ────────────────────────────────────────────────────────────────────────────
  7636. Int 67H                                                            [EMS 3.0]
  7637. Function 49H (73)
  7638. Reserved
  7639. ────────────────────────────────────────────────────────────────────────────
  7640.  
  7641.   This function was defined in EMS version 3.0 but is not documented for
  7642.   later EMS versions, so it should be avoided in application programs.
  7643.  
  7644.  
  7645. ────────────────────────────────────────────────────────────────────────────
  7646. Int 67H                                                            [EMS 3.0]
  7647. Function 4AH (74)
  7648. Reserved
  7649. ────────────────────────────────────────────────────────────────────────────
  7650.  
  7651.   This function was defined in EMS version 3.0 but is not documented for
  7652.   later EMS versions, so it should be avoided in application programs.
  7653.  
  7654.  
  7655. ────────────────────────────────────────────────────────────────────────────
  7656. Int 67H                                                            [EMS 3.0]
  7657. Function 4BH (75)
  7658. Get handle count
  7659. ────────────────────────────────────────────────────────────────────────────
  7660.  
  7661.   Returns the number of active expanded memory handles.
  7662.  
  7663. Call with:
  7664.  
  7665.   AH            = 4BH
  7666.  
  7667. Returns:
  7668.  
  7669.   If function successful
  7670.  
  7671.   AH            = 00H
  7672.   BX            = number of active EMM handles
  7673.  
  7674.   If function unsuccessful
  7675.  
  7676.   AH            = error code
  7677.  
  7678. Notes:
  7679.  
  7680.   ■ If the returned number of EMM handles is zero, the expanded memory
  7681.     manager is idle, and none of the expanded memory is in use.
  7682.  
  7683.   ■ The value returned by this function is not necessarily the same as the
  7684.     number of programs using expanded memory because one program may own
  7685.     multiple EMM handles.
  7686.  
  7687.   ■ The number of active EMM handles never exceeds 255.
  7688.  
  7689.  
  7690. ────────────────────────────────────────────────────────────────────────────
  7691. Int 67H                                                            [EMS 3.0]
  7692. Function 4CH (76)
  7693. Get handle pages
  7694. ────────────────────────────────────────────────────────────────────────────
  7695.  
  7696.   Returns the number of expanded memory pages allocated to a specific EMM
  7697.   handle.
  7698.  
  7699. Call with:
  7700.  
  7701.   AH            = 4CH
  7702.   DX            = EMM handle
  7703.  
  7704. Returns:
  7705.  
  7706.   If function successful
  7707.  
  7708.   AH            = 00H
  7709.   BX            = number of EMM pages
  7710.  
  7711.   If function unsuccessful
  7712.  
  7713.   AH            = error code
  7714.  
  7715. Notes:
  7716.  
  7717.   ■ [EMS 3] The total number of pages allocated to a handle never exceeds
  7718.     512. A handle never has zero pages allocated to it.
  7719.  
  7720.   ■ [EMS 4.0] The total number of pages allocated to a handle never exceeds
  7721.     2048. A handle may have zero pages of expanded memory.
  7722.  
  7723.  
  7724. ────────────────────────────────────────────────────────────────────────────
  7725. Int 67H                                                            [EMS 3.0]
  7726. Function 4DH (77)
  7727. Get pages for all handles
  7728. ────────────────────────────────────────────────────────────────────────────
  7729.  
  7730.   Returns an array that contains all the active handles and the number of
  7731.   expanded memory pages associated with each handle.
  7732.  
  7733. Call with:
  7734.  
  7735.   AH            = 4DH
  7736.   ES:DI         = segment:offset of buffer (see Notes)
  7737.  
  7738. Returns:
  7739.  
  7740.   If function successful
  7741.  
  7742.   AH            = 00H
  7743.   BX            = number of active EMM handles
  7744.  
  7745.   and buffer filled in as described in Notes
  7746.  
  7747.   If function unsuccessful
  7748.  
  7749.   AH            = error code
  7750.  
  7751. Notes:
  7752.  
  7753.   ■ The buffer is filled in with a series of DWORD (32-bit) entries, one per
  7754.     active EMM handle. The first word of an entry contains the handle, and
  7755.     the second word contains the number of pages allocated to that handle.
  7756.  
  7757.   ■ The maximum number of active handles is 256 (including the operating
  7758.     system handle 0), so a buffer size of 1024 bytes is adequate in all
  7759.     cases.
  7760.  
  7761.  
  7762. ────────────────────────────────────────────────────────────────────────────
  7763. Int 67H                                                            [EMS 3.2]
  7764. Function 4EH (78) Subfunction 00H
  7765. Save page map
  7766. ────────────────────────────────────────────────────────────────────────────
  7767.  
  7768.   Saves the current page-mapping state of the expanded memory hardware in
  7769.   the specified buffer.
  7770.  
  7771. Call with:
  7772.  
  7773.   AH            = 4EH
  7774.   AL            = 00H
  7775.   ES:DI         = segment:offset of buffer (see Notes)
  7776.  
  7777. Returns:
  7778.  
  7779.   If function successful
  7780.  
  7781.   AH            = 00H
  7782.  
  7783.   and buffer filled in with mapping information (see Notes)
  7784.  
  7785.   If function unsuccessful
  7786.  
  7787.   AH            = error code
  7788.  
  7789. Notes:
  7790.  
  7791.   ■ The buffer receives the information necessary to restore the state of
  7792.     the mapping registers using Int 67H Function 4EH Subfunction 01H. The
  7793.     format of the information may vary.
  7794.  
  7795.   ■ The size of the buffer required by this function can be determined with
  7796.     Int 67H Function 4EH Subfunction 03H.
  7797.  
  7798.   ■ Unlike Int 67H Function 47H, this function does not require a handle.
  7799.  
  7800.  
  7801. ────────────────────────────────────────────────────────────────────────────
  7802. Int 67H                                                            [EMS 3.2]
  7803. Function 4EH (78) Subfunction 01H
  7804. Restore page map
  7805. ────────────────────────────────────────────────────────────────────────────
  7806.  
  7807.   Restores the page-mapping state of the expanded memory hardware using the
  7808.   information in the specified buffer.
  7809.  
  7810. Call with:
  7811.  
  7812.   AH            = 4EH
  7813.   AL            = 01H
  7814.   DS:SI         = segment:offset of buffer (see Notes)
  7815.  
  7816. Returns:
  7817.  
  7818.   If function successful
  7819.  
  7820.   AH            = 00H
  7821.  
  7822.   If function unsuccessful
  7823.  
  7824.   AH            = error code
  7825.  
  7826. Notes:
  7827.  
  7828.   ■ The buffer contains information necessary to restore the state of the
  7829.     mapping registers from a previous call to Int 67H Function 4EH
  7830.     Subfunction 00H or 02H. The format of the information may vary.
  7831.  
  7832.   ■ Unlike Int 67H Function 48H, this function does not require a handle.
  7833.  
  7834.  
  7835. ────────────────────────────────────────────────────────────────────────────
  7836. Int 67H                                                            [EMS 3.2]
  7837. Function 4EH (78) Subfunction 02H
  7838. Save and restore page map
  7839. ────────────────────────────────────────────────────────────────────────────
  7840.  
  7841.   Saves the current page-mapping state of the expanded memory hardware in a
  7842.   buffer and then sets the mapping state using the information in another
  7843.   buffer.
  7844.  
  7845. Call with:
  7846.  
  7847.   AH            = 4EH
  7848.   AL            = 02H
  7849.   DS:SI         = segment:offset of buffer containing mapping information
  7850.                   (see Notes)
  7851.   ES:DI         = segment:offset of buffer to receive mapping information
  7852.                   (see Notes)
  7853.  
  7854. Returns:
  7855.  
  7856.   If function successful
  7857.  
  7858.   AH            = 00H
  7859.  
  7860.   and buffer pointed to by ES:DI filled in with mapping information (see
  7861.   Notes)
  7862.  
  7863.   If function unsuccessful
  7864.  
  7865.   AH            = error code
  7866.  
  7867. Notes:
  7868.  
  7869.   ■ The buffer addressed by DS:SI contains information necessary to restore
  7870.     the state of the mapping registers from a previous call to Int 67H
  7871.     Function 4EH Subfunction 00H or 02H. The format of the information may
  7872.     vary.
  7873.  
  7874.   ■ The sizes of the buffers required by this function can be determined
  7875.     with Int 67H Function 4EH Subfunction 03H.
  7876.  
  7877.   ■ Unlike Int 67H Functions 47H and 48H, this function does not require a
  7878.     handle.
  7879.  
  7880.  
  7881. ────────────────────────────────────────────────────────────────────────────
  7882. Int 67H                                                            [EMS 3.2]
  7883. Function 4EH (78) Subfunction 03H
  7884. Get size of page map information
  7885. ────────────────────────────────────────────────────────────────────────────
  7886.  
  7887.   Returns the size of the buffer that is required to receive page-mapping
  7888.   information using Int 67H Function 4EH Subfunctions 00H and 02H.
  7889.  
  7890. Call with:
  7891.  
  7892.   AH            = 4EH
  7893.   AL            = 03H
  7894.  
  7895. Returns:
  7896.  
  7897.   If function successful
  7898.  
  7899.   AH            = 00H
  7900.   AL            = size of buffer (bytes)
  7901.  
  7902.   If function unsuccessful
  7903.  
  7904.   AH            = error code
  7905.  
  7906.  
  7907. ────────────────────────────────────────────────────────────────────────────
  7908. Int 67H                                                            [EMS 4.0]
  7909. Function 4FH (79) Subfunction 00H
  7910. Save partial page map
  7911. ────────────────────────────────────────────────────────────────────────────
  7912.  
  7913.   Saves the state of a subset of the expanded memory page-mapping registers
  7914.   in the specified buffer.
  7915.  
  7916. Call with:
  7917.  
  7918.   AH            = 4FH
  7919.   AL            = 00H
  7920.   DS:SI         = segment:offset of map list (see Notes)
  7921.   ES:DI         = segment:offset of buffer to receive mapping state (see
  7922.                   Notes)
  7923.  
  7924. Returns:
  7925.  
  7926.   If function successful
  7927.  
  7928.   AH            = 00H
  7929.  
  7930.   and buffer filled in with mapping information (see Notes)
  7931.  
  7932.   If function unsuccessful
  7933.  
  7934.   AH            = error code
  7935.  
  7936. Notes:
  7937.  
  7938.   ■ The map list contains the number of mappable segments in the first word,
  7939.     followed by the segment addresses of the mappable memory regions (one
  7940.     segment per word).
  7941.  
  7942.   ■ To determine the size of the buffer required for the mapping state, use
  7943.     Int 67H Function 4FH Subfunction 02H.
  7944.  
  7945.  
  7946. ────────────────────────────────────────────────────────────────────────────
  7947. Int 67H                                                            [EMS 4.0]
  7948. Function 4FH (79) Subfunction 01H
  7949. Restore partial page map
  7950. ────────────────────────────────────────────────────────────────────────────
  7951.  
  7952.   Restores the state of a subset of the expanded memory page-mapping
  7953.   registers.
  7954.  
  7955. Call with:
  7956.  
  7957.   AH            = 4FH
  7958.   AL            = 01H
  7959.   DS:SI         = segment:offset of buffer (see Note)
  7960.  
  7961. Returns:
  7962.  
  7963.   If function successful
  7964.  
  7965.   AH            = 00H
  7966.  
  7967.   If function unsuccessful
  7968.  
  7969.   AH            = error code
  7970.  
  7971. Note:
  7972.  
  7973.   ■ The buffer contains mapping information and must have been prepared by a
  7974.     previous call to Int 67H Function 4FH Subfunction 00H.
  7975.  
  7976.  
  7977. ────────────────────────────────────────────────────────────────────────────
  7978. Int 67H                                                            [EMS 4.0]
  7979. Function 4FH (79) Subfunction 02H
  7980. Get size of partial page map information
  7981. ────────────────────────────────────────────────────────────────────────────
  7982.  
  7983.   Returns the size of the buffer which will be required to receive partial
  7984.   page-mapping information using Int 67H Function 4FH Subfunction 00H.
  7985.  
  7986. Call with:
  7987.  
  7988.   AH            = 4FH
  7989.   AL            = 02H
  7990.   BX            = number of pages
  7991.  
  7992. Returns:
  7993.  
  7994.   If function successful
  7995.  
  7996.   AH            = 00H
  7997.   AL            = size of array (bytes)
  7998.  
  7999.   If function unsuccessful
  8000.  
  8001.   AH            = error code
  8002.  
  8003.  
  8004. ────────────────────────────────────────────────────────────────────────────
  8005. Int 67H                                                            [EMS 4.0]
  8006. Function 50H (80) Subfunction 00H
  8007. Map multiple pages by number
  8008. ────────────────────────────────────────────────────────────────────────────
  8009.  
  8010.   Maps one or more of the logical expanded memory pages assigned to a handle
  8011.   onto physical memory pages that can be accessed by the CPU. Physical pages
  8012.   are referenced by their numbers.
  8013.  
  8014. Call with:
  8015.  
  8016.   AH            = 50H
  8017.   AL            = 00H
  8018.   CX            = number of pages to map
  8019.   DX            = EMM handle
  8020.   DS:SI         = segment:offset of buffer (see Note)
  8021.  
  8022. Returns:
  8023.  
  8024.   If function successful
  8025.  
  8026.   AH            = 00H
  8027.  
  8028.   If function unsuccessful
  8029.  
  8030.   AH            = error code
  8031.  
  8032. Note:
  8033.  
  8034.   ■ The buffer contains a series of DWORD (32-bit) entries that control the
  8035.     pages to be mapped. The first word of each entry contains the logical
  8036.     expanded memory page number, and the second word contains the physical
  8037.     page number to which it should be mapped. If the logical page is -1, the
  8038.     physical page is unmapped (made inaccessible for reading or writing).
  8039.  
  8040.  
  8041. ────────────────────────────────────────────────────────────────────────────
  8042. Int 67H                                                            [EMS 4.0]
  8043. Function 50H (80) Subfunction 01H
  8044. Map multiple pages by address
  8045. ────────────────────────────────────────────────────────────────────────────
  8046.  
  8047.   Maps one or more of the logical expanded memory pages assigned to a handle
  8048.   onto physical memory pages that can be accessed by the CPU. Physical pages
  8049.   are referenced by their segment addresses.
  8050.  
  8051. Call with:
  8052.  
  8053.   AH            = 50H
  8054.   AL            = 01H
  8055.   CX            = number of pages to map
  8056.   DX            = EMM handle
  8057.   DS:SI         = segment:offset of buffer (see Notes)
  8058.  
  8059. Returns:
  8060.  
  8061.   If function successful
  8062.  
  8063.   AH            = 00H
  8064.  
  8065.   If function unsuccessful
  8066.  
  8067.   AH            = error code
  8068.  
  8069. Notes:
  8070.  
  8071.   ■ The buffer contains a series of DWORD (32-bit) entries that control the
  8072.     pages to be mapped. The first word of each entry contains the logical
  8073.     page number, and the second word contains the physical page segment
  8074.     address to which it should be mapped. If the logical page is -1, the
  8075.     physical page is unmapped (made inaccessible for reading or writing).
  8076.  
  8077.   ■ The mappable segment addresses may be obtained by calling Int 67H
  8078.     Function 58H Subfunction 00H.
  8079.  
  8080.  
  8081. ────────────────────────────────────────────────────────────────────────────
  8082. Int 67H                                                            [EMS 4.0]
  8083. Function 51H (81)
  8084. Reallocate pages for handle
  8085. ────────────────────────────────────────────────────────────────────────────
  8086.  
  8087.   Modifies the number of expanded memory pages allocated to an EMM handle.
  8088.  
  8089. Call with:
  8090.  
  8091.   AH            = 51H
  8092.   BX            = new number of pages
  8093.   DX            = EMM handle
  8094.  
  8095. Returns:
  8096.  
  8097.   If function successful
  8098.  
  8099.   AH            = 00H
  8100.   BX            = logical pages owned by EMM handle
  8101.  
  8102.   If function unsuccessful
  8103.  
  8104.   AH            = error code
  8105.  
  8106. Note:
  8107.  
  8108.   ■ If the requested number of pages is zero, the handle is still active,
  8109.     and pages can be reallocated to the handle at a later time; also, the
  8110.     handle must still be released with Int 67H Function 45H before the
  8111.     application terminates.
  8112.  
  8113.  
  8114. ────────────────────────────────────────────────────────────────────────────
  8115. Int 67H                                                            [EMS 4.0]
  8116. Function 52H (82) Subfunction 00H
  8117. Get handle attribute
  8118. ────────────────────────────────────────────────────────────────────────────
  8119.  
  8120.   Returns the attribute (volatile or nonvolatile) associated with the
  8121.   specified handle. A nonvolatile memory handle and the contents of the
  8122.   expanded memory pages that are allocated to it are maintained across a
  8123.   warm boot operation (system restart using Ctrl-Alt-Del).
  8124.  
  8125. Call with:
  8126.  
  8127.   AH            = 52H
  8128.   AL            = 00H
  8129.   DX            = EMM handle
  8130.  
  8131. Returns:
  8132.  
  8133.   If function successful
  8134.  
  8135.   AH            = 00H
  8136.   AL            = attribute
  8137.  
  8138.                   0       = volatile
  8139.                   1       = nonvolatile
  8140.  
  8141.   If function unsuccessful
  8142.  
  8143.   AH            = error code
  8144.  
  8145.  
  8146. ────────────────────────────────────────────────────────────────────────────
  8147. Int 67H                                                            [EMS 4.0]
  8148. Function 52H (82) Subfunction 01H
  8149. Set handle attribute
  8150. ────────────────────────────────────────────────────────────────────────────
  8151.  
  8152.   Sets the attribute (volatile or nonvolatile) associated with the specified
  8153.   handle. A nonvolatile memory handle and the contents of the expanded
  8154.   memory pages that are allocated to it are maintained across a warm boot
  8155.   operation (system restart using Ctrl-Alt-Del).
  8156.  
  8157. Call with:
  8158.  
  8159.   AH            = 52H
  8160.   AL            = 01H
  8161.   BL            = attribute
  8162.  
  8163.                   0       = volatile
  8164.                   1       = nonvolatile
  8165.  
  8166.   DX            = EMM handle
  8167.  
  8168. Returns:
  8169.  
  8170.   If function successful
  8171.  
  8172.   AH            = 00H
  8173.  
  8174.   If function unsuccessful
  8175.  
  8176.   AH            = error code
  8177.  
  8178. Note:
  8179.  
  8180.   ■ If the expanded memory hardware cannot support nonvolatile pages, this
  8181.     function returns an error.
  8182.  
  8183.  
  8184. ────────────────────────────────────────────────────────────────────────────
  8185. Int 67H                                                            [EMS 4.0]
  8186. Function 52H (82) Subfunction 02H
  8187. Get attribute capability
  8188. ────────────────────────────────────────────────────────────────────────────
  8189.  
  8190.   Returns a code indicating whether the Expanded Memory Manager and hardware
  8191.   can support the nonvolatile attribute for EMM handles.
  8192.  
  8193. Call with:
  8194.  
  8195.   AH            = 52H
  8196.   AL            = 02H
  8197.  
  8198. Returns:
  8199.  
  8200.   If function successful
  8201.  
  8202.   AH            = 00H
  8203.   AL            = attribute capability
  8204.                   0       = only volatile handles supported
  8205.                   1       = volatile and nonvolatile handles supported
  8206.  
  8207.   If function unsuccessful
  8208.  
  8209.   AH            = error code
  8210.  
  8211.  
  8212. ────────────────────────────────────────────────────────────────────────────
  8213. Int 67H                                                            [EMS 4.0]
  8214. Function 53H (83) Subfunction 00H
  8215. Get handle name
  8216. ────────────────────────────────────────────────────────────────────────────
  8217.  
  8218.   Returns the 8-character name assigned to a handle.
  8219.  
  8220. Call with:
  8221.  
  8222.   AH            = 53H
  8223.   AL            = 00H
  8224.   DX            = EMM handle
  8225.   ES:DI         = segment:offset of 8-byte buffer
  8226.  
  8227. Returns:
  8228.  
  8229.   If function successful
  8230.  
  8231.   AH            = 00H
  8232.  
  8233.   and name for handle in specified buffer
  8234.  
  8235.   If function unsuccessful
  8236.  
  8237.   AH            = error code
  8238.  
  8239. Note:
  8240.  
  8241.   ■ A handle's name is initialized to 8 zero bytes when it is allocated or
  8242.     deallocated. Another name may be assigned to an active handle with Int
  8243.     67H Function 53H Subfunction 01H. The bytes in a handle name need not
  8244.     be ASCII characters.
  8245.  
  8246.  
  8247. ────────────────────────────────────────────────────────────────────────────
  8248. Int 67H                                                            [EMS 4.0]
  8249. Function 53H (83) Subfunction 01H
  8250. Set handle name
  8251. ────────────────────────────────────────────────────────────────────────────
  8252.  
  8253.   Assigns a name to an EMM handle.
  8254.  
  8255. Call with:
  8256.  
  8257.   AH            = 53H
  8258.   AL            = 01H
  8259.   DX            = EMM handle
  8260.   DS:SI         = segment:offset of 8-byte name
  8261.  
  8262. Returns:
  8263.  
  8264.   If function successful
  8265.  
  8266.   AH            = 00H
  8267.  
  8268.   If function unsuccessful
  8269.  
  8270.   AH            = error code
  8271.  
  8272. Notes:
  8273.  
  8274.   ■ The bytes in a handle name need not be ASCII characters, but the
  8275.     sequence of 8 zero bytes is reserved for no name (the default after a
  8276.     handle is allocated or deallocated). A handle name should be padded with
  8277.     zero bytes, if necessary, to a length of 8 bytes.
  8278.  
  8279.   ■ A handle may be renamed at any time.
  8280.  
  8281.   ■ All handle names are initialized to 8 zero bytes when the system is
  8282.     turned on. The name of a nonvolatile handle is preserved across a warm
  8283.     boot. (See Int 67H Function 52H Subfunctions 00H and 02H.)
  8284.  
  8285.  
  8286. ────────────────────────────────────────────────────────────────────────────
  8287. Int 67H                                                            [EMS 4.0]
  8288. Function 54H (84) Subfunction 00H
  8289. Get all handle names
  8290. ────────────────────────────────────────────────────────────────────────────
  8291.  
  8292.   Returns the names for all active handles.
  8293.  
  8294. Call with:
  8295.  
  8296.   AH            = 54H
  8297.   AL            = 00H
  8298.   ES:DI         = segment:offset of buffer (see Notes)
  8299.  
  8300. Returns:
  8301.  
  8302.   If function successful
  8303.  
  8304.   AH            = 00H
  8305.   AL            = number of active handles
  8306.  
  8307.   and buffer filled in with handle-name information (see Notes)
  8308.  
  8309.   If function unsuccessful
  8310.  
  8311.   AH            = error code
  8312.  
  8313. Notes:
  8314.  
  8315.   ■ The function fills the buffer with a series of 10-byte entries. The
  8316.     first 2 bytes of each entry contain an EMM handle, and the next 8 bytes
  8317.     contain the name associated with the handle. Handles that have never
  8318.     been assigned a name have 8 bytes of 0 as a name.
  8319.  
  8320.   ■ Because there is a maximum of 255 active handles, the buffer need not be
  8321.     longer than 2550 bytes.
  8322.  
  8323.  
  8324. ────────────────────────────────────────────────────────────────────────────
  8325. Int 67H                                                            [EMS 4.0]
  8326. Function 54H (84) Subfunction 01H
  8327. Search for handle name
  8328. ────────────────────────────────────────────────────────────────────────────
  8329.  
  8330.   Returns the EMM handle associated with the specified name.
  8331.  
  8332. Call with:
  8333.  
  8334.   AH            = 54H
  8335.   AL            = 01H
  8336.   DS:SI         = segment:offset of 8-byte handle name
  8337.  
  8338. Returns:
  8339.  
  8340.   If function successful
  8341.  
  8342.   AH            = 00H
  8343.   DX            = EMM handle
  8344.  
  8345.   If function unsuccessful
  8346.  
  8347.   AH            = error code
  8348.  
  8349.  
  8350. ────────────────────────────────────────────────────────────────────────────
  8351. Int 67H                                                            [EMS 4.0]
  8352. Function 54H (84) Subfunction 02H
  8353. Get total handles
  8354. ────────────────────────────────────────────────────────────────────────────
  8355.  
  8356.   Returns the total number of handles that are supported by the Expanded
  8357.   Memory Manager, including the operating-system handle (0).
  8358.  
  8359. Call with:
  8360.  
  8361.   AH            = 54H
  8362.   AL            = 02H
  8363.  
  8364. Returns:
  8365.  
  8366.   If function successful
  8367.  
  8368.   AH            = 00H
  8369.   BX            = number of handles
  8370.  
  8371.   If function unsuccessful
  8372.  
  8373.   AH            = error code
  8374.  
  8375.  
  8376. ────────────────────────────────────────────────────────────────────────────
  8377. Int 67H                                                            [EMS 4.0]
  8378. Function 55H (85) Subfunctions 00H and 01H
  8379. Map pages and jump
  8380. ────────────────────────────────────────────────────────────────────────────
  8381.  
  8382.   Alters the expanded memory mapping context and transfers control to the
  8383.   specified address.
  8384.  
  8385. Call with:
  8386.  
  8387.   AH            = 55H
  8388.   AL            = subfunction
  8389.  
  8390.                   0       = map using physical page numbers
  8391.                   1       = map using physical page segments
  8392.  
  8393.   DX            = EMM handle
  8394.   DS:SI         = segment:offset of buffer (see Notes)
  8395.  
  8396. Returns:
  8397.  
  8398.   If function successful
  8399.  
  8400.   AH            = 00H
  8401.  
  8402.   If function unsuccessful
  8403.  
  8404.   AH            = error code
  8405.  
  8406. Notes:
  8407.  
  8408.   ■ The buffer contains map-and-jump entries in the following format:
  8409.  
  8410.     Offset        Length         Description
  8411.     ────────────────────────────────────────────────────────────────────────
  8412.     00H           4              far pointer to jump target
  8413.     04H           1              number of pages to map before jump
  8414.     05H           4              far pointer to map list (see below)
  8415.     ────────────────────────────────────────────────────────────────────────
  8416.  
  8417.     The map list in turn consists of DWORD (32-bit) entries, one per page.
  8418.     The first word of each entry contains the logical page number, and the
  8419.     second word contains the physical page number or segment (depending on
  8420.     the value in register AL) to which it should be mapped.
  8421.  
  8422.   ■ A request to map zero pages and jump is not considered an error; the
  8423.     effect is a simple far jump.
  8424.  
  8425.  
  8426. ────────────────────────────────────────────────────────────────────────────
  8427. Int 67H                                                            [EMS 4.0]
  8428. Function 56H (86) Subfunctions 00H and 01H
  8429. Map pages and call
  8430. ────────────────────────────────────────────────────────────────────────────
  8431.  
  8432.   Alters the expanded memory mapping context and performs a far call to the
  8433.   specified address. When the destination routine executes a far return, the
  8434.   EMM again alters the page-mapping context as instructed and then returns
  8435.   control to the original caller.
  8436.  
  8437. Call with:
  8438.  
  8439.   AH            = 56H
  8440.   AL            = subfunction
  8441.  
  8442.                   0       = map using physical page numbers
  8443.                   1       = map using physical page segments
  8444.  
  8445.   DX            = EMM handle
  8446.   DS:SI         = segment:offset of buffer (see Notes)
  8447.  
  8448. Returns:
  8449.  
  8450.   If function successful
  8451.  
  8452.   AH            = 00H
  8453.  
  8454.   If function unsuccessful
  8455.  
  8456.   AH            = error code
  8457.  
  8458. Notes:
  8459.  
  8460.   ■ The format of the buffer containing map and call information is:
  8461.  
  8462.     Offset        Length         Description
  8463.     ────────────────────────────────────────────────────────────────────────
  8464.     00H           4              far pointer to call target
  8465.     04H           1              number of pages to map before call
  8466.     05H           4              far pointer to list of pages to map before
  8467.                                  call (see below)
  8468.     09H           1              number of pages to map before return
  8469.     0AH           4              far pointer to list of pages to map before
  8470.                                  return (see below)
  8471.     0EH           8              reserved (0)
  8472.     ────────────────────────────────────────────────────────────────────────
  8473.  
  8474.     Both map lists have the same format and consist of a series of
  8475.     double-word entries, one per page. The first word of each entry contains
  8476.     the logical page number, and the second word contains the physical page
  8477.     number or segment (depending on the value in register AL) to which it
  8478.     should be mapped.
  8479.  
  8480.   ■ A request to map zero pages and call is not an error; the effect is a
  8481.     simple far call.
  8482.  
  8483.   ■ This function uses extra stack space to save information about the
  8484.     mapping context; the amount of stack space required can be determined by
  8485.     calling Int 67H Function 56H Subfunction 02H.
  8486.  
  8487.  
  8488. ──────────── ───────────────────────────────────────────────────────────────
  8489. Int 67H                                                            [EMS 4.0]
  8490. Function 56H (86) Subfunction 02H
  8491. Get stack space for map page and call
  8492. ────────────────────────────────────────────────────────────────────────────
  8493.  
  8494.   Returns the number of bytes of stack space required by Int 67H Function
  8495.   56H Subfunction 00H or 01H.
  8496.  
  8497. Call with:
  8498.  
  8499.   AH            = 56H
  8500.   AL            = 02H
  8501.  
  8502. Returns:
  8503.  
  8504.   If function successful
  8505.  
  8506.   AH            = 00H
  8507.   BX            = stack space required (bytes)
  8508.  
  8509.   If function unsuccessful
  8510.  
  8511.   AH            = error code
  8512.  
  8513.  
  8514. ────────────────────────────────────────────────────────────────────────────
  8515. Int 67H                                                            [EMS 4.0]
  8516. Function 57H (87) Subfunction 00H
  8517. Move memory region
  8518. ────────────────────────────────────────────────────────────────────────────
  8519.  
  8520.   Copies a memory region from any location in conventional or expanded
  8521.   memory to any other location without disturbing the current expanded
  8522.   memory mapping context.
  8523.  
  8524. Call with:
  8525.  
  8526.   AH            = 57H
  8527.   AL            = 00H
  8528.   DS:SI         = segment:offset of buffer (see Notes)
  8529.  
  8530. Returns:
  8531.  
  8532.   If function successful
  8533.  
  8534.   AH            = 00H
  8535.  
  8536.   If function unsuccessful
  8537.  
  8538.   AH            = error code
  8539.  
  8540. Notes:
  8541.  
  8542.   ■ The format of the buffer controlling the move operation is:
  8543.  
  8544.     Offset        Length         Description
  8545.     ────────────────────────────────────────────────────────────────────────
  8546.     00H           4              region length in bytes
  8547.     04H           1              source memory type (0 = conventional, 1 =
  8548.                                  expanded)
  8549.     05H           2              source memory handle
  8550.     07H           2              source memory offset
  8551.     09H           2              source memory segment or physical page
  8552.                                  number
  8553.     0BH           1              destination memory type (0 = conventional,
  8554.                                  1 = expanded)
  8555.     0CH           2              destination memory handle
  8556.     0EH           2              destination memory offset
  8557.     10H           2              destination memory segment or physical page
  8558.                                  number
  8559.     ────────────────────────────────────────────────────────────────────────
  8560.  
  8561.   ■ A length of zero bytes is not an error. The maximum length of a move is
  8562.     1 MB. If the length exceeds a single expanded memory page, consecutive
  8563.     expanded memory pages (as many as are required) supply or receive the
  8564.     data.
  8565.  
  8566.   ■ If the source and destination addresses overlap, the move will be
  8567.     performed in such a way that the destination receives an intact copy of
  8568.     the original data, and a nonzero status is returned.
  8569.  
  8570.  
  8571. ────────────────────────────────────────────────────────────────────────────
  8572. Int 67H                                                            [EMS 4.0]
  8573. Function 57H (87) Subfunction 01H
  8574. Exchange memory regions
  8575. ────────────────────────────────────────────────────────────────────────────
  8576.  
  8577.   Exchanges any two memory regions in conventional or expanded memory
  8578.   without disturbing the current expanded memory mapping context.
  8579.  
  8580. Call with:
  8581.  
  8582.   AH            = 57H
  8583.   AL            = 01H
  8584.   DS:SI         = segment:offset of buffer (see Notes)
  8585.  
  8586. Returns:
  8587.  
  8588.   If function successful
  8589.  
  8590.   AH            = 00H
  8591.  
  8592.   If function unsuccessful
  8593.  
  8594.   AH            = error code
  8595.  
  8596. Notes:
  8597.  
  8598.   ■ The format of the buffer controlling the exchange operation is the same
  8599.     as for Int 67H Function 57H Subfunction 00H.
  8600.  
  8601.   ■ An exchange of zero bytes is not an error. The maximum length of an
  8602.     exchange is 1 MB. If the length exceeds a single expanded memory page,
  8603.     consecutive expanded memory pages (as many as are required) supply or
  8604.     receive the data.
  8605.  
  8606.   ■ If the source and destination addresses overlap, the exchange is not
  8607.     performed and an error is returned.
  8608.  
  8609.  
  8610. ────────────────────────────────────────────────────────────────────────────
  8611. Int 67H                                                            [EMS 4.0]
  8612. Function 58H (88) Subfunction 00H
  8613. Get addresses of mappable pages
  8614. ────────────────────────────────────────────────────────────────────────────
  8615.  
  8616.   Returns the segment base address and physical page number for each
  8617.   mappable page in the system.
  8618.  
  8619. Call with:
  8620.  
  8621.   AH            = 58H
  8622.   AL            = 00H
  8623.   ES:DI         = segment:offset of buffer (see Notes)
  8624.  
  8625. Returns:
  8626.  
  8627.   If function successful
  8628.  
  8629.   AH            = 00H
  8630.   CX            = number of entries in mappable physical page array
  8631.  
  8632.   and page number/address information in buffer (see Notes)
  8633.  
  8634.   If function unsuccessful
  8635.  
  8636.   AH            = error code
  8637.  
  8638. Notes:
  8639.  
  8640.   ■ Upon return from the function, the buffer contains a series of
  8641.     double-word entries, one per mappable page. The first word of an entry
  8642.     contains the page's segment base address, and the second contains its
  8643.     physical page number. The entries are sorted in order of ascending
  8644.     segment addresses.
  8645.  
  8646.   ■ The size of the buffer required can be calculated with the information
  8647.     returned by Int 67H Function 58H Subfunction 01H.
  8648.  
  8649.  
  8650. ────────────────────────────────────────────────────────────────────────────
  8651. Int 67H                                                            [EMS 4.0]
  8652. Function 58H (88) Subfunction 01H
  8653. Get number of mappable pages
  8654. ────────────────────────────────────────────────────────────────────────────
  8655.  
  8656.   Returns the number of mappable physical pages.
  8657.  
  8658. Call with:
  8659.  
  8660.   AH            = 58H
  8661.   AL            = 01H
  8662.  
  8663. Returns:
  8664.  
  8665.   If function successful
  8666.  
  8667.   AH            = 00H
  8668.   CX            = number of mappable physical pages
  8669.  
  8670.   If function unsuccessful
  8671.  
  8672.   AH            = error code
  8673.  
  8674. Note:
  8675.  
  8676.   ■ The information returned by this function can be used to calculate the
  8677.     size of the buffer that will be needed by Int 67H Function 58H
  8678.     Subfunction 00H.
  8679.  
  8680.  
  8681. ────────────────────────────────────────────────────────────────────────────
  8682. Int 67H                                                            [EMS 4.0]
  8683. Function 59H (89) Subfunction 00H
  8684. Get hardware configuration
  8685. ────────────────────────────────────────────────────────────────────────────
  8686.  
  8687.   Returns information about the configuration of the expanded memory
  8688.   hardware.
  8689.  
  8690. Call with:
  8691.  
  8692.   AH            = 59H
  8693.   AL            = 00H
  8694.   ES:DI         = segment:offset of buffer (see Notes)
  8695.  
  8696. Returns:
  8697.  
  8698.   If function successful
  8699.  
  8700.   AH            = 00H
  8701.  
  8702.   and hardware configuration information in buffer.
  8703.  
  8704.   If function unsuccessful
  8705.  
  8706.   AH            = error code
  8707.  
  8708. Notes:
  8709.  
  8710.   ■ Upon return from the function, the buffer has been filled in with
  8711.     hardware configuration information in the following format:
  8712.  
  8713.     Offset        Length         Description
  8714.     ────────────────────────────────────────────────────────────────────────
  8715.     00H           2              size of raw expanded memory pages (in
  8716.                                  paragraphs)
  8717.     02H           2              number of alternate register sets
  8718.     04H           2              size of mapping-context save area (in
  8719.                                  bytes)
  8720.     06H           2              number of register sets that can be
  8721.                                  assigned to DMA channels
  8722.     08H           2              DMA operation type (0 = DMA may be used
  8723.                                  with alternate register sets; 1 = only one
  8724.                                  DMA register set available)
  8725.     ────────────────────────────────────────────────────────────────────────
  8726.  
  8727.   ■ The size returned for the mapping-context save area is the same as the
  8728.     size returned by Int 67H Function 4EH Subfunction 03H.
  8729.  
  8730.   ■ This function is intended for use by operating systems only and can be
  8731.     disabled by the operating system at any time.
  8732.  
  8733.  
  8734. ────────────────────────────────────────────────────────────────────────────
  8735. Int 67H                                                            [EMS 4.0]
  8736. Function 59H (89) Subfunction 01H
  8737. Get number of raw pages
  8738. ────────────────────────────────────────────────────────────────────────────
  8739.  
  8740.   Obtains the total number of raw expanded memory pages present in the
  8741.   system and the number of raw pages that are not already allocated. Raw
  8742.   memory pages may have a size other than 16 KB.
  8743.  
  8744. Call with:
  8745.  
  8746.   AH            = 59H
  8747.   AL            = 01H
  8748.  
  8749. Returns:
  8750.  
  8751.   If function successful
  8752.  
  8753.   AH            = 00H
  8754.   BX            = unallocated raw pages
  8755.   DX            = total raw pages
  8756.  
  8757.   If function unsuccessful
  8758.  
  8759.   AH            = error code
  8760.  
  8761. Note:
  8762.  
  8763.   ■ If the Expanded Memory Manager supports only pages of standard size, the
  8764.     values returned by this function are the same as those returned by Int
  8765.     67H Function 42H.
  8766.  
  8767.  
  8768. ────────────────────────────────────────────────────────────────────────────
  8769. Int 67H                                                            [EMS 4.0]
  8770. Function 5AH (90) Subfunction 00H
  8771. Allocate handle and standard pages
  8772. ────────────────────────────────────────────────────────────────────────────
  8773.  
  8774.   Allocates an EMM handle and associates standard (16 KB) expanded memory
  8775.   pages with that handle.
  8776.  
  8777. Call with:
  8778.  
  8779.   AH            = 5AH
  8780.   AL            = 00H
  8781.   BX            = number of standard pages to allocate
  8782.  
  8783. Returns:
  8784.  
  8785.   If function successful
  8786.  
  8787.   AH            = 00H
  8788.   DX            = EMM handle
  8789.  
  8790.   If function unsuccessful
  8791.  
  8792.   AH            = error code
  8793.  
  8794. Note:
  8795.  
  8796.   ■ Unlike Int 67H Function 43H, allocating zero pages with this function
  8797.     is not an error.
  8798.  
  8799.  
  8800. ────────────────────────────────────────────────────────────────────────────
  8801. Int 67H                                                            [EMS 4.0]
  8802. Function 5AH (90) Subfunction 01H
  8803. Allocate handle and raw pages
  8804. ────────────────────────────────────────────────────────────────────────────
  8805.  
  8806.   Allocates a raw EMM handle and associates raw expanded memory pages with
  8807.   that handle.
  8808.  
  8809. Call with:
  8810.  
  8811.   AH            = 5AH
  8812.   AL            = 01H
  8813.   BX            = number of raw pages to allocate
  8814.  
  8815. Returns:
  8816.  
  8817.   If function successful
  8818.  
  8819.   AH            = 00H
  8820.   DX            = handle for raw EMM pages
  8821.  
  8822.   If function unsuccessful
  8823.  
  8824.   AH            = error code
  8825.  
  8826. Notes:
  8827.  
  8828.   ■ Raw memory pages may have a size other than 16 KB.
  8829.  
  8830.   ■ Allocation of zero pages is not an error.
  8831.  
  8832.  
  8833. ────────────────────────────────────────────────────────────────────────────
  8834. Int 67H                                                            [EMS 4.0]
  8835. Function 5BH (91) Subfunction 00H
  8836. Get alternate map registers
  8837. ────────────────────────────────────────────────────────────────────────────
  8838.  
  8839.   Returns the number of the active alternate register set or, if no
  8840.   alternate set is active, saves the state of the mapping registers into a
  8841.   buffer and returns its address.
  8842.  
  8843. Call with:
  8844.  
  8845.   AH            = 5BH
  8846.   AL            = 00H
  8847.  
  8848. Returns:
  8849.  
  8850.   If function successful and alternate map register set active
  8851.  
  8852.   AH            = 00H
  8853.   BL            = current active alternate map register set
  8854.  
  8855.   If function successful and alternate map register set not active
  8856.  
  8857.   AH            = 00H
  8858.   BL            = 00H
  8859.   ES:DI         = segment:offset of alternate map register save area
  8860.                   (if BL = 0)
  8861.  
  8862.   If function unsuccessful
  8863.  
  8864.   AH            = error code
  8865.  
  8866. Notes:
  8867.  
  8868.   ■ The address of the save area must have been specified in a previous call
  8869.     to Int 67H Function 5BH Subfunction 01H, and the save area must have
  8870.     been initialized by a previous call to Int 67H Function 4EH Subfunction
  8871.     00H. If there was no previous call to Int 67H Function 5BH Subfunction
  8872.     01H, the address returned is zero, and the registers are not saved.
  8873.  
  8874.   ■ This function is intended for use by operating systems only and can be
  8875.     disabled by the operating system at any time.
  8876.  
  8877.  
  8878. ────────────────────────────────────────────────────────────────────────────
  8879. Int 67H                                                            [EMS 4.0]
  8880. Function 5BH (91) Subfunction 01H
  8881. Set alternate map registers
  8882. ────────────────────────────────────────────────────────────────────────────
  8883.  
  8884.   Selects an alternate map register set or (if alternate sets are not
  8885.   supported) restores the mapping context from the specified buffer.
  8886.  
  8887. Call with:
  8888.  
  8889.   AH            = 5BH
  8890.   AL            = 01H
  8891.   BL            = alternate register set number or 00H
  8892.   ES:DI         = segment:offset of map register context restore area
  8893.                   (if BL = 0)
  8894.  
  8895. Returns:
  8896.  
  8897.   If function successful
  8898.  
  8899.   AH            = 00H
  8900.  
  8901.   If function unsuccessful
  8902.  
  8903.   AH            = error code
  8904.  
  8905. Notes:
  8906.  
  8907.   ■ The buffer address specified in this call is returned by subsequent
  8908.     calls to Int 67H Function 5BH Subfunction 00H with BL = 00H.
  8909.  
  8910.   ■ The save area must have been initialized by a previous call to Int 67H
  8911.     Function 4EH Subfunction 00H.
  8912.  
  8913.   ■ This function is intended for use by operating systems only and can be
  8914.     disabled by the operating system at any time.
  8915.  
  8916.  
  8917. ────────────────────────────────────────────────────────────────────────────
  8918. Int 67H                                                            [EMS 4.0]
  8919. Function 5BH (91) Subfunction 02H
  8920. Get size of alternate map register save area
  8921. ────────────────────────────────────────────────────────────────────────────
  8922.  
  8923.   Returns the amount of storage needed by Int 67H Function 5BH Subfunctions
  8924.   00H and 01H.
  8925.  
  8926. Call with:
  8927.  
  8928.   AH            = 5BH
  8929.   AL            = 02H
  8930.  
  8931. Returns:
  8932.  
  8933.   If function successful
  8934.  
  8935.   AH            = 00H
  8936.   DX            = size of buffer (bytes)
  8937.  
  8938.   If function unsuccessful
  8939.  
  8940.   AH            = error code
  8941.  
  8942. Note:
  8943.  
  8944.   ■ This function is intended for use by operating systems only and can be
  8945.     disabled by the operating system at any time.
  8946.  
  8947.  
  8948. ────────────────────────────────────────────────────────────────────────────
  8949. Int 67H                                                            [EMS 4.0]
  8950. Function 5BH (91) Subfunction 03H
  8951. Allocate alternate map register set
  8952. ────────────────────────────────────────────────────────────────────────────
  8953.  
  8954.   Allocates an alternate map register set for use with Int 67H Function 5BH
  8955.   Subfunctions 00H and 01H. The contents of the currently active map
  8956.   registers are copied into the newly allocated alternate map registers in
  8957.   order to provide an initial context when they are selected.
  8958.  
  8959. Call with:
  8960.  
  8961.   AH            = 5BH
  8962.   AL            = 03H
  8963.  
  8964. Returns:
  8965.  
  8966.   If function successful
  8967.  
  8968.   AH            = 00H
  8969.   BL            = alternate map register set number or zero, if no alternate
  8970.                   sets are available
  8971.  
  8972.   If function unsuccessful
  8973.  
  8974.   AH            = error code
  8975.  
  8976. Note:
  8977.  
  8978.   ■ This function is intended for use by operating systems only and can be
  8979.     disabled by the operating system at any time.
  8980.  
  8981.  
  8982. ────────────────────────────────────────────────────────────────────────────
  8983. Int 67H                                                            [EMS 4.0]
  8984. Function 5BH (91) Subfunction 04H
  8985. Deallocate alternate map register set
  8986. ────────────────────────────────────────────────────────────────────────────
  8987.  
  8988.   Releases an alternate map register set that was previously allocated with
  8989.   Int 67H Function 5BH Subfunction 03H.
  8990.  
  8991. Call with:
  8992.  
  8993.   AH            = 5BH
  8994.   AL            = 04H
  8995.   BL            = alternate register set number
  8996.  
  8997. Returns:
  8998.  
  8999.   If function successful
  9000.  
  9001.   AH            = 00H
  9002.  
  9003.   If function unsuccessful
  9004.  
  9005.   AH            = error code
  9006.  
  9007. Notes:
  9008.  
  9009.   ■ The current alternate map register set cannot be deallocated.
  9010.  
  9011.   ■ This function is intended for use by operating systems only and can be
  9012.     disabled by the operating system at any time.
  9013.  
  9014.  
  9015. ────────────────────────────────────────────────────────────────────────────
  9016. Int 67H                                                            [EMS 4.0]
  9017. Function 5BH (91) Subfunction 05H
  9018. Allocate DMA register set
  9019. ────────────────────────────────────────────────────────────────────────────
  9020.  
  9021.   Allocates a DMA register set.
  9022.  
  9023. Call with:
  9024.  
  9025.   AH            = 5BH
  9026.   AL            = 05H
  9027.  
  9028. Returns:
  9029.  
  9030.   If function successful
  9031.  
  9032.   AH            = 00H
  9033.   BL            = DMA register set number (0 = none available)
  9034.  
  9035.   If function unsuccessful
  9036.  
  9037.   AH            = error code
  9038.  
  9039. Note:
  9040.  
  9041.   ■ This function is intended for use by operating systems only and can be
  9042.     disabled by the operating system at any time.
  9043.  
  9044.  
  9045. ────────────────────────────────────────────────────────────────────────────
  9046. Int 67H                                                            [EMS 4.0]
  9047. Function 5BH (91) Subfunction 06H
  9048. Enable DMA on alternate map register set
  9049. ────────────────────────────────────────────────────────────────────────────
  9050.  
  9051.   Associates a DMA channel with an alternate map register set.
  9052.  
  9053. Call with:
  9054.  
  9055.   AH            = 5BH
  9056.   AL            = 06H
  9057.   BL            = alternate map register set
  9058.   DL            = DMA channel number
  9059.  
  9060. Returns:
  9061.  
  9062.   If function successful
  9063.  
  9064.   AH            = 00H
  9065.  
  9066.   If function unsuccessful
  9067.  
  9068.   AH            = error code
  9069.  
  9070. Notes:
  9071.  
  9072.   ■ If a DMA channel is not assigned to a specific register set, DMA for
  9073.     that channel will be mapped through the current register set.
  9074.  
  9075.   ■ If zero is specified as the alternate map register set, no special
  9076.     action is taken on DMA accesses for the specified DMA channel.
  9077.  
  9078.   ■ This function is intended for use by operating systems only and can be
  9079.     disabled by the operating system at any time.
  9080.  
  9081.  
  9082. ────────────────────────────────────────────────────────────────────────────
  9083. Int 67H                                                            [EMS 4.0]
  9084. Function 5BH (91) Subfunction 07H
  9085. Disable DMA on alternate map register set
  9086. ────────────────────────────────────────────────────────────────────────────
  9087.  
  9088.   Disables DMA accesses for all DMA channels associated with a specific
  9089.   alternate map register set.
  9090.  
  9091. Call with:
  9092.  
  9093.   AH            = 5BH
  9094.   AL            = 07H
  9095.   BL            = alternate register set number
  9096.  
  9097. Returns:
  9098.  
  9099.   If function successful
  9100.  
  9101.   AH            = 00H
  9102.  
  9103.   If function unsuccessful
  9104.  
  9105.   AH            = error code
  9106.  
  9107. Note:
  9108.  
  9109.   ■ This function is intended for use by operating systems only and can be
  9110.     disabled by the operating system at any time.
  9111.  
  9112.  
  9113. ────────────────────────────────────────────────────────────────────────────
  9114. Int 67H                                                            [EMS 4.0]
  9115. Function 5BH (91) Subfunction 08H
  9116. Deallocate DMA register set
  9117. ────────────────────────────────────────────────────────────────────────────
  9118.  
  9119.   Deallocates a DMA register set that was previously allocated with Int 67H
  9120.   Function 5BH Subfunction 05H.
  9121.  
  9122. Call with:
  9123.  
  9124.   AH            = 5BH
  9125.   AL            = 08H
  9126.   BL            = DMA register set number
  9127.  
  9128. Returns:
  9129.  
  9130.   If function successful
  9131.  
  9132.   AH            = 00H
  9133.  
  9134.   If function unsuccessful
  9135.  
  9136.   AH            = error code
  9137.  
  9138. Note:
  9139.  
  9140.   ■ This function is intended for use by operating systems only and can be
  9141.     disabled by the operating system at any time.
  9142.  
  9143.  
  9144. ────────────────────────────────────────────────────────────────────────────
  9145. Int 67H                                                            [EMS 4.0]
  9146. Function 5CH (92)
  9147. Prepare Expanded Memory Manager for warm boot
  9148. ────────────────────────────────────────────────────────────────────────────
  9149.  
  9150.   Prepares the expanded memory hardware for an impending warm boot. This
  9151.   function affects the current mapping context, the alternate register set
  9152.   in use, and any other expanded memory hardware dependencies that would
  9153.   ordinarily be initialized at system boot time.
  9154.  
  9155. Call with:
  9156.  
  9157.   AH            = 5CH
  9158.  
  9159. Returns:
  9160.  
  9161.   If function successful
  9162.  
  9163.   AH            = 00H
  9164.  
  9165.   If function unsuccessful
  9166.  
  9167.   AH            = error code
  9168.  
  9169. Note:
  9170.  
  9171.   ■ If an application maps expanded memory at addresses below 640 KB, the
  9172.     application must trap all possible conditions that might lead to a warm
  9173.     boot, so that this function can be called first.
  9174.  
  9175.  
  9176. ────────────────────────────────────────────────────────────────────────────
  9177. Int 67H                                                            [EMS 4.0]
  9178. Function 5DH (93) Subfunction 00H
  9179. Enable EMM operating-system functions
  9180. ────────────────────────────────────────────────────────────────────────────
  9181.  
  9182.   Enables the operating-system─specific EMM functions (Int 67H Functions
  9183.   59H, 5BH, and 5DH) for calls by any program or device driver. (This is
  9184.   the default condition.)
  9185.  
  9186. Call with:
  9187.  
  9188.   AH            = 5DH
  9189.   AL            = 00H
  9190.   BX:CX         = access key (if not first call to function)
  9191.  
  9192. Returns:
  9193.  
  9194.   If function successful
  9195.  
  9196.   AH            = 00H
  9197.   BX:CX         = access key (if first call to function)
  9198.  
  9199.   If function unsuccessful
  9200.  
  9201.   AH            = error code
  9202.  
  9203. Notes:
  9204.  
  9205.   ■ An access key is returned in registers BX and CX on the first call to
  9206.     Int 67H Function 5DH Subfunction 00H or 01H. The access key is
  9207.     required for all subsequent calls to either function.
  9208.  
  9209.   ■ This function is intended for use by operating systems only.
  9210.  
  9211.  
  9212. ────────────────────────────────────────────────────────────────────────────
  9213. Int 67H                                                            [EMS 4.0]
  9214. Function 5DH (93) Subfunction 01H
  9215. Disable EMM operating-system functions
  9216. ────────────────────────────────────────────────────────────────────────────
  9217.  
  9218.   Disables the operating-system─specific EMM functions (Int 67H Functions
  9219.   59H, 5BH, and 5DH) for calls by application programs and device
  9220.   drivers, reserving the use of these functions for the operating system.
  9221.  
  9222. Call with:
  9223.  
  9224.   AH            = 5DH
  9225.   AL            = 01H
  9226.   BX:CX         = access key (if not first call to function)
  9227.  
  9228. Returns:
  9229.  
  9230.   If function successful
  9231.  
  9232.   AH            = 00H
  9233.   BX:CX         = access key (if first call to function)
  9234.  
  9235.   If function unsuccessful
  9236.  
  9237.   AH            = error code
  9238.  
  9239. Notes:
  9240.  
  9241.   ■ An access key is returned in registers BX and CX on the first call to
  9242.     Int 67H Function 5DH Subfunction 00H or 01H. The access key is
  9243.     required for all subsequent calls to either function.
  9244.  
  9245.   ■ This function is intended for use by operating systems only.
  9246.  
  9247.  
  9248. ────────────────────────────────────────────────────────────────────────────
  9249. Int 67H                                                            [EMS 4.0]
  9250. Function 5DH (93) Subfunction 02H
  9251. Release access key
  9252. ────────────────────────────────────────────────────────────────────────────
  9253.  
  9254.   Releases the access key obtained by a previous call to Int 67H Function
  9255.   5DH Subfunction 00H or 01H.
  9256.  
  9257. Call with:
  9258.  
  9259.   AH            = 5DH
  9260.   AL            = 02H
  9261.   BX:CX         = access key
  9262.  
  9263. Returns:
  9264.  
  9265.   If function successful
  9266.  
  9267.   AH            = 00H
  9268.  
  9269.   If function unsuccessful
  9270.  
  9271.   AH            = error code
  9272.  
  9273. Notes:
  9274.  
  9275.   ■ With respect to the operating-system─specific expanded memory functions,
  9276.     the EMM is returned to the state it had when the system was initialized.
  9277.     A new access key is returned by the next call to Int 67H Function 5DH
  9278.     Subfunction 00H or 01H.
  9279.  
  9280.   ■ This function is intended for use by operating systems only and can be
  9281.     disabled by the operating system at any time.
  9282.  
  9283.  
  9284.  
  9285. ────────────────────────────────────────────────────────────────────────────
  9286. Index
  9287.  
  9288.   References to tables and illustrations are in italics.
  9289.  
  9290.  
  9291. Special Characters
  9292.  
  9293. | 298-99
  9294. . 187
  9295. .. 187-88
  9296. ; 60
  9297. < 298-99
  9298. > 298-99
  9299. >> 298-99
  9300.  60
  9301.  
  9302. A
  9303. Absolute disk read 482-84
  9304. Absolute disk write 484-85
  9305. adapters, video display 86-87
  9306. alarm
  9307.    reset 592
  9308.    set 591-92
  9309. align type 38
  9310. Allocate alternate map register set (EMS) 641
  9311. Allocate DMA register set (EMS) 642
  9312. Allocate handle and pages (EMS) 617-18
  9313. Allocate handle and raw pages (EMS) 639
  9314. Allocate handle and standard pages (EMS) 638-39
  9315. Allocate memory block 438-39
  9316. ANSI.SYS device driver, screen control 91
  9317.    escape sequences used with 92-93
  9318. APPEND 490-91
  9319. application program interface (API) 320
  9320. application programs. See MS-DOS application programs, porting to OS/2;
  9321.      MS-DOS application programs, structure of; MS-DOS application programs,
  9322.      writing compatible
  9323. arena entries 196
  9324. arena headers 196, 201
  9325.    diagram example 202
  9326. ASCII escape code 92-93
  9327. ASCII mode 69
  9328.    character-device drivers in 261-62
  9329. ASCII text files 56
  9330. ASCIIZ strings 24, 139, 168
  9331. .ASM files 45. See also assembly-language programs
  9332. assembly-language programs 37-42
  9333.    to access file allocation table 191
  9334.    BREAK.ASM 75-78
  9335.    CLEAN.ASM 304-9
  9336.    DRIVER.ASM 283-91
  9337.    DUMP.ASM 152-61
  9338.    HELLO.COM example 27-30, 33-36
  9339.    program modules 37
  9340.    program procedures 41-42
  9341.    program segments 38-41
  9342.    PROTO.ASM 301-2
  9343.    SHELL.ASM program 229-38
  9344.    TALK.ASM 113-26
  9345.    ZERODIV.ASM 254, 255-58
  9346. ASSIGN 489
  9347. ASSUME statement 29, 33
  9348. attribute byte
  9349.    color text display 98
  9350.    monochrome text display 97
  9351. attribute word, device 264
  9352. Auxiliary device (AUX) 12, 106, 298. See also serial port
  9353. Auxiliary input 344-45
  9354. Auxiliary output 345-46
  9355.  
  9356. B
  9357. background, set 508-9
  9358. BACKUP command 15
  9359. .BAT (batch) files 15
  9360. Batch files 15
  9361. binary mode 69
  9362.    character-device drivers in 261-62
  9363.    output 93-94
  9364. BIOS module 12-13, 17
  9365.    get address of extended, 574
  9366. BIOS parameter block (BPB) 181, 189
  9367.    build 272
  9368.    structure 269
  9369. bit planes 101
  9370. blink/intensity bit, toggle 513
  9371. block-device drivers 260, 262
  9372.    check for remoteness 423-24
  9373.    check removability of 422-23
  9374.    generic I/O control of 429-32
  9375.    read control data from 418-19
  9376.    write control data to 419-20
  9377. Boot disk device (block device) 12
  9378. boot drive, get 392-93
  9379. boot sector, disk 179-82
  9380.    map of 180
  9381.    partial disassembly of 182
  9382.    partial hex dump 181
  9383. bootstrap routine 16, 17
  9384. border
  9385.    get color 514
  9386.    get palette and 514
  9387.    set 508-9
  9388.    set color 512
  9389. BREAK.ASM program 75-78
  9390. break flag, get or set 392-93
  9391. Buffered keyboard input 351-52
  9392. Build BIOS Parameter Block (function 02H) 272
  9393.  
  9394. C
  9395. CALL instructions 41
  9396. Cancel device redirection 467-68
  9397. cassette motor
  9398.    read 561
  9399.    turn off 560-61
  9400.    turn on 560
  9401.    write 562
  9402. .C files 45. See also C language
  9403. Change sharing retry count 425-26
  9404. character blocks, set specifier 520
  9405. character-device drivers 260, 261-62
  9406.    ASCII vs binary mode 261-62
  9407.    generic I/O control 426-29
  9408.    read control data from 415-16
  9409.    write control data to 416-17
  9410. character input/output. See also keyboard input; mouse, input; pointing
  9411.      device, input; printer output; serial port
  9412.    Int 21H 44H IOCTL (I/O control) 411-43
  9413.    Int 21H functions, summary 337-38 (table)
  9414.    processing typical I/O request 281-82
  9415. Character input with echo 343
  9416. Character input without echo 349-50
  9417. Character output 344
  9418. CHDIR (CD) command 167
  9419. Check if block device is remote 423-24
  9420. Check if block device is removable 422-23
  9421. Check if handle is remote 424-25
  9422. Check input status 353, 420-21
  9423. Check output status 421-22
  9424. child programs 218
  9425. CHKDSK command 15, 174, 222
  9426. C language
  9427.    CLEAN.C 309-11
  9428.    compiler (see C Optimizing Compiler)
  9429.    DUMP.C program 151, 161-63
  9430.    linking Ctrl-C and Ctrl-Break handlers to programs in 75-80
  9431.    MOUDEMO.C 82-83
  9432.    polling mouse and displaying mouse coordinates 82-83
  9433.    PROTO.C 303
  9434.    SHELL.C 225-29
  9435.    TRYBREAK 78-79
  9436.    tutorials 63
  9437. class type 38
  9438. CLEAN filter 303-11
  9439.    assembly source code 304-9
  9440.    C source code 309-11
  9441. clock, set tick count 589-90
  9442. CLOCK driver 282
  9443. Close file 357-58, 404-5
  9444. code page, get or set 474-75
  9445. code segment 38
  9446. code segment (CS) register 30
  9447. Color/Graphics Adapter (CGA) 86, 98, 102
  9448. color page state
  9449.    get 517
  9450.    set 515-16
  9451. color register(s)
  9452.    get 516
  9453.    get block of 516-17
  9454.    set 514-15
  9455.    set block of 515
  9456. COM1, COM2, COM3 devices 106, 110-12, 298
  9457. combine type 38
  9458. command code routines, device-driver 267-81
  9459.    function 00H, Driver initialization 268-69
  9460.    function 01H, Media Check 270-71
  9461.    function 02H, Build BIOS Parameter Block (BPB) 272
  9462.    function 03H, I/O-Control Read 272-73
  9463.    function 04H, Read 273
  9464.    function 05H, Nondestructive Read 274
  9465.    function 06H, Input Status 274
  9466.    function 07H, Flush Input Buffers 274-75
  9467.    function 08H, Write 275
  9468.    function 09H, Write with Verify 276
  9469.    function 0AH, Output Status 276
  9470.    function 0BH, Flush Output Buffers 276
  9471.    function 0CH, I/O-Control Write 276-77
  9472.    function 0DH, Device Open 277
  9473.    function 0EH, Device Close 277-78
  9474.    function 0FH, Removable Media 278
  9475.    function 10H, Output Until Busy 278-79
  9476.    function 13H, Generic IOCTL 279-80
  9477.    function 17H, Get Logical Device 280
  9478.    function 18H, Set Logical Device 280-81
  9479.    names of, and MS-DOS version support 267-68 (table)
  9480. COMMAND.COM file 14-16
  9481.    load 20
  9482.    replacing 13
  9483.    use of EXEC function 218
  9484. COMMAND.COM PLUS 13
  9485. command processor (shell) 13. See also COMMAND.COM file
  9486. commands, types of, accepted by COMMAND.COM 14-15
  9487. command tail 24, 220-21
  9488. Commit file 476-77
  9489. compatibility and portability 313-31
  9490.    degrees of compatibility 314-18
  9491.       MS-DOS applications 315-17
  9492.       ROM BIOS and hardware-compatible applications 317-18
  9493.    OS/2 compatibility 318-31
  9494. .COM program file(s) 15, 22, 25-30, 45
  9495.    assembly-language program transformed into 27-30
  9496.    vs .EXE files 22, 36 (table)
  9497.    memory allocation for 197-98
  9498.    memory image of a typical 26
  9499. CONFIG.SYS file 12
  9500.    installing device driver 293
  9501.    opening 18-19
  9502. configuration
  9503.    get equipment 535-36
  9504.    get information 525
  9505.    get system environment 573-74
  9506. console, direct input/output 347-48. See also video display
  9507. Console display and keyboard (CON) 12, 298-99
  9508. control data
  9509.    read, from block-device driver 418-19
  9510.    read, from character-device driver 415-16
  9511.    write, to block-device driver 419-20
  9512.    write, to character-device driver 416-17
  9513. Controller drive diagnostic 551
  9514. Controller internal diagnostic 551
  9515. Controller RAM diagnostic 550
  9516. cooked mode 69
  9517. C Optimizing Compiler 44, 48-50
  9518.    environmental variables 48
  9519.    version 5.1 switches 49-50
  9520. COPY command 14, 58
  9521. Country information
  9522.    get extended 470-74
  9523.    get or set 395-98
  9524. CP/M operating system 4, 5
  9525.    FCB compatibility with 129, 130-31
  9526.    program segment prefix compatibility with 24, 25
  9527. Create directory 398-99
  9528. Create file 364-65, 401-2
  9529. Create new file 458-59
  9530. Create new PSP 378-79
  9531. Create temporary file 457-58
  9532. CREF utility 44, 56-58
  9533.    cross-reference listing for HELLO.REF 57
  9534. .CRF files 45, 56
  9535. Critical-error handler address 481-82
  9536. critical-error handlers 24, 145, 147-51
  9537.    address 481-82
  9538.    skeleton program example 150-51
  9539.    stack at entry to 148, 149
  9540. cross-reference listing. See CREF utility
  9541. Ctrl-Break and Ctrl-C handlers 72-80
  9542.    compatibility issues 317
  9543.    Ctrl-C handler address 480-81
  9544.    high-level languages and 75-80
  9545. cursor
  9546.    addressing 97
  9547.    enable/disable emulation 528
  9548.    get position 502-3
  9549.    read character and attribute at 506
  9550.    set position 501-2
  9551.    set type 501
  9552.    write character and attribute at 506-7
  9553.    write character at 507-8
  9554.  
  9555. D
  9556. data segment 38
  9557. data segment (DS) register 31, 35
  9558. Date and time device (CLOCK$) 12
  9559. day count
  9560.    get 592-93
  9561.    set 593
  9562. Deallocate alternate map register set (EMS) 642
  9563. Deallocate DMA register set (EMS) 644
  9564. .DEF files 45
  9565. Delay 568-69
  9566. DEL(ETE) command 14
  9567. Delete directory 399
  9568. Delete file 361-62, 40, sug>8
  9569. dependency statements 61
  9570. descriptors, memory segment 321
  9571. device
  9572.    cancel redirection 467-68
  9573.    close 565
  9574.    get device information 412-13
  9575.    open 564-65
  9576.    post 572-73
  9577.    read file or 405-6
  9578.    redirect 466-67
  9579.    set device information 414-15
  9580.    wait 571
  9581.    write file or 406-7
  9582. Device Close (command code function 0EH) 277-78
  9583. Device close (MS-DOS function) 565
  9584. DEVICE commands 12
  9585. device drivers, installable 12-13, 259-96
  9586.    CLOCK driver 282
  9587.    command-code routines 267-81
  9588.    debugging 295-96
  9589.    chain before/after driver installation 294
  9590.    chain listing 295
  9591.    device attribute word 264
  9592.    error codes 267
  9593.    MS-DOS type 260-63
  9594.    processing of typical input/output requests 281-82
  9595.    structure of MS-DOS 263-67
  9596.       device header 263-64
  9597.       interrupt routine 26-67
  9598.       strategy routine 265
  9599.    writing and installing 282-95
  9600.       assembly 283-92
  9601.       installation 293-95
  9602.       linking 293
  9603. device drivers, resident 12-13
  9604. Device Open (command-code function 0DH) 277
  9605. Device open (MS-DOS function) 564-65
  9606. Device post 572-73
  9607. Device wait 571-72
  9608. Digital Research 4
  9609. DIR command 14, 167, 174
  9610. Direct console I/O 347-48
  9611. directory 166, 167-73
  9612.    create 398-99
  9613.    delete 399
  9614.    format of a single entry in a disk 184, 185
  9615.    functions controlling 167-68 get current 437-38
  9616.    hierarchical (tree) structure 166, 167
  9617.    moving files 173
  9618.    root 184-86
  9619.    searching 168-73
  9620.    set current 400
  9621. directory operations, Int 21H functions summary 339
  9622. Disable DMA on alternate map register set (EMS) 643-44
  9623. Disable EMM operating system functions (EMS) 645-46
  9624. Disable mouse driver 608-9
  9625. disk(s) 177-94. See also drive, logical; ESDI Fixed Disk Drive Adapter
  9626.    absolute read 482-84
  9627.    absolute write 484-85
  9628.    boot sector 179-82
  9629.    controller drive diagnostic 551
  9630.    controller internal diagnostic 551
  9631.    controller RAM diagnostic 550
  9632.    file allocation table 182-84
  9633.       interpreting the 188-92
  9634.    files area 186-88
  9635.    fixed-disk partitions 192-94
  9636.    format 543
  9637.    format bad track 542
  9638.    format track 541-42
  9639.    get change status 552-53
  9640.    get current 367
  9641.    get default drive data 368-69
  9642.    get drive allocation information 394-95
  9643.    get drive data 370
  9644.    get drive parameters 543-44
  9645.    get drive status 549
  9646.    get type 552
  9647.    initialize fixed disk characteristics 544-45
  9648.    map of typical logical volume 179
  9649.    park heads 554-55
  9650.    read sector 538-39
  9651.    read sector buffer 548
  9652.    read sector long 545-46
  9653.    recalibrate 550
  9654.    reserved area 182
  9655.    reset 354-55
  9656.    reset fixed disk system 548
  9657.    root directory 184-86, 187
  9658.    seek 547
  9659.    select 355-56
  9660.    set media type 554
  9661.    set type 553
  9662.    set verify flag 387-88
  9663.    verify sector 540
  9664.    write sector 539-40
  9665.    write sector buffer 549
  9666.    write sector long 546-47
  9667. disk bootstrap routine 16
  9668.    memory location of 17
  9669. disk management, Int 21H functions summary 339
  9670. disk-related errors 147, 148 (table)
  9671. Disk reset 354-55
  9672. disk system
  9673.    get status 537-38
  9674.    reset 536-37
  9675. disk transfer area (DTA) 25, 130
  9676.    get 388-89
  9677.    set 368
  9678. display page, set 503-4
  9679. Display string 350-51
  9680. DOS kernel 12, 18
  9681.    memory location of 19
  9682. double-byte character sets (DBCS), get lead byte table 469-70
  9683. drive, logical 166, 16,-73. See also disk(s)
  9684.    get map 433
  9685.    set map 434
  9686.    vs volume 174
  9687. driver. See device drivers, installable; device drivers, resident
  9688. DRIVER.ASM program 283-91
  9689. Driver Initialization (function 00H) 268-69
  9690. DUMP.ASM program 151, 152-61
  9691.    subroutines 163
  9692. DUMP.C program 151, 161-63
  9693. Duplicate handle 435
  9694. dynamic link library 331
  9695. dynamic memory allocation 199, 200, 201
  9696.  
  9697. E
  9698. echo
  9699.    character input with 343
  9700.    character input without 349-50
  9701.    unfiltered character input without 348-49
  9702. EMS. See Expanded Memory Specification (EMS)
  9703. Enable/disable cursor emulation 528
  9704. Enable/disable default palette loading 526-27
  9705. Enable/disable gray-scale summing 527
  9706. Enable/disable pointing device 574-75
  9707. Enable/disable screen refresh 529
  9708. Enable/disable video 527
  9709. Enable DMA on alternate map register set (EMS) 643
  9710. Enable EMM operating system functions (EMS) 645
  9711. Enable mouse driver 609
  9712. encapsulation of subroutines 323, 324-25
  9713. end of interrupt (EOI) 250
  9714. ENDP command 35, 41
  9715. ENDS command 29, 38
  9716. END statement 30-31, 36, 41
  9717. Enhanced Graphics Adapter (EGA) 86, 97, 98, 102
  9718. Enter protected mode 570-71
  9719. environment block 24, 220, 224-25
  9720.    dump of a typical 224
  9721.    three strings contained in 225
  9722. EQU statement 33
  9723. error codes, device driver 267
  9724. error codes, MS-DOS 145-51
  9725.    critical 145, 147-51
  9726.    expanded memory 207-9
  9727. error information, get/set 453-56
  9728. escape sequences, ANSI 92-93
  9729. ESDI Fixed Disk Drive Adapter (EP>
  9730.    format drive 555
  9731.    format periodic interrupt 562-63
  9732. Event wait 566-67
  9733. Exchange memory regions (EMS) 635-36
  9734. EXE2BIN utility 44, 55-56
  9735. EXEC function 15, 217-42. See also Int 21H Function 4BH
  9736.    calling convention 222
  9737.    compatibility in MS-DOS applications 317
  9738.    environment block 220, 224-25
  9739.    example programs SHELL.C and SHELL.ASM 225-40
  9740.       basic flow of both 239-40
  9741.       internal commands in 239
  9742.    example use of 223-24
  9743.    loading overlays with 240, 241-42
  9744.    making memory availinug for 218-19
  9745.    reference 441-42
  9746.    requesting 219-21
  9747.    returning from 221-24
  9748. .EXE (executable) program file(s) 15, 22, 30-36, 45
  9749.    assembly language program transformed into 33-36
  9750.    vs .COM files 22, 36 (table)
  9751.    converting, to .COM files (see EXE2BIN utility)
  9752.    header 30
  9753.    load module contents 33 load module format 32
  9754.    memory allocation for 198
  9755.    memory image of 31
  9756.    use for compatible MS-DOS applications 315
  9757. Expanded Memory Manager (EMM) 203-4
  9758.    checking for 204, 205-6
  9759.    enable/disable system functions 645-46
  9760.    error codes 207-9
  9761. Expanded Memory Specification (EMS) 201-11
  9762.    checking for expanded memory 204-6
  9763.    expanded memory defined 203-4
  9764.    functions reference (see Section IV)
  9765.       summary 614-15
  9766.    use of expanded memory 20,-11
  9767.       skeleton program illustrating 210-11
  9768. Extended communications port control 559-60
  9769. extended file control block 131
  9770.    volume-label search using 175
  9771. Extended initialize communications port 558-59
  9772. extended memory 204, 212-15
  9773.    moving blocks of data between conventional memory and 213-15
  9774. Extended open file 478-80
  9775. external (extrinsic) commands 15
  9776. external hardware interrupts 247
  9777. extra segment (ES) register 31
  9778.  
  9779. F
  9780. FAR attribute 35
  9781.    vs NEAR 29
  9782. faults (internal hardware interrupts) 246, 321
  9783. file(s)
  9784.    area, in disks 186-88
  9785.    close 357-58, 404
  9786.    commit 476-77
  9787.    create 364-65, 401-2
  9788.    create new 458-59
  9789.    create temporary 457-58
  9790.    delete 361-62, 407-8
  9791.    extended open 478-80
  9792.    find first 358-59, 445-46
  9793.    find next 360-61, 446-47
  9794.    get file size 375-76
  9795.    get/set date and time 450-51
  9796.    lock/unlock file region 460-61
  9797.    logical drive 166
  9798.    moving 123
  9799.    name and location 166
  9800.    open 356-57, 402-4
  9801.    read 405-6
  9802.    rename 366, 449-50
  9803.    types 45
  9804.    write 406-7
  9805. file-access skeleton program
  9806.    using FCB functions 134, 135-37
  9807.    using handle functions 141, 142-43
  9808. file allocation table (FAT) 16, 182-84
  9809.    assembly program to access 191
  9810.    contents 183
  9811.    interpreting 188-92
  9812.    media descriptor bytes 183
  9813. file attributes, get or set 410-11
  9814. file control blocks (FCBs) 25, 128
  9815.    default 130, 221
  9816.    directory searching with 169, 170-71
  9817.    extended 131, 133-34, 175
  9818.    file management with FCB functions 129-39
  9819.       advantages/disadvantages 138-39
  9820.       file-access skeleton program 134-38
  9821.       functions listed 132
  9822.       vs handle functions 128
  9823.    normal 129, 133-34
  9824.    before/after open call (Int 21H Function 0FH) 137
  9825.    restricted use 316, 319
  9826.    typical operation of 130
  9827. file management 127-63
  9828.    example programs DUMP.ASM and DUMP.C 151-63
  9829.    FCB functions 128, 129-39
  9830.    handle functions 128, 139-44
  9831.    MS-DOS ─rror codes 145-51
  9832. filename
  9833.    fully qualified 16
  9834.    parse 382-83
  9835.    requesting EXEC function 219
  9836. file operations, Int 21H functions summary 338
  9837. file pointer, set 408-9
  9838. file system 166
  9839.    structure 167
  9840. filters 297-311
  9841.    building 300-303
  9842.    CLEAN filter 303-11
  9843.    operation of 299-300
  9844.    prototype 301-3
  9845.    system support for 298-99
  9846. Find first file 358-59, 445-46
  9847. Find next file 360-61, 44-47
  9848. fixed-disk partitions 192-94
  9849. font functions 518-24
  9850. Format bad track 542
  9851. Format drive 543
  9852. Format ESDI drive 555-56
  9853. Format ESDI drive periodic interrupt 562-63
  9854. Format track 541-42
  9855. Flush input buffer and then input 353-54
  9856. Flush Input Buffers (function 07H) 274-75
  9857. Flush Output Buffers (function 0BH) 276
  9858.  
  9859. G
  9860. Generic I/O control for block devices 429-32
  9861. Generic I/O control for character devices 426-29
  9862. Generic IOCTL (function 13H) 279-80
  9863. Get addresses of mappable pages (EMS) 636
  9864. Get address of alternate mouse event handler 606
  9865. Get address of extended BIOS data area 574
  9866. Get all handle names (EMS) 631
  9867. Get alternate map registers (EMS) 639-40
  9868. Get attribute capability (EMS) 630
  9869. Get block of color registers 516-17
  9870. Get border color 514
  9871. Get button press information 596
  9872. Get button release information 597
  9873. Get color page state 517
  9874. Get color register 516
  9875. Get communications port status 558
  9876. Get configuration information 525
  9877. Get conventional memory size 536
  9878. Get current directory 437-38
  9879. Get current disk 367
  9880. Get cursor position 502-3
  9881. Get date 384-85, 591
  9882. Get day count 592
  9883. Get DBCS lead byte table 469-70
  9884. Get default drive data 368-69
  9885. Get device inform~on 412-13
  9886. Get disk change status 552-53
  9887. Get disk system status 537-38
  9888. Get disk type 552
  9889. Get drive allocation information 394-95
  9890. Get drive data 370-71
  9891. Get drive parameters 543-44
  9892. Get drive status 549
  9893. Get DTA address 388-89
  9894. Get enhanced keyboard flags 586-87
  9895. Get equipment configuration 535-36
  9896. Get extended country information 470-74
  9897. Get extended error information 453-56
  9898. Get extended memory size 570
  9899. Get file size 375-76
  9900. Get font information 524
  9901. Get functionality/state information 531-34
  9902. Get handle attribute (EMS) 629
  9903. Get handle count (EMS) 621-22
  9904. Get handle name (EMS) 630
  9905. Get handle pages (EMS) 622
  9906. Get hardware configuration (EMS) 637-38
  9907. Get interrupt vector 393-94
  9908. Get keyboard flags 582
  9909. Get keyboard status 582
  9910. Get language number 610
  9911. Get light pen position 503
  9912. Get Logical Device (command-code function) 280
  9913. Get logical drive map 433
  9914. Get machine name 461-62
  9915. Get mouse information 611
  9916. Get mouse position and button status 595
  9917. Get mouse save state buffer size 603
  9918. Get mouse sensitivity 607
  9919. Get MS-DOS version number 389-90
  9920. Get number of mappable pages (EMS) 637
  9921. Get number of pages (EMS) 617
  9922. Get number of raw pages (EMS) 638
  9923. Get or set allocation strategy 452-53
  9924. Get or set break flag, get boot drive 392-93
  9925. Get or set code page 474-75
  9926. Get or set country information 395-98
  9927. Get or set display combination code 530-31
  9928. Get or set file Attributes 410-11
  9929. Get or set file date and time 450-51
  9930. Get page frame address (EMS) 616
  9931. Get pages for all handles (EMS) 623
  9932. Get palette and border 514
  9933. Get palette register 513
  9934. Get pointer page 608
  9935. Get pointing device type 577
  9936. Get printer setup string 463-64
  9937. Get printer status 588
  9938. Get PSP address 468-69
  9939. Get redirection list entry 464-65
  9940. Get return code 444-45
  9941. Get size of alternate map register save area (EMS) 641
  9942. Get size of page map information (EMS) 625
  9943. Get size of partial page map information (EMS) 626-27
  9944. Get stack space for map page and call (EMS) 634
  9945. Get status (EMS) 616
  9946. Get system environment 573-74
  9947. Get tick count 589
  9948. Get time 386, 590
  9949. Get total handles (EMS) 632
  9950. Get verify flag 448
  9951. Get version (EMS) 619
  9952. Get video mode 511
  9953. Graphics CardPlus 87
  9954. graphics mode memory-mapped programming 101-3
  9955. gray-scale
  9956.    enable/disable summing 527
  9957.    get values 517
  9958. GROUP directive 39
  9959.  
  9960. H
  9961. handle functions
  9962.    check if handle is remote 424-25
  9963.    directory searching 169-70, 172-73
  9964.    DUMP.ASM program 151, 152-62
  9965.    DUMP.C program 151, 161-63
  9966.    duplicate handle 435
  9967.    file/record management with 139-44
  9968.       advantages/disadvantages 144
  9969.       vs FCB functions 128
  9970.       file access skeleton program 141-43
  9971.       functions listed 140-41
  9972.       typical operation 139
  9973.    keyboard input 62, 67-69
  9974.    redirect handle 436-37
  9975.    set handle count 475-76
  9976.    use for compatible MS-DOS applications 316
  9977.    volume-label search using176
  9978. hardware-compatible applications 314-15, 317-18
  9979. header(EP>
  9980.    device 263, 264, 269
  9981.    .EXE program files 30
  9982. Hercules Graphics Card 87, 97, 98
  9983. HELLO.COM program 27, 28-29, 30
  9984.    hex dump of 33
  9985.    map produced by Object Linker during generation of 51
  9986. HELLO.EXE program 33, 34-35, 36
  9987. HELLO.REF program, cross-reference listing 57
  9988. .H files 45
  9989. Hide mouse pointer 595
  9990.  
  9991. I
  9992. IBMBIO.COM file 16
  9993.    disk location 189-92
  9994. IBM Corporation, role in MS-DOS development 4-5
  9995. IBMDOS.COM file 13, 16
  9996. IBM PC 64
  9997.    PC/AT 64
  9998.    PS/2 64
  9999.    regen buffers in memory for various adapters 87
  10000. "ill-behaved" applications 315
  10001. .INC files 45
  10002. In-Color Card 87
  10003. Initialize communications port 556-57
  10004. Initialize fixed disk characteristics 544-45
  10005. Initialize or scroll window down 505-6
  10006. Initialize or scroll window up 505
  10007. Initialize pointing device interface 577-78
  10008. Initialize printer port 587-88
  10009. input. See character input/output; keyboard input; mouse, input; pointing
  10010.      device, input; serial port
  10011. input buffer, flush 353-54
  10012. Input/Output (I/O)-Control Read (function 03H) 272-73
  10013. Input/Output (I/O)-Control Write (function 0CH) 276-77
  10014. input/output (I/O) redirection 67, 298-99
  10015. input status, check 353, 420
  10016. Input Status (command-code function 06H) 274
  10017. INS8250 Asynchronous Communications Controller 112
  10018. installable device drivers 12-13
  10019. Int 10H, ROM BIOS video driver
  10020.    Function 00H, Set video mode 94, 500
  10021.    Function 01H, Set cursor type 94, 501
  10022.    Function 02H, Set cursor position 94, 501
  10023.    Function 03H, Get cursor position 94, 502
  10024.    Function 04H, Get light pen position 95, 503
  10025.    Function 05H, Set display page 95, 503
  10026.    Function 06H, Initialize or scroll window up 95, 505
  10027.    Function 07H, Initialize or scroll window down 95, 505
  10028.    Function 08H, Read character and attribute at cursor 95, 506
  10029.    Function 09H, Write character and attribute at cursor 94, 506
  10030.    Function 0AH, Write character at cursor 94, 507
  10031.    Function 0BH, Set palette, background, or border 95, 508
  10032.    Function 0CH, Write graphics pixel 95, 509
  10033.    Function 0DH, Read graphics pixel 95, 510
  10034.    Function 0EH, Write character in teletype mode 94, 510
  10035.    Function 0FH, Get video mode 94, 511
  10036.    Function 10H palette functions
  10037.       Subfunction 00H, Set palette register 511
  10038.       Subfunction 01H, Set border color 512
  10039.       Subfunction 02H, Set palette and border 512-13
  10040.       Subfunction 03H, Toggle blink/intensity bit 513
  10041.       Subfunction 07H, Get palette register 513
  10042.       Subfunction 08H, Get border color 514
  10043.       Subfunction 09H, Get palette and border 514
  10044.       Subfunction 10H, Set color register 514
  10045.       Subfunction 12H, Set block of color registers 515
  10046.       Subfunction 13H, Set color page state 515-16
  10047.       Subfunction 15H, Get color register 516
  10048.       Subfunction 17H, Get block of color registers 516
  10049.       Subfunction 1AH, Get color page state 517
  10050.       Subfunction 1BH, Set gray-scale values 517
  10051.    Function 11H, font functions
  10052.       Subfunctions 00H and 10H, Load user font 518
  10053.       Subfunctions 01H and 11H, Load ROM 8-by-14 font 518
  10054.       Subfunctions 02H and 12H, Load ROM 8-by-8 font 519
  10055.       Subfunction 03H, Set block specifier 520
  10056.       Subfunctions 04H and 14H, Load ROM 8-by-16 font 520
  10057.       Subfunction 20H, Set Int 1FH font pointer 521
  10058.       Subfunction 21H, Set Int 43H for user's font 522
  10059.       Subfunction 22H, Set Int 43H for ROM 8-by-14 font 522
  10060.       Subfunction 23H, Set Int 43H for ROM 8-by-8 font 523
  10061.       Subfunction 24H, Set Int 43H for ROM 8-by-16 font 523
  10062.       Subfunction 30H, Get font information 524
  10063.    Function 12H
  10064.       Subfunction 10H, Get configuration information 525
  10065.       Subfunction 20H, Select alternate printscreen 526
  10066.       Subfunction 30H, Set scan lines 526
  10067.       Subfunction 31H, Enable/disable default palette loading 526-27
  10068.       Subfunction 32H, Enable/disable video 527
  10069.       Subfunction 33H, Enable/disable gray-scale summing 527
  10070.       Subfunction 34H, Enable/disable cursor emulation 528
  10071.       Subfunction 35H, Switch active display 528
  10072.       Subfunction 36H, Enable/disable screen refresh 529
  10073.    Function 13H, Write string in teletype mode 529
  10074.    Function 1AH, Get or set display combination code 530
  10075.    Function 1BH, Get functionality/state information 531
  10076.    Function 1CH, Save or restore video state 534
  10077. Int 11H, Get equipment configuration 535
  10078. Int 12H, Get conventional memory size 536
  10079. Int 13H, ROM BIOS disk driver 319
  10080.    Function 00H, Reset disk system 536
  10081.    Function 01H, Get disk system status 537
  10082.    Function 02H, Read sector 538
  10083.    Function 03H, Write sector 539
  10084.    Function 04H, Verify sector 540
  10085.    Function 05H, Format track 541
  10086.    Function 06H, Format bad track 542
  10087.    Function 07H, Format drive 543
  10088.    Function 08H, Get drive parameters 543
  10089.    Function 09H, Initialize fixed disk characteristics 544
  10090.    Function 0AH, Read sector long 545
  10091.    Function 0BH, Write sector long 546
  10092.    Function 0CH, Seek 547
  10093.    Function 0DH, Reset fixed disk system 548
  10094.    Function 0EH, Read sector buffer 548
  10095.    Function 0FH, Write sector buffer 549
  10096.    Function 10H, Get drive status 549
  10097.    Function 11H, Recalibrate drive 550
  10098.    Function 12H, Controller RAM diagnostic 550
  10099.    Function 13H, Controller drive diagnostic 551
  10100.    Function 14H, Controller internal diagnostic 551
  10101.    Function 15H, Get disk type 552
  10102.    Function 16H, Get disk change status 552
  10103.    Function 17H, Set disk type 553
  10104.    Function 18H, Set media type for format 554
  10105.    Function 19H, Park heads 554
  10106.    Function 1AH, Format ESDI drive 555
  10107. Int 14H, ROM BIOS Serial communications port driver 111
  10108.    Function 00H, Initialize communications port 556
  10109.    Function 01H, Write character to communications port 557
  10110.    Function 02H, Read character from communications port 558
  10111.    Function 03H, Get communications port status 558
  10112.    Function 04H, Extended initialize communications port 558
  10113.    Function 05H, Extended communications port control 559
  10114. Int 15H, ROM BIOS I/O Subsystem Extensions
  10115.    Function 00H, Turn on cassette motor 560
  10116.    Function 01H, Turn off cassette motor 560
  10117.    Function 02H, Read cassette 561
  10118.    Function 03H, Write cassette 562
  10119.    Function 0FH, Format ESDI drive periodic interrupt 562
  10120.    Function 21H
  10121.       Subfunction 00H, Read POST error log 563
  10122.       Subfunction 01H, Write POST error log 563
  10123.    Function 4FH, Keyboard intercept 564
  10124.    Function 80H, Device open 564
  10125.    Function 81H, Device close 565
  10126.    Function 82H, Process termination 566
  10127.    Function 83H, Event wait 566
  10128.    Function 84H, Read joystick 567
  10129.    Function 85H, SysReq key 568
  10130.    Function 86H, Delay 568
  10131.    Function 87H, Move extended memory block 569
  10132.    Function 88H, Get extended memory size 570
  10133.    Function 89H, Enter protected mode 570
  10134.    Function 90H, Device wait 571
  10135.    Function 91H, Device post 572
  10136.    Function C0H, Get system environment 317, 573
  10137.    Function C1H, Get address of extended BIOS data area 574
  10138.    Function C2H
  10139.       Subfunction 00H, Enable/disable pointing device 574
  10140.       Subfunction 01H, Reset pointing device 575
  10141.       Subfunction 02H, Set sample rate 576
  10142.       Subfunction 03H, Set resolution 576
  10143.       Subfunction 04H, Get pointing device type 577
  10144.       Subfunction 05H, Initialize pointing device interface 577
  10145.       Subfunction 06H, Set scaling or get status 578
  10146.       Subfunction 07H, Set pointing device handler address 579
  10147.    Function C3H, Set watchdog time-out 580
  10148.    Function C4H, Programmable option select 580
  10149. Int 16H, ROM BIOS keyboard driver 322
  10150.    Function 00H, Read character from keyboard 581
  10151.    Function 01H, Get keyboard status 582
  10152.    Function 02H, Get keyboard flags 582
  10153.    Function 03H, Set repeat rate 583
  10154.    Function 04H, Set keyclick 584
  10155.    Function 05H, Push character and scan code 585
  10156.    Function 10H, Read character from enhanced keyboard 585
  10157.    Function 11H, Get enhanced keyboard status 586
  10158.    Function 12H, Get enhanced keyboard flags 586
  10159. Int 17H, ROM BIOS Parallel port printer driver 108-19
  10160.    Function 00H, Write character to printer 587
  10161.    Function 01H, Initialize printer port 587
  10162.    Function 02H, Get printer status 588
  10163. Int 18H, ROM BASIC 588
  10164. Int 19H, ROM BIOS Reboot system 588
  10165. Int 1AH, Real-time (CMOS) Clock Driver
  10166.    Function 00H, Get tick count 589
  10167.    Function 01H, Set tick count 589
  10168.    Function 02H, Get time 590
  10169.    Function 03H, Set time 590
  10170.    Function 04H, Get date 591
  10171.    Function 05H, Set date 591
  10172.    Function 06H, Set alarm 591
  10173.    Function 07H, Reset alarm 592
  10174.    Function 0AH, Get day count 592
  10175.    Function 0BH, Set day count 593
  10176.    Function 80H, Set sound source 593
  10177. Int 20H, Terminate process 341
  10178. Int 21H, MS-DOS system functions
  10179.    function execution in a typical I/O request 281-82
  10180.    function summary by category 337-40 (table)
  10181.    function summary by number 335-37 (table)
  10182.    Function 00H, Terminate process 342
  10183.    Function 01H, Character input with echo 70, 148, 343
  10184.    Function 02H, Character output 90, 344
  10185.    Function 03H, Auxiliary input 110, 344-45
  10186.    Function 04H, Auxiliary output 110, 345-46
  10187.    Function 05H, Printer output 107, 346-47
  10188.    Function 06H, Direct console I/O 70, 73, 90, 347-48
  10189.    Function 07H, Unfiltered character input without echo 70, 73, 348-49
  10190.    Function 08H, Character input without echo 70, 349-50
  10191.    Function 09H, Display string 90, 350-51
  10192.    Function 0AH, Buffered keyboard input 70-71, 351-52
  10193.    Function 0BH, Check input status 70, 353
  10194.    Function 0CH, Flush input buffer and then input 70, 353-54
  10195.    Function 0DH, Disk reset 354-55
  10196.    Function 0EH, Select disk 167, 355-56
  10197.    Function 0FH, Open file 132, 137, 356-57
  10198.    Function 10H, Close file 132, 357-58
  10199.    Function 11H, Find first file 358-59
  10200.    Function 12H, Find next file 360-61
  10201.    Function 13H, Delete file 132, 361-62
  10202.    Function 14H, Sequential read 132, 362-63
  10203.    Function 15H, Sequential write 132, 363-64
  10204.    Function 16H, Create file 132, 364-65
  10205.    Function 17H, Rename file 132, 173, 366-67
  10206.    Function 18H, Reserved 367
  10207.    Function 19H, Get current disk 167, 168, 367
  10208.    Function 1AH, Set DTA address 130, 132, 368
  10209.    Function 1BH, Get default drive data 368-69
  10210.    Function 1CH, Get drive data 370
  10211.    Function 1DH, Reserved 371
  10212.    Function 1EH, Reserved 371
  10213.    Function 1FH, Reserved 371
  10214.    Function 20H, Reserved 371
  10215.    Function 21H, Random read 132, 372-73
  10216.    Function 22H, Random write 132, 373-75
  10217.    Function 23H, Get file size 132, 375-76
  10218.    Function 24H, Set relative record number 132, 376
  10219.    Function 25H, Set interrupt vector 147, 252, 253, 316, 377-78
  10220.    Function 26H, Create new PSP 378-79
  10221.    Function 27H, Random block read 132, 379-80
  10222.    Function 28H, Random block write 132, 381-82
  10223.    Function 29H, Parse filename 129, 132, 382
  10224.    Function 2AH, Get date 384-85
  10225.    Function 2BH, Set date 385
  10226.    Function 2CH, Get time 386
  10227.    Function 2DH, Set time 386-87
  10228.    Function 2EH, Set verify flag 387-88
  10229.    Function 2FH, Get DTA address 388-89
  10230.    Function 30H, Get MS-DOS version number 148, 319, 389
  10231.    Function 31H, Terminate and stay resident 252, 253, 390-91
  10232.    Function 32H, Reserved 392
  10233.    Function 33H, Get or set break flag, get boot drive 392-93
  10234.    Function 34H, Reserved 393
  10235.    Function 35H, Get interrupt vector 252, 316, 393-94
  10236.    Function 36H, Get drive allocation information 394-95
  10237.    Function 37H, Reserved 395
  10238.    Function 38H, Get or set country information 395-98
  10239.    Function 39H, Create directory 167, 398-99
  10240.    Function 3AH, Delete directory 167, 399
  10241.    Function 3BH, Set current directory 167, 400
  10242.    Function 3CH, Create file 140, 401-2
  10243.    Function 3DH, Open file 107, 110, 140, 204, 402-4
  10244.    Function 3EH, Close file 140, 204, 404
  10245.    Function 3FH, Read file or device 67, 69, 71, 109, 110, 141, 298,
  10246.         300, 322, 405-6
  10247.    Function 40H, Write file or device 35, 88, 107, 109, 110, 141,
  10248.         298, 300, 322, 406-7
  10249.    Function 41H, Delete file 141, 407-8
  10250.    Function 42H, Set file pointer 141, 408-9
  10251.    Function 43H, Get or set file attributes 141, 410-11
  10252.    Function 44H, IOCTL (I/O control) 69, 93-94, 111, 204, 205, 411-34
  10253.       Subfunction 00H, IOCTL: get device information 412-13
  10254.       Subfunction 01H, IOCTL: set device information 414-15
  10255.       Subfunction 02H, IOCTL: read control data from character device driver
  10256.            415-16
  10257.       Subfunction 03H, IOCTL: write control data to character device driver
  10258.            416-17
  10259.       Subfunction 04H, IOCTL: read control data from block device driver
  10260.            418-19
  10261.       Subfunction 05H, IOCTL: write control data to block device driver
  10262.            419-20
  10263.       Subfunction 06H, IOCTL: check input status 420-21
  10264.       Subfunction 07H, IOCTL: check output status 421-22
  10265.       Subfunction 08H, IOCTL: check if block device is removable 422-23
  10266.       Subfunction 09H, IOCTL: check if block device is remote 423-24
  10267.       Subfunction 0AH, IOCTL: check if handle is remote 424-25
  10268.       Subfunction 0BH, IOCTL: change sharing retry count 425-26
  10269.       Subfunction 0CH, IOCTL: generic I/O control for character devices
  10270.            426-29
  10271.       Subfunction 0DH, IOCTL: generic I/O control for block devices 429-32
  10272.       Subfunction 0EH, IOCTL: get logical drive map 433
  10273.       Subfunction 0FH, IOCTL: set logical drive map 434
  10274.    Function 45H, Duplicate handle 141, 435
  10275.    Function 46H, Redirect handle 141, 299, 436-37
  10276.    Function 47H, Get current directory 167, 168, 437-38
  10277.    Function 48H, Allocate memory block 196, 202, 323, 438-39
  10278.    Function 49H, Release memory block 196, 323, 439-40
  10279.    Function 4AH, Resize memory block 196, 198, 202, 219, 239, 322,
  10280.         440-41
  10281.    Function 4BH, Execute program (EXEC) 202, 299, 441-42 (see also EXEC
  10282.         function)
  10283.    Function 4CH, Terminate process with return code 26, 31, 35, 317,
  10284.         443-44
  10285.    Function 4DH, Get return code 221, 444-45
  10286.    Function 4EH, Find first file 445-46
  10287.    Function 4FH, Find next file 446-47
  10288.    Function 50H, Reserved 447
  10289.    Function 51H, Reserved 447
  10290.    Function 52H, Reserved 447
  10291.    Function 53H, Reserved 448
  10292.    Function 54H, Get verify flag 448
  10293.    Function 55H, Reserved 448
  10294.    Function 56H, Rename file 141, 173, 449-50
  10295.    Function 57H, Get or set file date and time 141, 450-51
  10296.    Function 58H, Get or set allocation strategy 452-53
  10297.    Function 59H, Get extended error information 130, 145, 148, 453-56
  10298.    Function 5AH, Create temporary file 141, 457-58
  10299.    Function 5BH, Create new file 141, 458-59
  10300.    Function 5CH, Lock or unlock file region 141, 460-61
  10301.    Function 5DH, Reserved 461
  10302.    Function 5EH, Machine name and printer setup
  10303.       Subfunction 00H, Get machine name 461-62
  10304.       Subfunction 02H, Set printer setup string 462-63
  10305.       Subfunction 03H, Get printer setup string 463-64
  10306.    Function 5FH, Device redirection
  10307.       Subfunction 02H, Get redirection list entry 464-65
  10308.       Subfunction 03H, Redirect device 466-67
  10309.       Subfunction 04H, Cancel device redirection 467-68
  10310.    Function 60H, Reserved 468
  10311.    Function 61H, Reserved 468
  10312.    Function 62H, Get PSP address 468-69
  10313.    Function 63H, Get DBCS lead byte table 469-70
  10314.    Function 64H, Reserved 470
  10315.    Function 65H, Get extended country information 470-74
  10316.    Function 66H, Get or set code page 474-75
  10317.    Function 67H, Set handle count 141, 475-76
  10318.    Function 68H, Commit file 141, 476-77
  10319.    Function 69H, Reserved 477
  10320.    Function 6AH, Reserved 477
  10321.    Function 6BH, Reserved 477
  10322.    Function 6CH, Extended open file 141, 478-80
  10323. Int 22H, Terminate handler address 480
  10324. Int 23H, Ctrl-C handler address 317, 480-81
  10325. Int 24H, Critical-error handler address 147, 317, 481-82
  10326. Int 25H, Absolute disk read 482-84
  10327. Int 26H, Absolute disk write 319, 484-85
  10328. Int 27H, Terminate and stay resident 486-87
  10329. Int 28H, Reserved 487
  10330. Int 29H, Reserved 487
  10331. Int 2AH, Reserved 487
  10332. Int 2BH, Reserved 487
  10333. Int 2CH, Reserved 487
  10334. Int 2DH, Reserved 488
  10335. Int 2EH, Reserved 488
  10336. Int 2FH, Multiplex interrupt 488
  10337.    Function 01H, Print spooler 488-89
  10338.    Function 02H, ASSIGN 489
  10339.    Function 10H, SHARE 490
  10340.    Function B7H, APPEND 490-91
  10341. Int 33H, Microsoft Mouse driver 593
  10342.    Function 00H, Reset mouse and get status 80, 594
  10343.    Function 01H, Show mouse pointer 80, 594
  10344.    Function 02H, Hide mouse pointer 80, 595
  10345.    Function 03H, Get mouse position and button status 80, 595
  10346.    Function 04H, Set mouse pointer position 80, 596
  10347.    Function 05H, Get button press information 80, 596
  10348.    Function 06H, Get button release information 80, 597
  10349.    Function 07H, Set horizontal limits for pointer 80, 597
  10350.    Function 08H, Set vertical limits for pointer 80, 598
  10351.    Function 09H, Set graphics pointer shape 80, 598
  10352.    Function 0AH, Set text pointer type 80, 599
  10353.    Function 0BH, Read mouse motion counters 80, 599
  10354.    Function 0CH, Set user-defined mouse event handler 80, 600
  10355.    Function 0DH, Turn on light pen emulation 80, 601
  10356.    Function 0EH, Turn off light pen emulation 80, 601
  10357.    Function 0FH, Set mickeys to pixels ratio 80, 601
  10358.    Function 10H, Set mouse pointer exclusion area 80, 602
  10359.    Function 13H, Set double speed threshold 81, 602
  10360.    Function 14H, Swap user-defined mouse event handlers 81, 603
  10361.    Function 15H, Get mouse save state buffer size 81, 603
  10362.    Function 16H, Save mouse driver state 81, 604
  10363.    Function 17H, Restore mouse driver state 81, 604
  10364.    Function 18H, Set alternate mouse event handler 81, 604
  10365.    Function 19H, Get address of alternate mouse event handler 81, 606
  10366.    Function 1AH, Set mouse sensitivity 81, 606
  10367.    Function 1BH, Get mouse sensitivity 81, 607
  10368.    Function 1CH, Set mouse interrupt rate 81, 607
  10369.    Function 1DH, Select pointer page 81, 608
  10370.    Function 1EH, Get pointer page 81, 608
  10371.    Function 1FH, Disable mouse driver 81, 608
  10372.    Function 20H, Enable mouse driver 81, 609
  10373.    Function 21H, Reset mouse driver 81, 609
  10374.    Function 22H, Set language for mouse driver messages 81, 610
  10375.    Function 23H, Get language number 81, 610
  10376.    Function 24H, Get mouse information 81, 611
  10377. Int 67H, Expanded Memory Manager functions 204, 205, 207
  10378.    Function 40H, Get status 616
  10379.    Function 41H, Get page frame address 616
  10380.    Function 42H, Get number of pages 617
  10381.    Function 43H, Allocate handle and pages 617
  10382.    Function 44H, Map expanded memory page 618
  10383.    Function 45H, Release handle and expanded memory 619
  10384.    Function 46H, Get version 619
  10385.    Function 47H, Save page map 620
  10386.    Function 48H, Restore page map 620
  10387.    Function 49H, Reserved 621
  10388.    Function 4AH, Reserved 621
  10389.    Function 4BH, Get handle count 621
  10390.    Function 4CH, Get handle pages 622
  10391.    Function 4DH, Get pages for all handles 623
  10392.    Function 4EH
  10393.       Subfunction 00H, Save page map 623
  10394.       Subfunction 01H, Restore page map 624
  10395.       Subfunction 02H, Save and restore page map 624
  10396.       Subfunction 03H, Get size of page map information 625
  10397.    Function 4FH
  10398.       Subfunction 00H, Save partial page map 625
  10399.       Subfunction 01H, Restore partial page map 626
  10400.       Subfunction 02H, Get size of partial page map information 626
  10401.    Function 50H
  10402.       Subfunction 00H, Map multiple pages by number 627
  10403.       Subfunction 01H, Map multiple pages by address 627
  10404.    Function 51H, Reallocate pages for handle 628
  10405.    Function 52H
  10406.       Subfunction 00H, Get handle attribute 629
  10407.       Subfunction 01H, Set handle attribute 629
  10408.       Subfunction 02H, Get attribute capability 630
  10409.    Function 53H
  10410.       Subfunction 00H, Get handle name 630
  10411.       Subfunction 01H, Set handle name 631
  10412.    Function 54H
  10413.       Subfunction 00H, Get all handle names 631
  10414.       Subfunction 01H, Search for handle name 632
  10415.       Subfunction 02H, Get total handles 632
  10416.    Function 55H
  10417.       Subfunctions 00H and 01H, Map pages and jump 633
  10418.    Function 56H
  10419.       Subfunctions 00H and 01H, Map pages and call 633
  10420.       Subfunction 02H, Get stack space for map page and call 634
  10421.    Function 57H
  10422.       Subfunction 00H, Move memory region 635
  10423.       Subfunction 01H, Exchange memory regions 635
  10424.    Function 58H
  10425.       Subfunction 00H, Get addresses of mappable pages 636
  10426.       Subfunction 01H, Get number of mappable pages 637
  10427.    Function 59H
  10428.       Subfunction 00H, Get hardware configuration 637
  10429.       Subfunction 01H, Get number of raw pages 638
  10430.    Function 5AH
  10431.       Subfunction 00H, Allocate handle and standard pages 638
  10432.       Subfunction 01H, Allocate handle and raw pages 639
  10433.    Function 5BH
  10434.       Subfunction 00H, Get alternate map registers 639
  10435.       Subfunction 01H, Set alternate map registers 640
  10436.       Subfunction 02H, Get size of alternate map register save area 641
  10437.       Subfunction 03H, Allocate alternate map register set 641
  10438.       Subfunction 04H, Deallocate alternate map register set 642
  10439.       Subfunction 05H, Allocate DMA register set
  10440.       Subfunction 06H, Enable DMA on alternate map register set 643
  10441.       Subfunction 07H, Disable DMA on alternate map register set 643
  10442.       Subfunction 08H, Deallocate DMA register set 644
  10443.    Function 5CH, Prepare expanded memory manager for warm boot 644
  10444.    Function 5DH
  10445.       Subfunction 00H, Enable EMM operating system functions 645
  10446.       Subfunction 01H, Disable EMM operating system functions 645
  10447.       Subfunction 02H, Release access key 646
  10448. Intel 80x86 microprocessor family 4, 8, 38, 64, 203
  10449.    interrupts and 246-51
  10450. Intel 8259A Programmable Interrupt Controller 112, 320
  10451. internal hardware interrupts 246
  10452. internal (intrinsic) commands 14
  10453. interrupt(s) 13, 244-45. See also Int 10H through Int 67H
  10454.    external hardware 247
  10455.    internal hardware 246
  10456.    servicing 250-51
  10457.    software 247-49
  10458.    types 244
  10459. interrupt handlers 16
  10460.    example (ZERODIV.ASM) 254-58
  10461.    MS-DOS and 252-53
  10462.    servicing 250, 251
  10463.    tasks 245
  10464.    typical 251
  10465. interrupt (intr) routine, device-driver 266-67, 293. See also command code
  10466.      routines
  10467. interrupt vector 17, 244
  10468.    get 393-94
  10469.    set 377-78
  10470. interrupt vector table 250
  10471. IOCTL (I/O control). See Int 21H, Function 44H
  10472. IO.SYS file 16, 17
  10473.    memory location of 18
  10474.  
  10475. J
  10476. Japanese character set 6
  10477. joystick, read 567
  10478.  
  10479. K
  10480. kernel. See DOS kernel
  10481. keyboard
  10482.    get enhanced flags 586-87
  10483.    get enhanced status 586
  10484.    get flags 582
  10485.    get status 582
  10486.    input with/without echo 70
  10487.    intercept 564
  10488.    key repeat rate and delay 583-84
  10489.    push character and scan code in buffer 585
  10490.    read character from 581
  10491.    read character from enhanced 585
  10492.    set keyclick 584
  10493. keyboard input 65-72
  10494.    buffered 351-52
  10495.    Ctrl-C and Ctrl-Break handlers 72-80, 317
  10496.    with handles 66, 67-69
  10497.    read character from keyboard 581
  10498.    with ROM BIOS functions 71-72
  10499.    with traditional calls 69-71
  10500. Keyboard input with echo 70
  10501. Keyboard input without echo 70
  10502. Keyboard intercept 564
  10503. Korean character set 6
  10504.  
  10505. L
  10506. .LIB files 44, 45, 58. See also Library Manager (LIB)
  10507. Library Manager (LIB) 44, 58-60
  10508.    operations prefix characters 58
  10509.    table-of-contents listing for SLIBC.LIB 59
  10510. light pen
  10511.    get position 503
  10512.    turn off emulation 601
  10513.    turn on emulation 601
  10514. line printer (PRN) 12, 106, 298
  10515. LINK. See Object Linker (LINK)
  10516. Load ROM 8-by-8 font 519
  10517. Load ROM 8-by-14 font 518-19
  10518. Load ROM 8-by-16 font 520-21
  10519. Load user font 518
  10520. Lock or unlock file region 460-61
  10521. Lotus/Intel/Microsoft Expanded Memory (LIM EMS). See Expanded Memory
  10522.      Specification (EMS)
  10523. LPT1, LPT2, LPT3 devices 106, 298
  10524. .LST files 45
  10525.  
  10526. M
  10527. machine name, get 461-62
  10528. Macro Assembler (MASM) 44, 45-47
  10529.    command line mode 46
  10530.    interactive mode 46
  10531.    levels
  10532.       modules 37
  10533.       procedures 41-42
  10534.       segments 38-41
  10535.    tutorials 63
  10536.    version 5.1 switches 47
  10537. make files 61
  10538. MAKE utility 60-61
  10539.    switches for 61
  10540. Map expanded memory page (EMS) 618
  10541. .MAP files 45
  10542. Map multiple pages by address (EMS) 627-28
  10543. Map multiple pages by number (EMS) 627
  10544. Map pages and call (EMS) 633-34
  10545. MASM. See Macro Assembler (MASM)
  10546. master boot record 192
  10547. Media Check (function 01H) 270-71
  10548. memory
  10549.    allocation
  10550.       dynamic, of additional 199-201
  10551.       shrinking 197-99
  10552.    conventional 196
  10553.       moving blocks of data between extended memory and 213-15
  10554.    expanded (see Expanded Memory Specification (EMS))
  10555.    image of .COM file 26
  10556.    image of .EXE file 31
  10557.    location of disk bootstrap program in 17
  10558.    location of IO.SYS in 18
  10559.    location of ROM bootstrap routine in 16
  10560.    location of SYSINIT, DOS kernel, MSDOS.SYS in 19
  10561.    making available, for EXEC function 218-19
  10562.    map after startup 20
  10563.    RAM 196
  10564. memory areas, 196. See also arena entries; arena headers; transient program
  10565.      area (TPA)
  10566. memory block
  10567.    allocate 438-39
  10568.    get/set allocation strategy 452-53
  10569.    move extended 569-60
  10570.    release 439-40
  10571.    resize 440-41
  10572. memory interlace 203
  10573. memory management 195-215
  10574.    arena headers 201-2
  10575.    expanded memory 203-11
  10576.       using 207-11
  10577.    extended memory 212-15
  10578.    Int 21H functions summary 339
  10579.    MS-DOS applications compatibility and 316
  10580.    using memory-allocation functions 197-202
  10581. memory-mapped input/output 86, 96-103
  10582.    graphics mode 101-3
  10583.    text mode 96-101
  10584. memory models 39
  10585.    segments, groups, classes for 40
  10586. memory segment 321-22
  10587. memory size
  10588.    get conventional 536
  10589.    get extended 570
  10590. mickeys, set to pixel ratio 601
  10591. Microsoft Mouse driver 593-611
  10592. miscellaneous system functions, Int 21H functions summary 340
  10593. MKDIR (MD) command 167
  10594. Monochrome/Printer Display Adapter (MDA) 86, 97, 98
  10595.    example dump, regen buffer 98
  10596. MOUDEMO.C program 82-83
  10597. mouse. See also pointing device
  10598.    disable driver 608-9
  10599.    driver 593
  10600.    enable driver 609
  10601.    get address of alternate event handler 606
  10602.    get button press information 596
  10603.    get button release information 597
  10604.    get information 611
  10605.    get language number 610
  10606.    get mouse save state buffer size 603-4
  10607.    get position and button status 595
  10608.    get sensitivity 607
  10609.    hide pointer 595
  10610.    input 80-83
  10611.    read motion counters 599-600
  10612.    reset and get status 594
  10613.    reset driver 609
  10614.    save driver state 604
  10615.    set alternate event handler 604-5
  10616.    set double speed threshold 602
  10617.    set graphics pointer shape 598
  10618.    set interrupt rate 607
  10619.    set language for driver messages 610
  10620.    set pointer exclusion area 602
  10621.    set pointer horizontal limits 597-98
  10622.    set pointer page 608
  10623.    set pointer position 596
  10624.    set pointer vertical limits 598
  10625.    set sensitivity 606
  10626.    set text pointer type 599
  10627.    set user-defined event handler 600-601
  10628.    show pointer 594-95
  10629.    summary of function calls 494-99
  10630.    swap user-defined event handlers 603
  10631. Move extended memory block 569-70
  10632. Move memory region (EMS) 635
  10633. MS-DOS. See also Operating System/2 (OS/2)
  10634.    genealogy 3-9
  10635.    interrupt handlers and 252-53
  10636.    loading 16-20
  10637.    programming tools (see programming tools)
  10638.    structure 12-16
  10639. MS-DOS application programs, porting to OS/2 318-31
  10640.    conversion 326-30
  10641.    encapsulation 323, 324-25
  10642.    MS-DOS function calls and OS/2 counterparts 328-29
  10643.    optimization 330-31
  10644.    rationalization 322-23
  10645.    ROM BIOS functions and OS/2 equivalents used in MS-DOS applications 330
  10646.    segmentation 321-22
  10647. MS-DOS application programs, structure of 21-42
  10648.    assembly-language programs 27-30, 37-42
  10649.    .COM programs introduced 25-30
  10650.    creation of 62-63
  10651.    .EXE programs introduced 30-36
  10652.    program procedures 41-42
  10653.    program segment prefix 23-25
  10654. MS-DOS application programs, writing compatible 314, 315-17
  10655.    check host capabilities 316
  10656.    exception handling 317
  10657.    input and output 316
  10658.    memory management 316
  10659.    process management 317
  10660.    program structure 315
  10661. MS-DOS error codes 145-51
  10662. MS-DOS functions 334
  10663.    conversion of, to OS/2 function calls 326-27
  10664.    display functions 88-94
  10665.       binary output mode 93-94
  10666.       screen control 91-93
  10667.    EXEC (see EXEC function)
  10668.    file control block (FCB) 129-39
  10669.    handle 139-44
  10670.    memory management/allocation 196, 197-202
  10671.    OS/2 equivalents to 328-29
  10672.    printer output 107-9
  10673.    reference (see Section II)
  10674.    serial port 109-12
  10675.    typical in-line code for call to 324
  10676. MSDOS.SYS file 13, 16
  10677.    memory location of 19
  10678. MS-DOS versions
  10679.    1.0 4-5, 138
  10680.    1.25 5
  10681.    2.00 5-6, 174
  10682.       error codes 145
  10683.       volume-label search under 175
  10684.    2.11, 2.25 6
  10685.    3.0 6-7, 138, 174
  10686.       error codes 145-46
  10687.       volume-label search under 176
  10688.    3.1, 3.2, 3.3, 4.0 7
  10689.    get number 389-90
  10690.    support for select command code routines by 267-68 (table)
  10691. Multi-Color Graphics Array (MCGA) 86, 102
  10692. Multiplex interrupt 488
  10693.  
  10694. N
  10695. NAME statement 27, 33
  10696. NEAR attribute 27
  10697.    vs FAR 29
  10698. NEAR RETURN 27
  10699. network functions, Int 21H functions summary 339
  10700. Nondestructive Read (function 05H) 274
  10701. non-disk-related errors 147, 148 (table)
  10702.  
  10703. O
  10704. Object Linker (LINK) 37, 44, 50-55
  10705.    map produced by, of HELLO.EXE program 51
  10706.    switches accepted by 53-55
  10707. object modules 37
  10708.    libraries (see Library Manager (LIB))
  10709.    linking .COM files from 27, 37. See also Object Linker (LINK)
  10710. .OBJ files 45
  10711. Open file 356-57, 402-4
  10712. Operating System/2 (OS/2) 7
  10713.    code optimization 330-31
  10714.    compatibility issues 318-20
  10715.    function calls equivalent to MS-DOS function calls 328-29
  10716.    function calls equivalent to ROM BIOS function calls 330
  10717.    porting MS-DOS applications to OS/2 320-31
  10718. ORG instruction 29
  10719. output. See character input/output; printer output; serial port
  10720. output status, check 421-22
  10721. Output Status (command-code function 0AH) 276
  10722. Output Until Busy (function 10H) 278-79
  10723. overlays, loading with EXEC 240, 241-42
  10724.  
  10725. P
  10726. PAGE command 27, 33
  10727. page frame 203
  10728. palette
  10729.    enable/disable default 526-27
  10730.    get border and 514
  10731.    get register 513
  10732.    set 508-9
  10733.    set border and 512-13
  10734.    set register 511-12
  10735. parallel ports 106
  10736. parameter block, requesting EXEC function 220-21
  10737. parent programs 218
  10738. Park heads 554-55
  10739. Parse filename 382-84
  10740. partitions, fixed-disk 192-94
  10741. Paterson, Tim 4
  10742. path 166
  10743. PC-DOS
  10744.    version 1.0 4
  10745.    version 1.1 5
  10746.    version 2.0 5-6
  10747.    version 3.0 193-94
  10748. piping parameters 24
  10749. pixel 101
  10750.    formula to calculate bit position for 102-3
  10751.    read graphics 510
  10752.    set mickeys to pixel ratio 601-2
  10753.    write graphics 509
  10754. pointing device
  10755.    enable/disable 574-75
  10756.    get device type 577
  10757.    get scaling or get status 578-79
  10758.    initialize interface 577-78
  10759.    input 80-83
  10760.    reset 575
  10761.    set handler address 579-80
  10762.    set resolution 576-77
  10763.    set sample rate 576
  10764. POP instruction 35
  10765. portability. See compatibility and portability
  10766. POST (power-on self-test)
  10767.    read error log 563
  10768.    write error log 563-64
  10769. Prepare expanded memory manager for warm boot (EMS) 644-45
  10770. Presentation Manager, OS/2 318
  10771. printer 106, 107-9. See also line printer (PRN); standard printer (stdprn)
  10772.    get setup strings 463-64
  10773.    get status 588
  10774.    initialize port 587
  10775.    write character to 587
  10776. printer output 106, 107-9, 346-47. See also TALK.ASM program
  10777. printer setup string
  10778.    get 463-64
  10779.    set 462-63
  10780. printscreen, select alternate 526
  10781. Print spooler 488-89
  10782. PRN device 12, 106, 298-99
  10783. PROC command 29, 35, 41
  10784. procedure, declaring beginning/end of 29
  10785. process management
  10786.    for compatibility in MS-DOS applications 317
  10787.    Int 21H functions summary 339
  10788.    terminate process 566
  10789. Process termination 566
  10790. Programmable Interrupt Controller (PIC) 247
  10791. Programmable option select 580-81
  10792. programming tools 43-64
  10793.    C Optimizing compiler 48-50
  10794.    CREF utility 56-58
  10795.    example using 62-63
  10796.    EXE2BIN utility 55-56
  10797.    file types 45
  10798.    Library Manager 58-60
  10799.    MAKE utility 60-61
  10800.    MASM 45-47 (see also Macro Assembler (MASM))
  10801.    Object Linker 50-55 (see also Object Linker (LINK))
  10802.    resources and references 63-64
  10803. program modules, assembly-language 37
  10804. program procedures 41-42
  10805. program segment prefix (PSP) 15, 23-25
  10806.    create new 378-79
  10807.    get address 468-69
  10808.    structure of 23
  10809. program segments, assembly-language 38-41
  10810. protected mode, enter 570-71
  10811. PROTO.ASM program 301-2
  10812. PROTO.C program 303
  10813. P-system operating system 5
  10814. Push character and scan code 585
  10815. PUSH instruction 35
  10816.  
  10817. R
  10818. Random block read 379-80
  10819. Random block write 381-82
  10820. Random read 372-73
  10821. Random write 373-75
  10822. rationalizing code 322-23
  10823. raw mode 69
  10824. Read (function 04H) 273
  10825. Read cassette 561
  10826. Read character and attribute at cursor 506
  10827. Read character from communications port 558
  10828. Read character from enhanced keyboard 585
  10829. Read character from keyboard 581
  10830. Read control data from block-device driver 418-19
  10831. Read control data from character device driver 415-16
  10832. Read file or device 405-6rRead graphics pixel 510
  10833. Read joystick 567
  10834. Read mouse motion counters 599-600
  10835. Read POST error log 563
  10836. Read sector 538-39
  10837. Read sector buffer 548
  10838. Read sector long 545-46
  10839. Reallocate pages for handle (EMS) 628
  10840. Reboot system 588-89
  10841. Recalibrate drive 550
  10842. record(s)
  10843.    set relative number 376-77
  10844.    using FCB functions 129-39
  10845.    using handle functions 139-44
  10846. record operations, Int 21H functions summary 338-39
  10847. Redirect device 466-67
  10848. Redirect handle 436-37
  10849. redirection, input/output 24, 67, 298-99
  10850.    cancel 467-68
  10851. redirection list entry, get 464-65
  10852. .REF files 45, 56
  10853. refresh buffer 86
  10854. regen buffer 86
  10855.    example dump of MDA adapter 98
  10856.    formula to determine offset 102
  10857.    memory diagram showing location of 87
  10858. Release access key (EMS) 646
  10859. Release handle and expanded memory (EMS) 619
  10860. Release memory block 439-40
  10861. Removable Media (function 0FH) 278
  10862. REN(AME) command 14
  10863. Rename file 366-67, 449-50
  10864. request header format 265
  10865.    command codes for (see command code routines, device-driver)
  10866. reserved area, disk 182
  10867. reserved functions
  10868.    EMS 621
  10869.    Int 21H functions summary 340
  10870. Reset alarm 592
  10871. Reset disk system 536-37
  10872. Reset fixed disk system 548
  10873. Reset mouse and get status 594
  10874. Reset mouse driver 609
  10875. Reset pointing device 575
  10876. resident device drivers 12
  10877. Resize memory block 440-41
  10878. RESTORE command 15
  10879. Restore mouse driver state 604
  10880. Restore page map (EMS) 620-21, 624
  10881. Restore partial page map (EMS) 626
  10882. RET instruction 41
  10883. retrace interval 100
  10884. return code
  10885.    get 444
  10886.    terminate process with 443-44
  10887. RMDIR (RD) command 167
  10888. ROM 8-by-8 font
  10889.    load 519
  10890.    set Int 43H for 523
  10891. ROM 8-by-14 font
  10892.    load 518-19
  10893.    set Int 43H for 522-23
  10894. ROM 8-by-16 font
  10895.    load 520-21
  10896.    set Int 43H for 523-24
  10897. ROM BASIC 588
  10898. ROM BIOS
  10899.    display functions 94-96, 330
  10900.    interrupts of special importance to 247, 248-49
  10901.    keyboard functions 67
  10902.       input with 71-72
  10903. ROM BIOS compatibility 314-16, 317-18
  10904.    avoid unstable hardware 318
  10905.    check host capabilities 317-18
  10906.    functions of, and OS/2 equivalents 330
  10907. ROM BIOS function calls. See also Section III
  10908.    summary 494-99
  10909. ROM bootstrap routine 16
  10910. root directory 166, 184-86, 187
  10911.    partial hex dump 186
  10912. RS-232 serial-interface standard 106
  10913. RS-422 serial-interface standard 106
  10914.  
  10915. S
  10916. Save and restore page map (EMS) 624-25
  10917. Save mouse driver state 604
  10918. Save or restore video state 534-35
  10919. Save page map (EMS) 620, 623
  10920. Save partial page map (EMS) 625-26
  10921. scan lines, set 526
  10922. screen control with MS-DOS functions 91-93
  10923. screen refresh, enable/disable 529
  10924. Search for handle name (EMS) 632
  10925. Seattle Computer Products 4
  10926. Seek 547
  10927. SEGMENT command 29, 33, 38
  10928. segment register 321
  10929. Select alternate printscreen 526
  10930. Select disk 355-56
  10931. selector 321
  10932. Select pointer page 608
  10933. Sequential read 362-63
  10934. Sequential write 363-64
  10935. serial port 106, 109-12. See also TALK.ASM program
  10936.    extended initialize port 558-59
  10937.    extended port control 559-60
  10938.    get status 558
  10939.    initialize 556-57
  10940.    read character from 558
  10941.    write character to 557
  10942. Set alarm 591-92
  10943. Set alternate map registers (EMS) 640
  10944. Set alternate mouse event handler 604-5
  10945. Set block of color registers 515
  10946. Set block specifier 520
  10947. Set border color 512
  10948. Set color page state 515-16
  10949. Set color register 514-15
  10950. Set current directory 400
  10951. Set cursor position 501-2
  10952. Set cursor type 501
  10953. Set date 385, 591
  10954. Set day count 593
  10955. Set device information 414-15
  10956. Set disk type 553
  10957. Set display page 503-4
  10958. Set double speed threshold 602
  10959. Set DTA address 368
  10960. Set file pointer 408-9
  10961. Set graphics pointer shape 598
  10962. Set gray-scale values 517
  10963. Set handle attribute (EMS) 629
  10964. Set handle count 475-76
  10965. Set handle name (EMS) 631
  10966. Set horizontal limits for pointer 597-98
  10967. Set Int 1FH font pointer 521
  10968. Set Int 43H for ROM 8-by-8 font 523
  10969. Set Int 43H for ROM 8-by-14 font 522-23
  10970. Set Int 43H for ROM 8-by-16 font 523-24
  10971. Set Int 43H for user's font 522
  10972. Set interrupt vector 377-78
  10973. Set keyclick 584
  10974. Set language for mouse driver messages 610
  10975. Set Logical Device (function 18H) 280-81
  10976. Set logical drive map 434
  10977. Set media type for format 554
  10978. Set mickeys to pixels ratio 601
  10979. Set mouse interrupt rate 607
  10980. Set mouse pointer exclusion area 602
  10981. Set mouse pointer position 596
  10982. Set mouse sensitivity 606
  10983. Set palette and border 512-13
  10984. Set palette, background, or border 508-9
  10985. Set palette register 511-12
  10986. Set pointing device handler address 579-80
  10987. Set printer setup string 462-63
  10988. Set relative record number 376-77
  10989. Set repeat rate 583-84
  10990. Set resolution 576-77
  10991. Set sample rate 576
  10992. Set scaling or get status 578-79
  10993. Set scan lines 526
  10994. Set sound source 593
  10995. Set text pointer type 599
  10996. Set tick count 589-90
  10997. Set time 386-87, 590
  10998. Set user-defined mouse event handler 600-601
  10999. Set verify flag 387-88
  11000. Set vertical limits for pointer 598
  11001. Set video mode 500-501
  11002. Set watchdog time-out 580
  11003. SHARE 490
  11004. shell. See COMMAND.COM file; command processor (shell)
  11005. SHELL.ASM program 229-38
  11006. SHELL.C program 225-29
  11007. Show mouse pointer 594-95
  11008. SLIBC.LIB, table-of-contents listing for 59
  11009. Softech company 5
  11010. software interrupts, 247-49
  11011. sound source, set 593
  11012. STACK attribute 31
  11013. stack pointer (SP) register 25-26, 31, 35
  11014. stack segment 38
  11015. stack segment (SS) register 31, 35
  11016. standard auxiliary device (stdaux) 20, 323
  11017.    default device 298
  11018.    handle 66
  11019. standard error device (stderr) 20
  11020.    default device 298
  11021.    handle 66
  11022. standard input device (stdin) 20
  11023.    default device 298
  11024.    handle 66, 67
  11025. standard list device 20, 323
  11026. standard output device (stdout) 20
  11027.    default device 298
  11028.    handle 66
  11029. standard printer (stdprn)
  11030.    default device 298
  11031.    handle 66
  11032. strategy (strat) routine, device-driver 265, 293
  11033. string(s)
  11034.    display 350-51
  11035. Swap user-defined mouse event handlers 603
  11036. Switch active display 528-29
  11037. switches
  11038.    C Optimizing compiler 49-50
  11039.    Library Manager 60
  11040.    Macro Assembler 47
  11041.    Make utility 61
  11042.    Object Linker 53-55
  11043. SYSINIT module 17, 18, 20
  11044.    installing device drivers 293
  11045.    memory location of 19
  11046. SysReq key 568
  11047. system file table 140-41
  11048.  
  11049. T
  11050. TALK.ASM program 113-26
  11051. teletype mode
  11052.    write character in 510-11
  11053.    write string in 529-30
  11054. terminal-emulator program. See TALK.ASM program
  11055. Terminate and stay resident 390-91, 486-87
  11056. Terminate handler address 480
  11057. Terminate process 341, 342
  11058. Terminate process with return code 443-44
  11059. text-mode memory-mapped programming 96-101
  11060. threads 331
  11061. time and date
  11062.    day count 592, 593
  11063.    get date 384-85, 591
  11064.    get time 386, 590
  11065.    set date 385, 591
  11066.    set time 386-87, 590
  11067. TITLE command 27, 33
  11068. Toggle blink/intensity bit 513
  11069. transient program 15, 22. See also .COM program file(s);
  11070.      .EXE (executable) program file(s)
  11071. transient program area (TPA) 15, 196. See also arena entries; arena
  11072.      headers
  11073. TREE command 174
  11074. TRYBREAK.C program 78-79
  11075. Turn off cassette motor 560-61
  11076. Turn on cassette motor 560
  11077. Turn off light pen emulation 601
  11078. Turn on light pen emulation 601
  11079.  
  11080. U
  11081. Unfiltered character input without echo 348-49
  11082. UNIX/XENIX operating system 66, 128, 139
  11083. user font
  11084.    load 518
  11085.    set Int 1FH pointer 521
  11086.    set Int 43H for 522
  11087.  
  11088. V
  11089. verify flag, get 448
  11090. Verify sector 540
  11091. video display 85-103
  11092.    adapters 86-87
  11093.    enable/disable 527
  11094.    get functionality/state information 531-34
  11095.    get or set combination code 530-31
  11096.    memory-mapped techniques 96-103
  11097.       graphics mode 101-3
  11098.       text mode 96-101
  11099.    MS-DOS display functions 88-94
  11100.       binary output mode 93-94
  11101.       screen control with 91-93
  11102.    ROM BIOS display functions 94-96
  11103.    save or restore video state 534-35
  11104.    support considerations 88
  11105.    switch active display 528-29
  11106. Video Graphics Array (VGA) 86, 97, 98, 102
  11107. video mode
  11108.    get 511
  11109.    set 500-501
  11110. VOL command 174
  11111. volume labels 174-76
  11112.    search, using extended file control block 175
  11113.  
  11114. W
  11115. watchdog time-out, set 580
  11116. window
  11117.    initialize or scroll down 505-6
  11118.    initialize or scroll up 505
  11119. Windows 7, 318
  11120. Write (function 08H) 275
  11121. Write cassette 562
  11122. Write character and attribute at cursor 506-7
  11123. Write character at cursor 507-8
  11124. Write character in teletype mode 510-11
  11125. Write character to communications port 557
  11126. Write character to printer 587
  11127. Write control data to block-device driver 419-20
  11128. Write control data to character-device driver 416-17
  11129. Write File or Device 406-7
  11130. Write graphics pixel 509
  11131. Write POST error log 563-64
  11132. Write screen in teletype mode 529-30
  11133. Write sector 539
  11134. Write sector buffer 549
  11135. Write sector long 546-47
  11136. Write with Verify (function 09H) 276
  11137.  
  11138. Z
  11139. ZERODIV.ASM program 254, 255-58
  11140. Zilog Z-80 microprocessor 4
  11141.