SECTION III-3: ALU Instructions Using Both WREG and FileReg

 

WREG, FileReg and ALU in PIC18
wreg-filereg-alu-pic18.jpg

 

The instructions in table below operate on both WREG and a file register location and then give you the option of placing the result in WREG or a file register location. 

 

ALU Instructions Using Both WREG and fileReg
alu-instructions-wreg-filereg.jpg

 

The d bit selects the destination for the operation. If d = w; the result is stored in WREG (d = 0). If d = F; the result is stored in the fileReg (d = 1). The default is F. That means "ADDWF myfile" is the same as "ADDWF myfile, F"

More From Iamtechnical.com

Advertisement: