home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!mcsun!sunic!dkuug!imada!news
- From: breese@monet.imada.ou.dk (Bjoern Reese)
- Subject: Re: Improved ByteRun algorithm for programmers.
- Message-ID: <1992Dec14.160749.21777@imada.ou.dk>
- Sender: news@imada.ou.dk (USENET News System)
- Organization: Dept. of Math. & Computer Science, Odense University, Denmark
- References: <JRAJA.92Dec13191720@vipunen.hut.fi>
- Date: Mon, 14 Dec 1992 16:07:49 GMT
- Lines: 29
-
- In article <JRAJA.92Dec13191720@vipunen.hut.fi> jraja@vipunen.hut.fi (Jarno
- Tapio Rajahalme) writes:
- > In article <1992Dec8.122757.27543@doug.cae.wisc.edu> pochanay@cae.wisc.edu
- (Adisak Pochanayon) writes:
- >
- >> upb_copyit
- >> bclr.b d2,d0 ; Clear bit seven in d0
- >
- > Wouldn't standard neg.b be faster than bclr.b ?
-
- Yes it would, but unfortunately it wouldn't give the same result.
- neg.b does a 2-complementary negation while bclr.b just clears a
- single bit.
-
- A little example (where bclr clears bit #7 as it does in the
- ByteRun program.)
-
- original: %10011010
-
- neg.b: %01100110
- bclr.b: %00011010
-
- Clearly neg.b and bclr.b doesn't yield the same result. To get
- it faster you'll need "and.b d2,d0" where d2=$7F.
-
- --
-
- Bjoern Reese | Email: breese@imada.ou.dk
- Odense University, Denmark | Voice: +45 65 932 182 (private)
-