Searching \ for '[PIC]: addlw -(.10+1) versus sublw .11' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'addlw -(.10+1) versus sublw .11'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: addlw -(.10+1) versus sublw .11'
2002\01\10@120408 by Simon-Thijs=20de=20Feber?=

flavicon
face
Hello all,

I have found the following piece of code which is
included in a delay routine (delay X cycles (11-256)
by Regulus Berdin ) :

addlw -(.10+1)
addlw -4

can i replace it with

sublw .11
sublw .4

cause as written literally the compiler did no accept
it !


grtz

Simon



__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2002\01\10@131712 by Andrew Warren

flavicon
face
Simon-Thijs de Feber <.....PICLISTKILLspamspam@spam@mitvma.mit.edu> wrote:

> addlw -(.10+1)
> addlw -4
>
> can i replace it with
>
> sublw .11
> sublw .4

Simon:

No, you can't do that.  "ADDLW -11" subtracts 11 from W; "SUBLW 11"
subtracts W from 11.

Instead, you can replace it with:

   addlw .256-(.10+1)    ; or addlw 245
   addlw .256-.4         ; or addlw 252

-Andy

=== Andrew Warren -- aiwspamKILLspamcypress.com
=== Principal Design Engineer
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


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