Subject: Re: apm hangs my system
To: martin <martin@rumolt.teuto.de>
From: Martin Husemann <martin@rumolt.teuto.de>
List: port-i386
Date: 07/26/1997 11:05:45
I'd like to add more details to my original question:

> It hits the first DPRINTF and then does nothing any more. I can't drop into
> ddb, so I guess something in the bioscall goes very wrong.

Just to make sure the BIOS itself works I just tried the same bioscall from
a little DOS application (dug out my old copy of Turbo-C):

The testprogram worked fine:

APM v1.2 (bx = 504d) installed
16-bit protected mode interface supported
32-bit protected mode interface supported
BIOS management disabled
BIOS power management disengaged

The program looks like this:

int ApmInstalled()
{
  union REGS inr, outr;
  WORD flags;

  memset(&inr, 0, sizeof inr);
  inr.x.ax = 0x5300;
  inr.x.bx = 0;

  int86(0x15, &inr, &outr);
  if (outr.x.cflag) {
    printf("No APM found\n");
    return 0;
  }
  printf("APM v%x.%x (bx = %04x) installed\n", outr.h.ah, outr.h.al, outr.x.bx);
  flags = outr.x.cx;
  if (flags & 1) printf("16-bit protected mode interface supported\n");
  if (flags & 2) printf("32-bit protected mode interface supported\n");
  if (flags & 4) printf("CPU idle reduces processor speed\n");
  if (flags & 8) printf("BIOS management disabled\n");
  if (flags & 16) printf("BIOS power management disengaged\n");
  return 1;
}


So it must be "bioscall" itself that is not working.


Martin