E474 Posted June 12, 2019 Share Posted June 12, 2019 Hi, I have written a short assembler routine that allows BASIC programs to use SIO. The SIO Device Control Block at $300 needs to be set up correctly in BASIC, then the assembler routine called with a USR statement. I've made a GitHub repo for it at https://github.com/e474/USRSIO - this also includes an ATR with the assembled code, and a short BASIC program showing how to load and use the assembler. This is the first git repo I have worked with/published, so I am not 100% sure I have done so correctly, though I haven't found any bugs with it yet. Please let me know if you have any feedback. The code was written with the help of WUDSN and ATASM on Linux. Hope this helps anyone interested in this subject. 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted June 13, 2019 Share Posted June 13, 2019 I wrote a program back in the day that does the same as part of a copying utility - seems I don't have a PC resident copy. Realistically you can get a USR routine to do practically all the work, mine went something like: USR(routine,start aux1,count,buffer address,sector size,status buffer,command,direction,retry count) The routine would automatically recursively call SIO updating the buffer address based on sector size for the number of times specified in count. Also maintained a status buffer with the return code from each operation and allowed specifying how many retries to attempt on error. Generally such routines can fit comfortably in page 6 though Basic programs will usually have higher overhead, less available memory vs standalone copiers. Quote Link to comment Share on other sites More sharing options...
E474 Posted June 14, 2019 Author Share Posted June 14, 2019 Hi Rybags, Thanks for the feedback - was the code posted to AtariAge (or elsewhere)? I have tried a quick search for it, but I couldn't find it, and searching by author limits it to last year at the latest, as you have posted quite a lot! If there's an online copy, then I'd like to add a link to it in the README file in the git repo, if I may? I thought about extending the assembler code to add functionality, but I thought most of the parameters that get passed in your routine could be setup in BASIC with POKE statements, so coded the minimum functionality I could. Actually it was a fun little project to do, but I have to admit going back to writing Atari BASIC was a bit of a chore, mainly due to working/editing with line numbers, rather than free text. Quote Link to comment Share on other sites More sharing options...
Rybags Posted June 14, 2019 Share Posted June 14, 2019 I had a quick search, I don't think I've posted it here directly. It might be embedded in an ATR I've uploaded but wouldn't be easy to find. For reason unknown I've got 4 or 5 PC import copies of my old Dos 2.5 work disk but none of them have the program on it. So it's probably sitting on real disk media somewhere. The actual USR program would be easily recreated anyway - there wasn't too much trickery in it besides the automated buffer address update that took the sector size into consideration. 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.