We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hallo, now I have another serius problem. For your information, I use: Cx51 Ver 7.06 Philips / 89C669 An expression which involves a far variable does not produce correct result. Here is my test program:
#include <Philips\reg51m.h> unsigned int result ; unsigned int v = 25 ; far unsigned int v2 = 25 ; unsigned int f1 (unsigned char N) { return((v * N * 2) + (v / 10)) ; } unsigned int f2 (unsigned char N) { return((v2 * N * 2) + (v2 / 10)) ; } void main () { result = f1(0) ;// expected 2 result = f1(1) ;// expected 52 result = f1(2) ;// expected 102 result = f2(0) ;// expected 2 (received 2) result = f2(1) ;// expected 52 (received 2) result = f2(2) ;// expected 102 (received 2) }