Bo, The ".inc" file associated with the chip will define W = 0 and F = 1 so you can use these letters instead of the numbers which just makes it a bit easier to remember. ie: ADDWF val, F will add the contents of W with the contents of the file register "val" and put the result in "val" whereas ADDWF val, W will do the same but put the result in the W register. If you don't put either W or F the assembler will give a warning ("Using default destination of 1 (file)") and default to the F register. R/- Grant On Sun, Mar 28, 2010 at 11:46 AM, Bo Dirigo wrote: > While studying various PIC instructions' formats, I noticed a number of > instructions that had a 'd' (destination) in the Mnemonic; e.g., MOVF > f,d; ADDWF f,d; INCF f,d, et al. > > If d=0, the results are stored in the W register - ADDWF FSR, 0 > If d=1, the results are stored in the f register - ADDWF FSR, 1 > > My question is "Do you need to specify the "0" value if one knows they > want the resultant value to be stored in the W register?" Obviously, if > one wants the result to be stored in the f register, they must specify > the "1" value. I'm probably all wet here, but was thinking perhaps the > assembler would automatically default to the "0" value if nothing > specified. Before you shoot me, I am in agreement it would be better to > specify either a "0" or "1" depending on what it is one wants done. I'm > just curious. > > Bo Dirigo > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist