KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q65195: Joystick STICK, STRIG Use BIOS Int 15 Hex, or Direct Hardware

Article: Q65195
Product(s): See article
Version(s): 3.00 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | SR# S900822-65 B_BasicCom | mspl13_basic
Last Modified: 17-JAN-1991

The way in which BASIC handles joystick commands, such as the STICK
function, STRIG function, and STRIG statement, depends on which kind
of Intel microprocessor chip the computer has.

If the computer has either an Intel 80286 or 80386 microprocessor, the
joystick commands are handled by going through BIOS interrupt 15 hex.
If the computer has an 8086/8088 or 80186/80188 microprocessor, the
joystick commands talk directly to the hardware.

This information applies to Microsoft QuickBASIC versions 3.00, 4.00,
4.00b, and 4.50 for MS-DOS; to Microsoft BASIC Compiler versions 6.00
and 6.00b for MS-DOS; and to Microsoft BASIC Professional Development
System (PDS) versions 7.00 and 7.10 for MS-DOS.

This difference in joystick handling is due to the fact that the ROM
BIOS routines for handling the joystick are not reliable on the first
8088- and 8086-based machines. QB.EXE and programs compiled with
BC.EXE automatically check what type of processor the machine has and
use that information to decide whether to go through the BIOS or to go
directly to the port for the joystick.

This implies that if problems are encountered programming the joystick
in QuickBASIC on an 80286 or 80386 machine, it is probably due to the
ROM BIOS functions not working correctly or consistently on that
machine. On 80286 and 80386 machines, QuickBASIC will make generic
interrupt 15 hex calls. QuickBASIC should work correctly if the BIOS
is handling the joystick correctly on 80286 and 80386 machines.

For more information on how to use the CALL INTERRUPT statement to
invoke BIOS interrupt 15 Hex to help diagnose game port (or joystick)
problems, query on the following words:

   STRIG and STICK and BIOS

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.