home *** CD-ROM | disk | FTP | other *** search
- 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
- From: eker@loria.crin.fr (Steven Eker)
- Newsgroups: comp.sys.m68k
- Subject: Re: 68000, Fast 14 Bit Shift?
- Message-ID: <568@muller.loria.fr>
- Date: 6 Nov 92 08:56:20 GMT
- References: <memo.723415@cix.compulink.co.uk>
- Sender: news@news.loria.fr
- Organization: CRIN (CNRS) Nancy - INRIA Lorraine
- Lines: 30
-
- In article <memo.723415@cix.compulink.co.uk>, apelled@cix.compulink.co.uk (Adam Pelled) writes:
-
- |>
- |> > suba.l a2,a2 ; clear extracted count
- |>
- |> That's a neat trick :-)
-
- Why the smiley? how else can you clear an address reg?
-
- |> > move.b (a3)+,d0 ; encoded line length (first byte)
- |> > move.b table(pc,d0.w),d0 ; decoded line length (can't be -ve!)
- |> > adda.w d0,a2 ; number of bytes extracted (flags not changed)
- |>
- |> Why do you do add.w ? Surely the file could be >65K. i know
- |> d0 is word size, but you still need all 32 bits ??. e.g if
- |> a2 has $0000EFFF and you add 2 bytes as a word you'll lose the
- |> carry.
-
- No, adda.w does a 32bit add, using the sign extended source and the whole of the
- destination address register.
-
- |> Thanks for the tips. i'll use them in my code if you don't mind. As Tom
- |> Lane pointed out to me in mail; this problem is i/o bound and so there is
- |> little point in optimising the code.
-
- I wondered about this but it depends whether you're decoding from floppy, hard
- 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
- crossword puzzles :-)
-
- Steven
-