Pengwin #1 Posted January 14, 2007 Just asked this over in the programming forum, but I thought I would ask here as well: I am writing a project in Kyan Pascal, but I need the program to format a disc before storing data. I cannot find a way of doing this directly from pascal, so I was hoping someone out there might have an assembly listing of a format routine I could then embed in the pascal source. I am using an 800XL with a standard 1050 drive. The DOS that I will be using for the app is DOS2.5 Anyone? Quote Share this post Link to post Share on other sites
cas #2 Posted January 14, 2007 Hi, you need to send a CIO Command. The command number is depended from the DOS you're using and the Density you're formatting, mostly between 251 and 254. You'll find a list hare --> http://www.strotmann.de/twiki/bin/view/APG/PgmXIOCmd Kyan Pascal should have a CIO or XIO Command to send CIO Commands to a handler. If not, it can be easily don't from embedded assembler. Quote Share this post Link to post Share on other sites
Curt Vendel #3 Posted January 14, 2007 Hmmmm, Kyan manual makes no mention of any CIO or XIO calls? Curt Just asked this over in the programming forum, but I thought I would ask here as well: I am writing a project in Kyan Pascal, but I need the program to format a disc before storing data. I cannot find a way of doing this directly from pascal, so I was hoping someone out there might have an assembly listing of a format routine I could then embed in the pascal source. I am using an 800XL with a standard 1050 drive. The DOS that I will be using for the app is DOS2.5 Anyone? Quote Share this post Link to post Share on other sites
Pengwin #4 Posted January 14, 2007 Hmmmm, Kyan manual makes no mention of any CIO or XIO calls? Yeah, that's why I was hoping for an assembler routine. I know the basics of 6502, but have never actually coded anything in assembler. Quote Share this post Link to post Share on other sites
Cybernoid #5 Posted January 15, 2007 (edited) Here are some C/asm sources for doing XIO that I wrote. They are not perfect. xio.zip Here is some info from DERE: http://www.atariarchives.org/dere/chapt08.php#H8_6 And from Mapping: http://www.atariarchives.org/mapping/appendix17.php XIO commands: http://www.telusplanet.net/public/pairman/xiocodes.txt I *think* that a format can be done in C with the following: #define DISK_IOCB 1 //Open xio(0x3, DISK_IOCB, 4, 0, "D1:", 0) //Format double density first/ then single density xio(0xfe, DISK_IOCB, 0, 0, , "D1:", 0); //Format double density only (DOS 2.5) xio(0xfd, DISK_IOCB, 34, 0, , "D1:", 0); //Format single density only (DOS 2.5) xio(0xfd, DISK_IOCB, 0, 0, , "D1:", 0); I have not tried the above, but this is what I think will work... Edited January 15, 2007 by Cybernoid Quote Share this post Link to post Share on other sites
Cybernoid #6 Posted January 15, 2007 Oooh.. Look what I found on cas's site: CIO Library for Kyan Pascal : http://www.strotmann.de/twiki/bin/view/APG/KyanPascalCioLib Quote Share this post Link to post Share on other sites
Pengwin #7 Posted January 15, 2007 Oooh.. Look what I found on cas's site: CIO Library for Kyan Pascal : http://www.strotmann.de/twiki/bin/view/APG/KyanPascalCioLib Thanks Cybernoid, that and your previous post should give me enough to write a format routine. Quote Share this post Link to post Share on other sites
Cybernoid #8 Posted January 15, 2007 (edited) No problem. Good luck on your project and please be sure to post your "personal accounts" here.. Yes, I really do read Krazy Pengwin's Atari 8-bit Home... Edited January 15, 2007 by Cybernoid Quote Share this post Link to post Share on other sites
Pengwin #9 Posted January 15, 2007 (edited) Yes, I really do read Krazy Pengwin's Atari 8-bit Home... That's good, means I'm not talking to myself when I update the blog or projects Of course I will post the finance package on here. Or rather, I'll put a link to my site when it's ready for distribution. Not sure when that will be though, I seem to be working in stops and starts at the moment. Edited January 15, 2007 by Pengwin Quote Share this post Link to post Share on other sites
Pengwin #10 Posted February 8, 2007 Thanks for the link to the CIO libraries Cybernoid. I have created a format routine based on the open function, and it works. I am also in the process of creating a Get_Dir function and a File_Exists function. With these libraries, my program should be a lot more professional and robust. And thanks to Carsten for writing them Quote Share this post Link to post Share on other sites