home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17340 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.3 KB  |  41 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!mcsun!sunic!dkuug!imada!news
  3. From: breese@monet.imada.ou.dk (Bjoern Reese)
  4. Subject: Re: Improved ByteRun algorithm for programmers.
  5. Message-ID: <1992Dec14.160749.21777@imada.ou.dk>
  6. Sender: news@imada.ou.dk (USENET News System)
  7. Organization: Dept. of Math. & Computer Science, Odense University, Denmark
  8. References: <JRAJA.92Dec13191720@vipunen.hut.fi>
  9. Date: Mon, 14 Dec 1992 16:07:49 GMT
  10. Lines: 29
  11.  
  12. In article <JRAJA.92Dec13191720@vipunen.hut.fi> jraja@vipunen.hut.fi (Jarno  
  13. Tapio Rajahalme) writes:
  14. > In article <1992Dec8.122757.27543@doug.cae.wisc.edu> pochanay@cae.wisc.edu  
  15. (Adisak Pochanayon) writes:
  16. >>    upb_copyit
  17. >>          bclr.b    d2,d0          ; Clear bit seven in d0
  18. > Wouldn't standard neg.b be faster than bclr.b ? 
  19.  
  20. Yes it would, but unfortunately it wouldn't give the same result.
  21. neg.b does a 2-complementary negation while bclr.b just clears a
  22. single bit.
  23.  
  24. A little example (where bclr clears bit #7 as it does in the
  25. ByteRun program.)
  26.  
  27. original: %10011010
  28.  
  29. neg.b:    %01100110
  30. bclr.b:   %00011010
  31.  
  32. Clearly neg.b and bclr.b doesn't yield the same result. To get
  33. it faster you'll need "and.b d2,d0" where d2=$7F.
  34.  
  35. --
  36.  
  37. Bjoern Reese                   |     Email: breese@imada.ou.dk
  38. Odense University, Denmark     |     Voice: +45 65 932 182 (private)
  39.