Hi everybody I want to test the speed of my algorithm. I'm setting the values in asm, and doing the printf and defining my array in C to get a valid register value. I want the array to be in memory. But when I change a value in asm, the values of array in C does not change. Here is my code:
asm code: mov a,#11 ...
C code: static char polyside[20] asm("a")={0}; printf_xy(10,10,"%d",polyside[0]); ...
and it dosen't show up in the print function. Can somebody show me how to do this?Thx
Visual C++ is an entirely different compiler for an entirely different target architecture - any "optimisation" you do on this will almost certainly be irrelevant to any 8051-based target - and possibly even counter-productive!
You can use it to test that your algorithms produce correct results, but it will tell you absolutely nothing about your target's performance.
There is no point in even thinking about optimisation here!
"i Want to make all dificult jobs on the POC and then move working code to the board."
Your most difficult job in that approach is likely to be re-writing code that worked in VC into something appropriate to an 8051!
A far better approach, if you must start with simulation, would be to use the uVision simulator or perhaps some 3rd-party simulator that actually simulates an 8051
yeuch
Sorry, but optimisation and portability are almost always mutually exclusive!