• Please review our updated Terms and Rules here

A way to find available ports?

Towmater

Experienced Member
Joined
May 14, 2017
Messages
208
I'm trying to run a memory card reader on a PII system. It has configurable address dip-switches, in the range of 210-3F0, but the default of 350 causes a lock-up when it gets to the driver in Config.sys.

Is there a way to find available addresses? I suppose I could try iterating through every combination, although I'm afraid of blowing the thing up. (That actually happened to me once when I set a graphics card refresh rate and the monitor couldn't handle it, a transistor changed state to "on fire.")
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
43,956
Location
Pacific Northwest, USA
While it's not a sure thing, doing an IN on most unassigned ports will return ffh, not a sure thing, but a good indicator. You'd be looking for a block of 8 addresses or so that are unassigned.
 

Towmater

Experienced Member
Joined
May 14, 2017
Messages
208
Thanks, sounds promising. I'm not finding "IN" in any dos command references. Nor GW-Basic, Basica. Debug seems to want the name of an .exe to run. Googleing "in command" or "in" is virtually hopeless even with other keywords.
 

Svenska

Veteran Member
Joined
Mar 19, 2007
Messages
721
Location
Sweden
Just start DEBUG without any filename.

Then, in DEBUG, use "I xx" where xx is the port in hex, e.g. "I 220" for port 0x200.
 

Eudimorphodon

Veteran Member
Joined
May 9, 2011
Messages
6,733
Location
Upper Triassic
Note it's not a sure thing that a given card's ports will return anything with a read, write-only registers are a thing. (The EMS card I built recently that's register-compatible with a popular homebrew design uses read-only registers for the page frame. Haven't checked for certain but my guess is a read against them would return the same value as an unassigned port.)
 

Svenska

Veteran Member
Joined
Mar 19, 2007
Messages
721
Location
Sweden
Note it's not a sure thing that a given card's ports will return anything with a read, write-only registers are a thing.
Also, the simple act of reading a register may cause side-effects. Many status registers reset their values after being read, and some devices combine a read-only status register with a write-only command register at the same address.

But reading FFh for some reasonably-sized area is a good indicator of "nothing there".
The next step would be to write something else to this area, and reading again. If it is still FFh, even better.
 

WBST

Veteran Member
Joined
Feb 11, 2017
Messages
518
Location
Guildford, U.K.
220h is usually Sound Blaster compatible Primary Address, 240h is a good bet. Intel PCMCIA 365SL chips tend to 2E0h.
 
Top