Article 10879 of comp.sys.apple2.programmer: Path: news1.icaen!news.uiowa.edu!news.physics.uiowa.edu!hammer.uoregon.edu!newsfeed.axxsys.net!newsfeed.icl.net!newsfeed.icl.net!news.algonet.se!algonet!masternews.telia.net!newsfeed.bcn.ttd.net!news.mad.ttd.net!not-for-mail From: jefferyab@NOSPAMnetzero.com (Jeff Brielmaier) Newsgroups: comp.sys.apple2.programmer Subject: Re: diskaccess-routine Date: Thu, 09 Sep 1999 02:06:42 GMT Organization: Telefonica Transmision de Datos Lines: 47 Message-ID: <37d70f27.6001400@194.224.23.85> References: <37cd42fe@news.mdh.se> <37CFC2D8.C1B627E4@swbell.net> <37d501cd.0@grendel.df.lth.se> NNTP-Posting-Host: 194.224.23.189 X-Newsreader: Forte Free Agent 1.11/32.235 Xref: news1.icaen comp.sys.apple2.programmer:10879 On 7 Sep 1999 14:15:09 +0100, Tebo wrote: >>> Have anyone written (in assembler) a good routine >>> for reading&writing files to DOS 5.25"-disks?? >>> (to be used with an 64kb AppleII+) >>> I mean to be used instead of DOS's routines >> >>Some software vendors developed custom DOS's. One of these which you can > >I think you missunderstood me, I didn't want a complete >dos-replacement, just two small and fast routines for >reading and writing a file on a normal dos 5.25"diskette >(hardcoded to slot6 and ignoring volumenumber and such) to be >used in programs I write (wordprocessor/graphix/game/whatever) > >What I want to do is having my own memorymap (where in memory >it read to/from, where the routines are etc) and using >all 64k by myself, and not needing to have dos or basic >in memory too. Grab a copy of "Beneath Apple DOS"; Read 'Chapter 8' for a blow-by-blow explaination of the entire DOS 3.3 kernel. No, the book does not support "source code," but its description along manual disassembly within the monitor will be the next best thing to having source. Of course, the RWTS routine could be converted into source code for optimization. I'd first sugguest that you use the RWTS subroutine ($B7B5-BFFF) w/i DOS 3.3 first. [Note: It's possible to intercept (hijack) the DOS 3.3 loader routine (starting at $B700) to load your code instead of continuing to bootstrap DOS 3.3.] Routines of interest for the read-parts of RWTS: $B7B5-B7C1 - Disable interrupts & call RWTS $B7E8-B7F8 - RWTS parameter table (Track/Sector/Buffer/etx) $B7FB-B7FE - Device Characteristics Table (Floppy drive parms) $B8C2-B8DB - PostNibble routine (Converts 342 "disk" bytes into 256 . data bytes $B8DC-B943 - READ routine (Read a sector) $B944-B99F - RDADR routine (Read Addr header to find sector to read) $B9A0-B9FF - SEEKABS routine (Move disk arm to desired track) $BA00-BA28 - Seek delay routine and data table $BA96-BAFF - Read Translate table (XLate table used by PostNibble) $BB00-BC55 - R/W translate buffer $BD00-BFC7 - The RWTS routine (There will be some code (non-Read) that . can be stripped out of this block.)