Hi,

Of course you can do that unless you use your app under a NT based (W2K, XP, Vista) OS. Even on those OSes where there îsn't a real DOS but an emulation layer, the mulation layer works to some extent unless you want to manipulate hardware directly, try to cross memory boundary of your application or any kind of memory protection, and last but not the least you can't use privileged opcodes as your code will reside on user spacethus running on Ring3 of CPU and only Kernel space code runs on Ring0 allowing privileged opcodes such as sti, cli, halt and many others.

Loren Soth

Hi,

Of course you can do that unless you use your app under a NT based (W2K, XP, Vista) OS. Even on those OSes where there îsn't a real DOS but an emulation layer, the mulation layer works to some extent unless you want to manipulate hardware directly, try to cross memory boundary of your application or any kind of memory protection, and last but not the least you can't use privileged opcodes as your code will reside on user spacethus running on Ring3 of CPU and only Kernel space code runs on Ring0 allowing privileged opcodes such as sti, cli, halt and many others.

Loren Soth

The code would be running under XP. Isn't Win2K NT based as well ?

Thanks.

>Can you still use BIOS functions win 32 bit programs?
No, the BIOS and DOS interrupts are strictly 16-bit, so a 32-bit program cannot use them. However, if you write a 16-bit program you can use them to a certain extent, but I would question why you need to on Windows XP.

Hi,

Since the 80386 all x86 processors (except AMD's new x86-64) are 32 bit and support 4 operating modes : 8086 VM, 16 bit real mode, 16bit protected mode, 32bit protected mode. You can use BIOS interrupts (actually interrupts are hardware features, BIOS don't own them but redirect them to its own code) in all of those operating modes unless some OS (yes Win2K is NT based, even NT4 Workstation and Windows for Workgroups 3.1 are NT based) redirect those interrupts to its own code. Hopefully those systems contain a subsystem called WOW (Windows on Windows) which emulates DOS platform through ntvdm.dll. As long as your program uses system interrupt IRQ 21 services which XP simulates for older programs and BIOS interrupts IRQ 13 and 16 which XP hooks, you shouldn't have any problems. However, XP will not allow a DOS or any other program to have direct access to your computer's IDE and SCSI controllers. Even the VGA BIOS is emulated to some extent explaining how we can play some 320x200 DOS games using linear frame buffer.

Loren Soth

This article has been dead for over six months. Start a new discussion instead.