When is this loop going to finish? You have endless loop with while(1), so your program never ends. Anyway, it will not give any output. I tried to compile it under gcc and there is not a problem with it. What is exactly your problem? Comiplation error or something else?
Sorry, I am using Keil compiler to simulate my code. You can download the compiler from..
**broken link removed**
After you download and install the compiler try and use the "C Structure" code that i prepare inside the zip file.
the compiler show the 4 error message:
1) syntax error near 'code'
2) syntax error near '{'
3) syntax error near '}'
4) left side of '.' requires struct/union
after ignore the code from the structure then there are no errors occur.
The "code" is one of the physical location of the memory spaces on the chip. So i prefer the time and dly variable is state on the code memory location.
everything is ok. You are using unnamed structure with tag code, but since this is a reserved word in Keil, the compilation fails. You can see this in theri editor where the word code is in blue color, meaning that it is reserverd word. So again, why you have to use this word?
Thank you very much for your kindly help for so long. I get the solution already. I play around with the code, i put the word before the nxt[] array then it will work finely. I think is the compiler itself declaration pattern.
You can try my Keil compiler. While you remove the "code" the data will increase to 14 data because our nxt[] array total got 14 elements but if the "code" is there, so the data size will remain the same size as 11 data according with the whole program. Because of the Microcontroller (data) RAM size is limited so need to shift the data to code.