SiriusHardware
Veteran Member
I have an application in which I need to output some 8-bit non-ASCII characters to COM1: on a DOS PC with Qbasic V4.5.
I've knocked up the following code but it looks (on a scope) as though there is more than just the single desired character coming out through the COM port, possibly automatically appended CR / LF? At this time I unfortunately do not have a null-modem cable, nor do I have a storage scope so what I'm seeing, with the port continually transmitting, is what appear to be at least two different byte values alternating. What I want to see is the same single byte being sent over and over again.
This is the little bit of test code I am using: Ignore the test value of 128 in this example, it is just that, an example. I need to be able to send any single byte with a value in the range 0-255, and without auto-appended CR/LF or any other characters.
It's years, possibly decades, since I last tried to write anything in Qbasic. If the example above is not the correct way to output single raw binary bytes, what is?
I've knocked up the following code but it looks (on a scope) as though there is more than just the single desired character coming out through the COM port, possibly automatically appended CR / LF? At this time I unfortunately do not have a null-modem cable, nor do I have a storage scope so what I'm seeing, with the port continually transmitting, is what appear to be at least two different byte values alternating. What I want to see is the same single byte being sent over and over again.
This is the little bit of test code I am using: Ignore the test value of 128 in this example, it is just that, an example. I need to be able to send any single byte with a value in the range 0-255, and without auto-appended CR/LF or any other characters.
Code:
char1$=CHR$(128)
OPEN "com1: 9600,N,8,1,bin,cs0,ds0" FOR OUTPUT AS #1
start:
PUT#1,,char1$
GOTO start:
It's years, possibly decades, since I last tried to write anything in Qbasic. If the example above is not the correct way to output single raw binary bytes, what is?