VOGONS


First post, by aokvilla

User metadata
Rank Newbie
Rank
Newbie

Is anyone here familiar with qbasic programs and specifically programs using com ports? I'm trying to run the attached program in dosbox but whenever it gets to the OPEN COM1 line it fails with a device timeout error.
I get the same error even on a physical pc running dos, and the serial port is set up properly in dosbox.
I think the issue is that the device I'm trying to connect to doesn't send any data through the serial line unless the right command is sent to it, and I think basic is waiting for a response or something which it doesn't get. If anyone knows how to configure the program so it doesn't wait for a response before continuing, or if there is actually some other issue, I'd really appreciate the help.

The program is from this scientific paper: https://sci-hub.se/10.1016/0010-4825(93)90144-P, and I know the serial device works, if I send commands to it over realterm it responds correctly.

Attachments

  • Filename
    lkb.bas.txt
    File size
    4.97 KiB
    Downloads
    70 downloads
    File license
    Fair use/fair dealing exception

Reply 1 of 2, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

You can use Portmon to monitor your serial port traffic. Perhaps you will be able to determine what "realterm" (whatever that is?) does differently from DOSBox.
https://docs.microsoft.com/en-us/sysinternals … wnloads/portmon

Alternatively I may suggest switching from QBasic to either Freebasic or QB64, both of which have modern Windows versions with compatible syntax.

Reply 2 of 2, by Jo22

User metadata
Rank l33t++
Rank
l33t++

I would try running the full version, Quick Basic.
Especially in versions 4.0 and 4.5x.
QB is much more feature complete than QBasic.

Alternatively, try PDS Basic 7.x.
Or Visual Basic for DOS (VBDOS).

Visual Basic for DOS is an extended version of QB45.
It can use a Visual Basic 1.0 like syntax, the old QuickBasic syntax and ordinary BASIC programs with line numbers.

By tge way, the COM port issue is also still a thing in VB6.
The serial port extension is not included in the smaller versions.
VB6 Pro or higher is required to access the serial ports.
Except if someone is willing to use a third-party library, like PORT.DLL.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//