Nisse wrote:Do you know of any program that can look for free I/O addresses in dos ?
No, I don't. And AFAIK there is no really good way to do it.
USBUHCI{L} has a way to do it if it needs to, but it is not 100% reliable. What it does is read a range of I/O addresses and see if they all come back with a value of -1 (FFh). If that's the case, it's probably an unused range. To verify, it then writes values to the same I/O range and see if the values are "remembered" by the hardware or not. If they are not, it assumes there is nothing at that I/O range.
Unfortunately, this is not a foolproof method. The biggest problem is that on some hardware reading an I/O port actually changes the configuration of the hardware. So, if you try to read from an I/O port where that is the case, you may have accidentally changed something that shouldn't have been changed. In regular memory (RAM), simply reading it never changes anything -- all you ever read is what was originally written to that memory address. Another problem is that some hardware requires specific I/O ports to be read/written as Words or DWords instead of a Bytes, so you may not be seeing the correct values coming from the hardware.