Path: utzoo!utgpu!watserv1!watmath!att!att!pacbell.com!ucsd!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!psuvm!dxb132 From: DXB132@psuvm.psu.edu Newsgroups: comp.sys.amiga Subject: Re: MFM coding/protection. Message-ID: <90332.191136DXB132@psuvm.psu.edu> Date: 29 Nov 90 00:11:36 GMT References: <1990Nov27.113820.28055@cck.cov.ac.uk> <1990Nov28.163130.29457@batcomputer.tn.cornell.edu> Organization: Penn State University Lines: 28 In article <1990Nov28.163130.29457@batcomputer.tn.cornell.edu>, riley@batcomputer.tn.cornell.edu (Daniel S. Riley) says: >this with one the CIA timers would take about 6 more lines of >assembly. Commodore will even tell you how to do it--read Bryce's >article "Amiga Low-Level Disk Access" in AmigaMail volume 1, page >VIII-9. Using timing loops in floppy access code is just pure As an aside, for those of you too lazy to use the CIA (which IS really the best way), there are some other approaches. Here's one: movea.l #$bfe001,a0 move.w #MagicWorstCase,d0 .. move.b (a0),(a0) dbra d0,.. rts Because the CIAs are accessed at the same max rate (.7Mhz or similar) you can calculate a worst case count value that will provide a minimum delay even with an infinitely fast CPU. However this should really only be used if code space is tight (like when you're patching someone's code that doesn't work with your machine!!!!!!!!!!!!!!! ) Get the feeling that I do that quite a bit? :-) This is NOT meant as a flame of the author of the code, however. I myself wrote code like that a few years ago (and worse!). And for a program that's for your own personal use, it's perfectly fine. -- Dan Babcock