This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Code size

Hi everyone,

I recently switched to programming 8052 from PICs for curiosity sake, and MY GOD...!!! those have the speed. they are simple simple but brutal (this is just my experience). but I was baffled about some issues regarding the memory usage... as an argument, if 8052 poses larger assembly instruction set, it should mean that the code it generates should be lesser compared to PICs. Don't know whether its the compiler but I feel the code can be much lesser than what is usually given via Keil. recently I stumbled upon a mysterious situation, I was using the delay.h header and when I tried pass a variable from source file to my own header file which passed it then to delay.h via _delay_ms(XXX) the code size was 69% of 8052's capacity, when I replaced those XXX (or variable) with constant ie. _delay_ms(100) the code shrunk to 20%.

Any idea..?

Many Thanks