Searching \ for 'Polynomial ?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'Polynomial ?'.

Truncated match.
PICList Thread
'Polynomial ?'
2000\05\18@211030 by mark


Is there a way to reduce the size of this routine ?

Polynomial  = x0 + x12 + x17

x0 is in "data" bit_0
x12 is in "mid" bit_3
x17 is in "old" bit_0

               rlf     mid,w        ; x12 in w bit_4
               movwf   temp         ; x12 in temp bit_4
               swapf   temp,w       ; x12 in w bit_0
               xorwf   old,w        ; x12 + x17 in w bit_0
               xorwf   data,w       ; x0 + x12 + x17 in w bit_0
               movwf   temp
               rrf     temp,f       ; x0 in Carry

               rlf     new,f        ; x0 to bit_0
               rlf     mid,f        ; Updates x12
               rlf     old,f        ; Updates x17

Thanks for your help.

Marcelo Puhl
Get paid to surf the WEB !
Ganhe dinheiro enquanto surfa na Internet !

2000\05\19@065221 by Scott Dattalo

On Thu, 18 May 2000, Marcelo Puhl wrote:

> Hi,
> Is there a way to reduce the size of this routine ?


{Quote hidden}

how 'bout

  rrf    data,w
  rlf    new,f     ;copy data.0
  rlf    mid,f     ;2nd part of 24bit shl

  swapf  mid,w     ;get mid.4 (originally mid.3)
  xorwf  old,w     ;xor'd with old.0
  rlf    old,f     ;complete the 24bit shift

  andlw  1         ;add old.0^mid.3
  xorlw new,f      ;to new.0

Saves a couple of cycles


More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...