
|
Maybe it was the hardware I was using, but I could never seem to open a COM port through QuickBasic 4.5 for MS-DOS (an error was thrown) unless the DTR (Data Terminal Ready) pin was high. This wasn't always very practical, especially when interfacing my multimeter which used just three of the pins (RxD, TxD, GND). I experimented and found a nice little way to directly communicate with the serial port control register, and trick it into thinking DTR was high!
OUT &H3FC, 9
Change &H3FC with the hexadecimal base address of the COM port you wish to manipulate. In this example, I am targeting COM1 on my machine.
Important NoteThis method will probably render your software inoperable under Windows NT, as direct hardware calls cannot be made from within NTVDM. |
Online SoundCloud Downloader, NEW!Download tracks posted on SoundCloud for free in high-quality MP3! SoundScrape.netUseful eBay Links |