| ??? 07/31/02 17:17 Read: times |
#26567 - what's wrong with this code |
hi
i am trying to access variables in C and Assembly code. could some body tell me what's wrong with this code. tempa is a variables whcih i want to access in assembly. i set the variable in assembly but back in C it i think it does not has the same value. i am using sdcc.sourceforge.net's free C compiler to compile this code. it does compile the code well but running in simulator does not shows what is being expected. #include <reg51.h> data unsigned char tempa; main() { int a; unsigned char zz; while(1) { _asm mov _tempa,200 _endasm; P1 = tempa; for(a=0;a<100;a++); _asm mov _tempa,0 _endasm; P1 = tempa; for(a=0;a<100;a++); } } |
| Topic | Author | Date |
| what's wrong with this code | 01/01/70 00:00 | |
| RE: what's wrong with this code | 01/01/70 00:00 | |
| RE: thanks henry | 01/01/70 00:00 | |
RE: what's wrong with this code | 01/01/70 00:00 |



