> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf > Of alan smith > Sent: 08 December 2006 20:31 > To: Microcontroller discussion list - Public. > Subject: [PIC] movwf vs movff > > > Running under the simulation mode....18F family > > movlw .3 > movwf storageReg > > vs > > movlw .3 > movff WREG,storageReg > > In the first case, while viewing in the watch window, > storageReg never gets the value. > Second case, it does. > > Any clues why this might be? where is storageReg located? iirc mpasm defaults to access bank operations (which don't require setting of the BSR but only allow access to the first 128 bytes of memory and the special function registers) when you don't specify the thirc parameter. (and yes this is the opposite of what the pics datasheet says) movff otoh allows direct access to stuff in any bank without having to use the BSR. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist