Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!overload!dillon From: dillon@overload.Berkeley.CA.US (Matthew Dillon) Newsgroups: comp.sys.amiga.programmer Subject: Re: Direct hardware drive access Message-ID: Date: 1 Apr 91 20:02:44 GMT References: <2147@pdxgate.UUCP> Organization: Not an Organization Lines: 34 In article mykes@amiga0.SF-Bay.ORG (Mike Schwartz) writes: >Try the following routines, instead. Notice that 'structured' programming >techniques are just as doable in assembler as they are in 'C'. Note that >when coding in assembler, your code is pretty optimal. In particular, notice >that rather than saying: > bsr StepDelay > rts >You can use > bra StepDelay >Which saves 34 clock cycles and 2 bytes. A good example of an optimization that will never make a bit of difference to the overall performance, because the step delay loop does a busy wait. 2 bytes verses how many for the routine? Now, of course, such a *simple* optimization I would probably do myself, but when all is said and done it seems to me that a BETTER optimization would be do something useful while you were waiting on the step... 3ms = 3000uS = many, many cycles. >******************************************************** >* Appendix A of the Amiga Hardware Manual tells you * >* everything you need to know to take full advantage * >* of the power of the Amiga. And it is only 10 pages! * >******************************************************** -Matt -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA