home *** CD-ROM | disk | FTP | other *** search
- { +----------------------------------------------------------------------+
- | |
- | PasWiz Copyright (c) 1990-1993 Thomas G. Hanlin III |
- | 3544 E. Southern Ave. #104, Mesa, AZ 85204 |
- | |
- | The Pascal Wizard's Library |
- | |
- +----------------------------------------------------------------------+
-
-
-
- Joystick:
-
- This unit provides joystick support via the BIOS routines. It will work on
- all but the oldest machines. Joystick support was added to the BIOS around
- the time of the ATs, circa 1985.
-
- }
-
-
-
- UNIT Joystick;
-
-
-
- INTERFACE
-
-
-
- FUNCTION ButtonA1: Boolean;
- FUNCTION ButtonA2: Boolean;
- FUNCTION ButtonB1: Boolean;
- FUNCTION ButtonB2: Boolean;
-
- PROCEDURE Buttons(VAR A1, A2, B1, B2: Boolean);
- PROCEDURE Positions(VAR AX, AY, BX, BY: WORD);
-
-
-
- { --------------------------------------------------------------------------- }
-
-
-
- IMPLEMENTATION
-
-
-
- {$F+}
-
- { the below routines are in assembly language }
-
-
-
- FUNCTION ButtonA1; external; { whether joystick A, button 1 is pressed }
- FUNCTION ButtonA2; external; { whether joystick A, button 2 is pressed }
- FUNCTION ButtonB1; external; { whether joystick B, button 1 is pressed }
- FUNCTION ButtonB2; external; { whether joystick B, button 2 is pressed }
-
- PROCEDURE Buttons(VAR A1, A2, B1, B2: Boolean); external; { all buttons }
- PROCEDURE Positions(VAR AX, AY, BX, BY: WORD); external; { stick positions }
-
-
- {$L JOYSTK}
-
-
-
- { ----------------------- initialization code --------------------------- }
- BEGIN
- END.
-