home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / m68k / 1331 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  1.7 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!yale.edu!ira.uka.de!gmd.de!Germany.EU.net!mcsun!corton!loria!loria.crin.fr!eker
  2. From: eker@loria.crin.fr (Steven Eker)
  3. Newsgroups: comp.sys.m68k
  4. Subject: Re: 68000, Fast 14 Bit Shift?
  5. Message-ID: <568@muller.loria.fr>
  6. Date: 6 Nov 92 08:56:20 GMT
  7. References: <memo.723415@cix.compulink.co.uk>
  8. Sender: news@news.loria.fr
  9. Organization: CRIN (CNRS) Nancy - INRIA Lorraine
  10. Lines: 30
  11.  
  12. In article <memo.723415@cix.compulink.co.uk>, apelled@cix.compulink.co.uk (Adam Pelled) writes:
  13.  
  14. |> 
  15. |> >   suba.l  a2,a2       ; clear extracted count
  16. |> 
  17. |>             That's a neat trick :-)
  18.  
  19. Why the smiley? how else can you clear an address reg?
  20.  
  21. |> >   move.b  (a3)+,d0            ; encoded line length (first byte)
  22. |> >   move.b  table(pc,d0.w),d0   ; decoded line length (can't be -ve!)
  23. |> >   adda.w  d0,a2               ; number of bytes extracted (flags not changed)
  24. |> 
  25. |>             Why do you do add.w ? Surely the file could be >65K. i know
  26. |>             d0 is word size, but you still need all 32 bits ??. e.g if
  27. |>             a2 has $0000EFFF and you add 2 bytes as a word you'll lose the
  28. |>             carry.
  29.  
  30. No, adda.w does a 32bit add, using the sign extended source and the whole of the
  31. destination address register.
  32.  
  33. |>     Thanks for the tips. i'll use them in my code if you don't mind. As Tom
  34. |> Lane pointed out to me in mail; this problem is i/o bound and so there is
  35. |> little point in optimising the code.
  36.  
  37. I wondered about this but it depends whether you're decoding from floppy, hard
  38. diskor RAM disk. If you don't need efficiency, don't in code asm in the first place - unless like me you consider optimising asm as a substitute for
  39. crossword puzzles :-)
  40.  
  41. Steven
  42.