943,906 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 8386
  • Assembly RSS
Mar 21st, 2006
0

Bios functions

Expand Post »
Can you still use BIOS functions win 32 bit programs?

Thanks.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
deutsch is offline Offline
8 posts
since Mar 2006
Mar 22nd, 2006
0

Re: Bios functions

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
Reputation Points: 28
Solved Threads: 4
Posting Whiz in Training
Lord Soth is offline Offline
233 posts
since Mar 2006
Mar 22nd, 2006
0

Re: Bios functions

Quote originally posted by Lord 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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
deutsch is offline Offline
8 posts
since Mar 2006
Mar 22nd, 2006
0

Re: Bios functions

>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.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Mar 22nd, 2006
0

Re: Bios functions

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
Reputation Points: 28
Solved Threads: 4
Posting Whiz in Training
Lord Soth is offline Offline
233 posts
since Mar 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: Nasm to tasm code help
Next Thread in Assembly Forum Timeline: Guide How to start?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC