0

I use a program for MS-DOS that reads and writes data to the parallel port and uses the hardware timer for timing. It doesn't work unless I disable USB support in the BIOS. With USB enabled, it looks like the operation of the program is interrupted hundreds of times at regular intervals. The source is available and compiles with DJGPP.

I'm looking for a way to programmatically disable/enable USB interrupts, either in a standalone program that I may write, or directly inside the program I use. I prefer C & DJGPP but everything goes. An already existing utility that does just this would be OK as well.

You may ask why I don't just use the BIOS for this. My old, parallel port equipped PC, has non-working PS/2 ports, so a USB keyboard must be used. If I disable USB from the BIOS, I can't operate the computer at all (I could put the command in 'autoexec.bat' but how uncomfortable is that?), while in this way I could just lose the keyboard when the program has started and I don't need it (well, almost, but I can live with that).

Thank you for reading. Here's the program (mtap):

http://markus.brenner.de/

Carmine
  • 13
  • 2
  • Would using a USB dongle that provides a parallel port work for you? – Craig Estey Jul 25 '20 at 19:34
  • @Craig Estey I think it wouldn't, since USB communication must be turned off. – Carmine Jul 25 '20 at 20:44
  • Reading and writing from the parallel port shouldn't be that timing sensitive. In any case there's no standard way of disabling USB interrupts as it will depend on the USB controller used. You'll have to find out what USB controller your PC is using and which USB controller(s) on your PC are generating the interrupts. You'll also need to ensure you put everything back the way the BIOS expects it, otherwise your keyboard won't start working again once the program is finished. – Ross Ridge Jul 25 '20 at 20:54
  • If you have the dongle, you access the parallel port via USB [and ignore the builtin parallel port]. MS/DOS [somewhat] predates USB (since 1996), so you've got a bit of a non-standard system as far as it is concerned. I assume/hope your system uses at least an 80386 cpu. If so, you might be able to bring up linux on it. If you're able to do that, you could either use it natively. Or, you could run DOS under a VM/QEMU (if you _have_ to use some [old] DOS programs). Or, you might use `wine`. It might help to know more about your constraints, needs, and goals for this. And more about your H/W – Craig Estey Jul 25 '20 at 22:29

0 Answers0