flashjazzcat Posted October 12, 2015 Share Posted October 12, 2015 Right: you answered my question. Clearly it does. Quote Link to comment Share on other sites More sharing options...
Joey Z Posted October 12, 2015 Share Posted October 12, 2015 Right: you answered my question. Clearly it does. so we're in agreement now? Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted October 12, 2015 Share Posted October 12, 2015 Totally. I didn't realize that that 10,000 byte buffer request would be fulfilled by the OS calling get one byte 10,000 times if the handler chose to allow it. Makes sense, though. Quote Link to comment Share on other sites More sharing options...
Joey Z Posted October 12, 2015 Share Posted October 12, 2015 Totally. I didn't realize that that 10,000 byte buffer request would be fulfilled by the OS calling get one byte 10,000 times if the handler chose to allow it. Makes sense, though. yes, at least there's a fairly simple way around it. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted October 12, 2015 Author Share Posted October 12, 2015 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. Quote Link to comment Share on other sites More sharing options...
Joey Z Posted October 12, 2015 Share Posted October 12, 2015 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. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted October 12, 2015 Author Share Posted October 12, 2015 Yes, I'm aware. I still want the separate commands, though, it lets me short circuit quite a bit, and the focus is not really on basic in particular. Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted October 12, 2015 Share Posted October 12, 2015 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.