Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where do the serial port addresses come from?

Status
Not open for further replies.

wookie2

Programmer
Mar 23, 2004
6
GB
Hey!

After POST, BIOS is writing serial port addresses to 0040:0000. I need to know how it gets to know these adresses, to write a protected mode program (0040:0000 inaccesible) that does the same. Or are the addresses always the same (3f8 - COM1, 2f8 - COM2, 3e8 - COM3 and 2e8 - COM4)? And how does BIOS check the status of the port (to put 0 in 0040:000x if it's not available)?

Thanks for any help :).
 
This is not a hardware question. Nothing is set in stone but most of the time the programs will set the ports up to the standard and you can try using that. You could query the port and if you get no answer it probably is not there. Try the programming forums for more answers.
 
Trying to jog my memory, but location 0x3f8, etc will be null for no device.
Run debug and display the address. If something is there,then you have a device.

 
It knows the addresses because they were set up in the original IBM specs. You might try a google search for "bios decoded" to see if it is posted anywhere.
Or look with debug on your machine.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
This is an operating system Question.

In windows go to
Start Button ==>
Settings ==>
control panel ==>
System ICON ==>
Hardware TAB ==>
Device Manager Button ==>
PORTS ==>
Serial Port ==>
Right Click - Properties ==>
Resource Tab!!!

It will list the address range of the resource.

Might be slightly different in Win98 or other versions. I did this for Win XP PRO.




If you do not like my post feel free to point out your opinion or my errors.
 
Some of you didn't understand my problem :). I don't need to know what the addresses are on my machine. I have to write a program that finds the number and the addresses of serial ports. It has to be a protected mode program and it has to do it's job on every machine.
 
Sounds like you have to read the properties established by windows. You might need to know more about the windows operating system in detail. This is something that MS does not like to reveal to just everyone. If you looked at something like a Microsoft MFC Map that comes with visual C++ you might be able to do this. I have looked at and written some visual C++ for a class that could retreive windows information, but I have never tried to do that. There is probably already a hardware utility inside of windows that can do this. Like in the Windows system viewer. You might be able to use the API'S that they used and return that information. This is rather technical and pertains specifically to the Operating System in question on a specific machine. You may have to look at an OS determine what it is and then run a different subprogram for each OS.

If you do not like my post feel free to point out your opinion or my errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top