VOGONS


First post, by mike_canada

User metadata
Rank Newbie
Rank
Newbie

I'm trying to monitor serial port output from Qbasic in linux.

This is the value I use for serial1 in the dosbox config file under the serial section:

serial1=nullmodem server:127.0.0.1 port:8002 transparent:1

This is my mini script to start dosbox with the serial port connection linked into linux:

#!/bin/bash
socat -4 PTY,link="/tmp/dbser",raw,echo=0 TCP4-LISTEN:8002 &
dosbox

After Dosbox starts, I execute this in another linux console on the same computer:

od -tx1 -w1 /tmp/dbser

Now I run qbasic in dosbox and run the following command one at a time, replacing the last number after comma with a different one:

out &H3F8,1

That works. But the problem arises when I send a whole bunch of them out in one go like this:

out &H3F8,1
out &H3F8,2
out &H3F8,3
out &H3F8,4
out &H3F8,5
out &H3F8,6
out &H3F8,7
out &H3F8,8
out &H3F8,9
out &H3F8,10
out &H3F8,11

Because then what dosbox does is report this:

Serial1: Errors: Framing 0, Parity 0, Overrun RX:0 (IF0:0), TX:10, Break 0

except the actual TX number reported is basically all the issued Qbasic commands except for the first and last.

How do I go about fixing this?