Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!sbi!zeus!cf_su10!cf_su14!nee From: nee@cf_su14.Salomon.Com (Robert Nee) Newsgroups: comp.windows.ms.programmer Subject: int86 in Windows 3.0 Message-ID: <151@cf_su20.cf_su10.Sbi.COM> Date: 16 Jan 91 17:20:11 GMT Sender: news@cf_su10.Sbi.COM Reply-To: nee@cf_su14.sbi.com (Robert Nee) Organization: Salomon Brothers, NY Lines: 25 I am trying to write a program in windows 3.0 to return the Video mode number. I understand that there is a bios call to do this. I also understand from reading tips.txt that came with the SDK that int86 calls should work under windows 3.0 in Enhanced mode. So here is what I did #include int gvm () { union REGS inregs, outregs; inregs.h.ah = 0x0F; /* Get video mode service */ int86 (0x10h, &inregs, &outregs); /* Bios video routine */ return outregs.h.al; } Pretty simple. But this monster crashes horribly. So I ask whats wrong? Any help is appreciated. Robert Nee