Jump to content
IGNORED

Sending data back to Atari Basic in an INPUT command


danwinslow

Recommended Posts

Yes, indeed it does seem to be inherent. I think for my purposes, this is fine. A conversational transaction in TCP or UDP in BASIC would be fine at the given speeds. I already have XIO calls to do direct buffer fills and things like that for stuff that needs high speed, but I wanted to get as much compatibility as possible, so I wanted to make sure that the INPUT and PRINT commands would work at least sort of as expected.

Link to comment
Share on other sites

Yes, indeed it does seem to be inherent. I think for my purposes, this is fine. A conversational transaction in TCP or UDP in BASIC would be fine at the given speeds. I already have XIO calls to do direct buffer fills and things like that for stuff that needs high speed, but I wanted to get as much compatibility as possible, so I wanted to make sure that the INPUT and PRINT commands would work at least sort of as expected.

you don't need to implement separate commands for buffer filling though. If BASIC calls the CIO asking for one byte, then that's a separate issue, but if the IOCB gets a request for multiple bytes to be received or sent, then the handler can do burst I/O, as phaeron described.

Link to comment
Share on other sites

you don't need to implement separate commands for buffer filling though. If BASIC calls the CIO asking for one byte, then that's a separate issue, but if the IOCB gets a request for multiple bytes to be received or sent, then the handler can do burst I/O, as phaeron described.

 

At this point, please let's forget about bursting. The Put-byte routine receives a single byte in A and has to put it onto the device. The Get-byte routine reads a single byte from the device and returns it in A.

 

Bursting is more complicated. Especially with BASIC, because Basic does not send bytes through CIO but through the handler vector directly, which *also* implies that you cannot burst if the call comes from Basic. Which again means that a handler needs to be able to detect whether a call comes from Basic or CIO, and only enable bursting in the latter. (Os++ has better means for that, but not for the traditional Os).

 

So, once again: Avoid bursting at this time, and just write an implementation that receives and transmits single bytes a time, through the A register.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...