/* int33.c (emx+gcc) */

/* Issue software interrupt 0x33, test int86() */
/* DOS only */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dos.h>

static void usage (void)
{
  fputs ("Usage:  int33\n", stderr);
  exit (1);
}


int main (int argc, char *argv[])
{
  union REGS r;

  if (_osmode == OS2_MODE)
    {
      fputs ("This program does not run under OS/2.\n", stderr);
      return 1;
    }
  if (argc != 1)
    usage ();
  r.x.ax = 0x0000;
  _int86 (0x33, &r, &r);
  if (r.x.ax != 0xffff)
    printf ("Mouse not available\n");
  else
    printf ("Mouse available\n");
  return 0;
}
