Searching \ for 'help Mpasm' 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/language/index.htm?key=asm
Search entire site for: 'help Mpasm'.

Truncated match.
PICList Thread
'help Mpasm'
1999\12\05@124046 by felix centeno

flavicon
face
part 0 844 bytes
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi, Piclisters,</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>What's do the following sentence:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>addlw&nbsp; 0 - 1</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>is in assembler file and i can not understand it</FONT></DIV>
<DIV><FONT size=2><BR></FONT>&nbsp;</DIV></BODY></HTML>

</x-html>

1999\12\05@213215 by Mike Keitz

picon face
On Tue, 7 Sep 1999 10:16:30 -0400 felix centeno <spam_OUTfcentenoTakeThisOuTspamIAMNET.COM>
writes:
> Hi, Piclisters,
>
> What's do the following sentence:
>
> addlw  0 - 1

This adds -1 to W.  -1 in two's complement notation is 0xFF, so you could
use "addlw h'0ff'" instead.  I've had some (I think very old) versions of
MPASM not process 'addlw -1' correctly.  So using the 0 - 1 construction
is safer.

After the instruction executes, the value in W will be 1 less than it was
before.  Consider it a "decrement W" operation.  It will also roll under
from 00 to 0xFF.  The Z flag will be set if the new value of W is zero.
The C flag will be set if the old value of W was not zero.  Or, you could
say that the C flag will be clear only if the new value of W is 0xFF.
The DC flag is also affected.




___________________________________________________________________
Why pay more to get Web access?
Try Juno for FREE -- then it's just $9.95/month if you act NOW!
Get your free software today: dl.http://www.juno.com/dynoget/tagj.

1999\12\06@030550 by Dr. Imre Bartfai

flavicon
face
Hi,

it subtracts one from the actual content of W, as the famous SUBLW
instruction does the opposite (subtracts W from literal). It is a trick
how to realize subtraction from W as normal in other processors.

I hope this helps.

Regards,
Imre


On Tue, 7 Sep 1999, felix centeno wrote:

{Quote hidden}

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