• Please review our updated Terms and Rules here

A way to find available ports?

Towmater

Experienced Member
Joined
May 14, 2017
Messages
209
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.")
 
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.
 
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.
 
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.
 
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.)
 
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.
 
220h is usually Sound Blaster compatible Primary Address, 240h is a good bet. Intel PCMCIA 365SL chips tend to 2E0h.
 
Back
Top