Searching \ for 'Mid-Range Reference Manual Errors?' 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/index.htm?key=mid+range+reference
Search entire site for: 'Mid-Range Reference Manual Errors?'.

Truncated match.
PICList Thread
'Mid-Range Reference Manual Errors?'
1998\06\07@230601 by Ron Stone

picon face
Hi,

I've been reviewing section 29 (instruction set) of this manual
(DS31029A)) and have found a couple of examples that I don't understand.
Perhaps they're errors, but probably not. On pg. 29-29 (MOVF) Example 1:

MOVF  INDF, 0

Before Instruction
   W=  0x17
   FSR=0xC2
Contents of Address (FSR) = 0x00
After Instruction
   W = 0x17
  FSR= 0xC2
Contents of Address (FSR)= 0x00
 Z=1

Is this correct?  If so, why?  What would happen if the instruction had
been: MOVF  INDF, 1 ?
----------------------------------------------

On pg. 29-36 (RLF) and similarly for 29-37 (RRF) we have Example 2

RLF  INDF,1
Before Instruction
 W= xxxx xxxx
 FSR= 0xC2
 Contents of Address (FSR) = 0011 1010
 C=1
After Instruction
 W= 0x17
 FSR= 0xC2
 Contents of Address (FSR) = 0111 0101
 C=0

A few other cases are given where W starts off as unknown and ends up as
0x17.

My question is why does W become 0x17?

Thanks for your help and please respond direct.

Ron
spam_OUTastoneTakeThisOuTspamerols.com

1998\06\07@233224 by Andrew Warren

face
flavicon
face
Ron Stone <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU> wrote:

> I've been reviewing section 29 (instruction set) of this manual
> (DS31029A)) and have found a couple of examples that I don't understand.
> Perhaps they're errors, but probably not. On pg. 29-29 (MOVF) Example 1:
>
> MOVF  INDF, 0
>
> Before Instruction
>     W=  0x17
>     FSR=0xC2
> Contents of Address (FSR) = 0x00
> After Instruction
>     W = 0x17
>    FSR= 0xC2
> Contents of Address (FSR)= 0x00
>   Z=1
>
> Is this correct?

   No; the result in the manual would be correct after a
   "MOVWF INDF" instruction.  After the "MOVF INDF,0"
   instruction, the results should be:

       W = 0x00
       FSR = 0xC2 (unchanged)
       Contents of Address (FSR) = 0x00 (unchanged)
       Z = 1

> What would happen if the instruction had been: MOVF  INDF, 1 ?

       W = 0x17 (unchanged)
       FSR = 0xC2 (unchanged)
       Contents of Address (FSR) = 0x00 (unchanged)
       Z = 1

{Quote hidden}

   This is also wrong; after the RLF, the results are:

       W = uuuu uuuu (unchanged)
       FSR = 0xC2 (unchanged)
       Contents of Address (FSR) = 0111 0101
       C = 0

   -Andy


=== Andrew Warren - fastfwdspamKILLspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499 (personal)
=== http://www.netcom.com/~fastfwd (business)

1998\06\08@021606 by Dr. Imre Bartfai

flavicon
face
Sorry, it is also unclear for me. However, I think a general response
would be of use.

Thanks in advance.

Imre


On Sun, 7 Jun 1998, Ron Stone wrote:

{Quote hidden}

1998\06\09@051201 by Dwayne Reid

flavicon
face
Hi there Andy.

I think you were slightly wrong in your answer to Ron Stone:

{Quote hidden}

Umm . . . the result in the manual is still wrong: Z would not be 1 if W
contained 0x17 as a result of the instruction.  Nit-picky point but possibly
a source of confusion for someone.

dwayne


Dwayne Reid   <EraseMEdwaynerspam_OUTspamTakeThisOuTplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

1998\06\09@181427 by Andrew Warren

face
flavicon
face
Dwayne Reid <PICLISTspamspam_OUTMITVMA.MIT.EDU> wrote:

> I think you were slightly wrong in your answer to Ron Stone:
> ....
> >> After Instruction
> >>     W = 0x17
> >>    FSR= 0xC2
> >> Contents of Address (FSR)= 0x00
> >>   Z=1
> >>
> >> Is this correct?
> >
> >    No; the result in the manual would be correct after a
> >    "MOVWF INDF" instruction.  After the "MOVF INDF,0"
> >    instruction, the results should be: ....
>
> Umm . . . the result in the manual is still wrong: Z would not be 1 if W
> contained 0x17 as a result of the instruction.  Nit-picky point but
> possibly a source of confusion for someone.

   Dwayne:

   You're right, of course... Sorry for any confusion my error
   might have caused.

   -Andy


=== Andrew Warren - @spam@fastfwdKILLspamspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499 (personal)
=== http://www.netcom.com/~fastfwd (business)

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