Bios functions

Reply

Join Date: Mar 2006
Posts: 8
Reputation: deutsch is an unknown quantity at this point 
Solved Threads: 0
deutsch's Avatar
deutsch deutsch is offline Offline
Newbie Poster

Bios functions

 
0
  #1
Mar 21st, 2006
Can you still use BIOS functions win 32 bit programs?

Thanks.
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 233
Reputation: Lord Soth is an unknown quantity at this point 
Solved Threads: 4
Lord Soth's Avatar
Lord Soth Lord Soth is offline Offline
Posting Whiz in Training

Re: Bios functions

 
0
  #2
Mar 22nd, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 8
Reputation: deutsch is an unknown quantity at this point 
Solved Threads: 0
deutsch's Avatar
deutsch deutsch is offline Offline
Newbie Poster

Re: Bios functions

 
0
  #3
Mar 22nd, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,541
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 704
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Bios functions

 
0
  #4
Mar 22nd, 2006
>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.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 233
Reputation: Lord Soth is an unknown quantity at this point 
Solved Threads: 4
Lord Soth's Avatar
Lord Soth Lord Soth is offline Offline
Posting Whiz in Training

Re: Bios functions

 
0
  #5
Mar 22nd, 2006
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Assembly Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC