Jump to content

jiv

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jiv

  • Rank
    Newbrie
  1. I am testing C2C and trying to develop an interrupt-driven routine with several different interrupt sources. In the interrupt routine, to identify the interrupt source I have the following code line : ;;;;;;;;#define TXIE 0x04 ;;;;;;;;#define T0IF 0x02 ;;;;;;;;#define TXIF 0x04 ;;;;;;;;#define PIE1 0x8C ....... ;;;;;;;;if (((INTCON & TXIF) != 0) && ((PIE1 & TXIE) != 0)) which is compiled as : movf INTCON, W andlw D'4' andlw 0xFF andlw 0xFF btfsc STATUS, Z goto label_0003 movlw D'4' andlw 0xFF andlw 0xFF btfsc STATUS, Z goto label_0003 movlw 1 label_0003 sublw 0 btfsc STATUS, Z goto label_0002 (label_0002 is the "else" address) I think that this code is erroneous (PIE1 address (0x8C) does not even appear in the code). Am I right ? Am I missing something ? Can I trust C2C ? Thanks ! Joan
  2. Is there any explanation to the fact that : ;;;;;;;;if ((INTCON & T0IF) != 0) is compiled as : movf INTCON, W andlw D'2' andlw 0xFF
×