I would like to be able to send a signal to the computer via a USB cable, have MASM read the signal then perform an action such as operate a relay. Can anybody help me or tell where I can learn how to do this.
Regards Seaview.
You'll need a driver, firmware and some USB hardware. I recommend searching around for USB development kits that come with all of this - you'll need to pay for it, but there really isn't much alternative with USB. You (should) get sample code (in C probably) for how to use it, which you can then translate to MASM.
Of course, something like this will be much simpler if you use the parallel or serial port, due to the protocols being simpler. Again, Google is your friend.
Cheers,
Zooba :U
The webpage http://www.lvr.com/usb.htm by the author of the book USB COMPLETE
has hundreds of links that seem to cover anything USB.
Included are sections on hardware, utilities, drivers, protocol analysers and much more.
For the send a signal part you could use, to simulate or for the final device,
a usb gamepad and write a program in MASM to check for a button press.