Trouble Learning C code in FLowcode
Posted: Wed Sep 12, 2007 3:58 pm
I am new to C++ and I am trying to learn it using FLOWCODE.
I wrote a short program to add 4+4 in C and display it using FLOWCODE. This is the end of the program.
//Initialisation
//Interrupt initialisation code
option_reg = 0xC0;
//C Code
//C Code:
FCV_RE = 4 + 4 ;
//Output
//Output: RE -> PORT A
trisa = 0x00;
porta = FCV_RE;
mainendloop: goto mainendloop;
}
I wrote a similiar program using the FLOWCODE calculation box and the only difference was
//dan
//Calculation:
// RE = 4 + 4
FCV_RE = 4 + 4 ;
To my eye, the C code generated is identical yet the output to PORTA is different. Am I missing something.
Thanks for any help.
Regards,
Daniel Pollit
Toronto, Canada
I wrote a short program to add 4+4 in C and display it using FLOWCODE. This is the end of the program.
//Initialisation
//Interrupt initialisation code
option_reg = 0xC0;
//C Code
//C Code:
FCV_RE = 4 + 4 ;
//Output
//Output: RE -> PORT A
trisa = 0x00;
porta = FCV_RE;
mainendloop: goto mainendloop;
}
I wrote a similiar program using the FLOWCODE calculation box and the only difference was
//dan
//Calculation:
// RE = 4 + 4
FCV_RE = 4 + 4 ;
To my eye, the C code generated is identical yet the output to PORTA is different. Am I missing something.
Thanks for any help.
Regards,
Daniel Pollit
Toronto, Canada