Hello Sean & PIC.ers,
w won't be changed, but for the future be advised
that the much-under-rated MPSIM part of MPLAB is extremely
useful for answering these queries.
This *really* starts to matter when you get to 16bit manipulation,
arithmetic & the like.
Just write a very small stretch of code, including your target sequence.
Load the watch window with relevant fregisters,
compile..run..edit initial conditions..compile..run..edit etc, etc,
This might not seem very scientific, but can rescue your sanity.
{Quote hidden}>Date: Mon, 14 Jan 2002 15:18:34 +1100
>From: Sean Alcorn - Avion Sydney <
.....sdalcornKILLspam
@spam@AVION.COM.AU>
>Subject: [PIC]: W Register
>
>Hi Guys,
>
>Another simple question (I am sure) from a Newbie, but I have searched and
>can not find an answer anywhere. Probably scanned passed it a dozen times,
I
>am sure!
>
>If I use any byte instruction and place the result back into the file, is
my
{Quote hidden}>W register cleared or does it maintain it's original value for further use?
>
>Example;
>
>MOVF GPIO, W ; Read Port
>ANDLW B'00000111' ; Mask out unwanted bits & store in W
>IORWF TEST1, F ; Store result original TEST1 file AND masked GPIO
>MOVF CHECK ; Store masked version of GPIO
>
>Can this be done?
>
>Regards,
>
>Sean
>
bestos, John
e-mail from the desk of John Sanderson, JS Controls.
Snailmail: PO Box 1887, Boksburg 1460, Rep. of South Africa.
Tel/fax: Johannesburg 893 4154
Cellphone no: 082 741 6275
email: jsand
KILLspampixie.co.za
Manufacturer & purveyor of laboratory force testing apparatus, and related
products and services.
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.