??? 10/21/10 04:31 Modified: 10/21/10 05:55 Read: times Msg Score: -2 -2 Answer is Wrong |
#179224 - Are you using the limited version of KEIL? the for loop.... Responding to: ???'s previous message |
I mean all you're trying to do is make an LED go on and off. The simplest explanation that comes to mind is that you're new to KEIL and have not realized that they offset their starting point in the "evaluation" or "limited" version. As shown here:
http://www.keil.com/demo/limits.asp Programs start at offset 0x0800. Programs generated with the evaluation software may not be programmed into single-chip devices with less than 2 Kbytes of on-chip ROM. The second obvious portion is that you could be optimizing which I bet is doubtful. Plus I have never seen a for loop written in this manner: for (i = 0x01; i; i <<= 1) i is instantiated as 0x01, the for loop never compares or just makes sure i is 1? isn't supposed to be "i < 0x80" in the middle? for (i = 0x80; i; i >>= 1) and "i > 0x01" in the middle? If i never satisfies a condition the for loop never stops and last I checked I did not think i was a condition. Well the i condition is more like -> i is not 0. I do not have enough eyes to see what you're doing with your i's! |