Page 1 of 1

Serial Port Finder

Posted: Fri Mar 06, 2020 10:43 am
by Chuckphd53
I was gonna write a quick program to find serial ports on a DOS computer
but I have to believe it has already been done...

so before I start...anyone got one ?

Re: Serial Port Finder

Posted: Fri Mar 06, 2020 1:14 pm
by KenG
PCTOOLS system info will tell you how many ports you have. I used to know where DOS stored the port addresses. By looking there you can tell how many and what addresses. I did find this.




The standard port adresses are given below. Most PCs have them. If you are using IBM PS/2, equipped with a micro-channel bus, different addresses and interrupt requests can be expected. Just like LPT ports, base adresses for ÑÎÌ-ports can be obtained from the data range in BIOS.
Name Address IRQ
COM 1 3F8 4
COM 2 2F8 3
COM 3 3E8 4
COM 4 2E8 3

Standard Port Addresses

The table below contains the address having the addresses for COM-ports in BIOS data range. Each address has two bytes.
Start Address Function
0000:0400 COM1's Base Address
0000:0402 COM2's Base Address
0000:0404 COM3's Base Address
0000:0406 COM4's Base Address

COM Port Addresses in the BIOS Data Area

You can use debug to look in this address range to determine what you have.

Re: Serial Port Finder

Posted: Fri Mar 06, 2020 2:12 pm
by Trixter
Chuckphd53 wrote:I was gonna write a quick program to find serial ports on a DOS computer but I have to believe it has already been done... so before I start...anyone got one ?
Can you be more specific?

Are you trying to determine how many are present? The "proper" way is INT 11h.
Are you trying to determine what the addresses are? 40:0, 40:2, 40:4, 40:6 have the addresses for COM1/2/3/4. For the IRQs, it's almost always IRQ 4, IRQ 3, IRQ 4, IRQ3.
Are you trying to determine which ports have active cables/devices connected?

One of the best "what's in here?" utilities is INFOPLUS 1.58 which you should be able to find easily. Full source is also available.

Re: Serial Port Finder

Posted: Sat Mar 07, 2020 3:17 am
by Chuckphd53
Just looking for active UARTS,
I did write a quick program last night, that searchs for $2FF and $3FF scratch regs.
worked good So this is all I really needed..

But on a side Note..

I was looking at the COMBO CARD, wasthere ever a schematic done for that board, I would be interested i documenting that board
by creating a schematic, but would need a bare board to work from, if anyone has one and would not mind letting me borrow it
then return when done, I would like to create the full schematic with the thought of propagating it to new chips and surface mount.

Chuck

Re: Serial Port Finder

Posted: Tue Mar 10, 2020 9:37 am
by Chuckphd53
ok thanks Jim, the Infoplus worked great, was able to see both serial ports just fine
So I am gonna call this Project Done.
In my other thread B13 Modem Pin I was concerned about correct functionality, ie. Jr bios.
But after Qmodem5 testing and the Infoplus reporting both ports correctly
Stick a pin in it !
Serial card (simple) is done...
Thanks
Chuck