The Elektor Forum will close. See also this link. From Friday March 1st it is no longer possible to log in to the forum. However, the content of the forum will remain visible until the end of March. As of April 1st the forum will definitely go off the air.

programming in assembly

An Elektor Distance Learning Course

Postby jno » Wed May 09, 2012 12:00 am

i don't undertand what difference between these two expressions

movf x , 0
movf x, 1
jno
 
Posts: 7
Joined: Thu Jan 02, 2014 10:49 am

Postby geenbert » Wed May 09, 2012 12:00 am

The 0 and 1 is the destination bit that tells the microcontroller where to move x to.

The statement movf x,0 (destination bit 0) moves the content of x into the working register (W).

The statement movf x,1 (destination bit 1) moves the content of x into x. Since it was already there that seems rather pointless, but the purpose is to set the zero flag. This flag may be used in logical operations.
geenbert
 
Posts: 83
Joined: Thu Jan 02, 2014 10:41 am


Return to Programming Embedded PIC Microcontrollers using Assembly, C and Flowcode

Who is online

Users browsing this forum: No registered users and 1 guest