[Coco] Making BASIC not wait for printer.

Allen Huffman alsplace at pobox.com
Sun Mar 26 21:47:35 EDT 2017


> On Mar 26, 2017, at 5:12 PM, Arthur Flexser <flexser at fiu.edu> wrote:
> 
> To elaborate, now that the memory of this somewhat comes back to me:
> 
> The first poke, to $FF23, causes $FF22 to become the data direction
> register, temporarily replacing $FF22's normal operation.  The second poke,
> to what has become the data direction register, sets the bits of $FF22 to
> the pattern of inputs and outputs that is desired.  Then the third poke, to
> $FF23, turns off the data direction register, restoring the bits of $FF22
> to normal operation.
> 
> There should be a fourth poke, setting $FF22 to zero so that the new output
> bit contains the correct value to tell Basic's printer routine that the
> serial port isn't busy; at least there was in the version I used years
> ago.  Probably this final poke can be safely omitted, at least under DECB,
> since it would be unlikely that the serial port would register as busy at
> the time the data direction register was activated.

Thanks, Art. That’s exactly the type of demystification I was looking for.

I recall finding this POKE (probably in Rainbow) and using it for some early modem programs I wrote. I had to dig one of them up tonight to see how it worked. I had assumed it was some POKE to a BASIC hook somewhere, and when I found them I wasn’t sure how it worked to fool BASIC. Now I get it.

I was attempting to send bytes to my Arduino device via OS-9 (since it’s all built in, and I can use the “display” command) but that wasn’t working, so I went back to BASIC… which also didn’t worked.

I guess I have a fried TTL-to-RS232 adapter. This is why I am a software guy.

		— A




More information about the Coco mailing list