Serial Port Finder

Software related questions
Post Reply
Chuckphd53
Posts: 368
Joined: Sun May 13, 2018 9:15 am
Location: Florida, USA
Contact:

Serial Port Finder

Post 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 ?
(PCJR/JR-IDE-512DOM,TandyMod,V20-10Chip,BiDir,LPT2,3FlopBrd,
USBEmulator,ZIP100,PS2Keybrd,MouseSysMouse,InternalSwitcherPS)
KenG
Posts: 239
Joined: Sat Jul 16, 2016 5:36 pm
Location: Cincinnati, Ohio

Re: Serial Port Finder

Post 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.
Enhanced PCjr with a jr-IDE (1GB DOM) and a parallel port side car with a compact flash reader and backpack 1.44mb floppy attached. Tandy video mod.
Trixter
Posts: 720
Joined: Mon Sep 01, 2008 12:00 am
Location: Illinois, USA
Contact:

Re: Serial Port Finder

Post 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.
You're all insane and trying to steal my magic bag!
Chuckphd53
Posts: 368
Joined: Sun May 13, 2018 9:15 am
Location: Florida, USA
Contact:

Re: Serial Port Finder

Post 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
(PCJR/JR-IDE-512DOM,TandyMod,V20-10Chip,BiDir,LPT2,3FlopBrd,
USBEmulator,ZIP100,PS2Keybrd,MouseSysMouse,InternalSwitcherPS)
Chuckphd53
Posts: 368
Joined: Sun May 13, 2018 9:15 am
Location: Florida, USA
Contact:

Re: Serial Port Finder

Post 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
(PCJR/JR-IDE-512DOM,TandyMod,V20-10Chip,BiDir,LPT2,3FlopBrd,
USBEmulator,ZIP100,PS2Keybrd,MouseSysMouse,InternalSwitcherPS)
Post Reply