Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Programmers Reference 0.02b - <b>int 33h, 05h (5) get button press information</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 33h,  05h (5)        Get Button Press Information

    Return information about button state and number of button presses.

       On entry:      AX         05h
                      BX         Button

       Returns:       AX         Button Status
                      BX         Count of Button Presses
                      CX         Cursor Position (hor) at last press
                      DX         Cursor Position (ver) at last press

  --------------------------------------------------------------------------

    Function 5 returns:

    . The current status of the specified button.

    . The number of times this button was pressed since the last call to
      this function.

    . The horizontal and vertical coordinates of the cursor the last time
      this button was pressed.

    The value in BX specifies which button is checked. If this value is 0,
    the left button is checked. If this parameter is 1, the right button is
    checked.

    The button status is a single integer value. Bit 0 represents the left
    button, and bit 1 represents the right button. Theese bits are 1 if the
    corresponding button is down, and 0 if it is up.

    The count of button presses is always in the range of 0 to 32767.
    Overflow is not detected. The count is set to 0 after the call.

    The values for the horizontal and vertical coordinates are in the ranges
    defined by the virtual screen. These values represent the cursor
    position when the button was last pressed, not the cursor's current
    position.

See Also: INT 33h, 06h Virtual Screen

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson