Hi Dave, > I was away for a while, but I am now back. Don't matter, nobody knew >me...:( We're glad you're back anyways... > I am back because I need your help. I have an ASM file that contains: > > sublw .3 > >and it is not working properly. When I am replacing it with addlw 0xFD, >everything is working! I though the assembler was translating a sublw >into the right addlw?! Is it the same opcode? Dmitry answered your question. >Another BIG problem: > > I am reading a byte 0xAD in EEPROM, with: > >EEREAD bsf STATUS,RP0 > bsf EECON1,RD > bcf STATUS,RP0 > movf EEDATA,w > return > > >In my main program I am doing the following code: > > call EEREAD > btfsc w,2 > goto OK > .... >OK "Send to LCD that I have been here" The problem is, you aren't "btfsc w,2" - you are actually executing: btfsc INDF, 2 "w" is evaluated to Zero in MPASM and Register Zero is actually "INDF" (the register pointed to by FSR. In this case, you can either use the working code exchange: btfsc w,2 with andlw 4 ; Isolate Bit 2 btfss STATUS, Z But, I would stick with the working example (not only is it easier to understand, but it doesn't change the value in "w"). Good luck, myke PICList Etiquette at: http://www.myke.com/piclist