> Since I dont have my target hardware here, I write and test the code in > the simulation mode. I thought, having a #define would work to set a > value for a variable but it doesn't seem to be working. For example > > #define farf d'5' > > when I go do a > > movff farf,test > > test just gets 0x00 > > So i did > > movf farf,w > > and WREG gets zero (least its consistant) > > I'll try it again when I have hardware to watch in the debugger, but > curious is it because there really isnt hardware, the #define doesn't > store? Figured it would just stick it in ram someplace It looks like you're putting the contents of location 5 into test and into w. If you want to put a 5 in test or w, do something like this: movlw farf movwf test Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist