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

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!ornl!sunova!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!news.funet.fi!funic!nntp.hut.fi!nntp!jraja
  3. From: jraja@vipunen.hut.fi (Jarno Tapio Rajahalme)
  4. Subject: Re: Improved ByteRun algorithm for programmers.
  5. In-Reply-To: pochanay@cae.wisc.edu's message of 8 Dec 92 12:27:57 CST
  6. Message-ID: <JRAJA.92Dec13191720@vipunen.hut.fi>
  7. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  8. Nntp-Posting-Host: vipunen.hut.fi
  9. Organization: Helsinki University of Technology, Finland
  10. References: <1992Dec8.122757.27543@doug.cae.wisc.edu>
  11. Date: 13 Dec 92 19:17:20
  12. Lines: 40
  13.  
  14. In article <1992Dec8.122757.27543@doug.cae.wisc.edu> pochanay@cae.wisc.edu (Adisak Pochanayon) writes:
  15.  
  16.    *********************************
  17.  
  18.    upb_startit
  19.          moveq.l   #0,d0          ; Require to clear MSB of d0 for dbf loops
  20.                       ; Which is $FF after dbf loops
  21.  
  22.          move.b    (a0)+,d0       ; Load byte-tag into d0 and test byte-tag
  23.  
  24.          beq.s     upb_out        ; Zero -> quit
  25.  
  26.          bmi.s     upb_copyit     ; Negative -> COPY bytes literally
  27.  
  28.                       ; Else Repeat a byte (Positive)
  29.  
  30.    *********************************
  31.  
  32. This would be even faster if you exhanged the order of the beq.s and
  33. bmi.s, because there will be only one zero anyway. So don't dother to
  34. check for it too early.
  35.  
  36.    upb_copyit
  37.          bclr.b    d2,d0          ; Clear bit seven in d0
  38.  
  39. Wouldn't standard neg.b be faster than bclr.b ? 
  40.  
  41.     I am also surprised that no one has asked me about the infinite scroll
  42.    window method I had talked about earlier.
  43.  
  44. Tell me, I'm curious :-)
  45.  
  46.  
  47.     Jarno
  48. -- 
  49. -----------------------------------------------------------------------------
  50. | Address: Jarno Rajahalme            | EMail:                              |
  51. |          Servin Maijan tie 12 H 111 |   Jarno.Rajahalme@hut.fi            |
  52. |          02150  ESPOO, FINLAND      | tel: +358 0 468 2891                |
  53. -----------------------------------------------------------------------------
  54.