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

Movx command in Keil

Hello all,
I'm using Keil uVision2 Version 7.05, and everything seems to be OK. However, there is one thing I don't quite understand, thus I'm posting here asking for your ideas/opinions.
When I run "Hello" example in Keil\Example directory and I found something that puzzled me. The assembly code Keil generated in Disamsembly window as well as in list file always have MOVX command eventhough I don't use external ram at all. I did set memory model to small and I only use IDATA but it still does the same. I even use disamsembler to translate the hex file Keil generated back to assembly source and still get the same result. Can someone spend some times explain this for me? Any inputs would be greatly appreciated. Have a nice weekend.

Best Regards,
T.L

Parents
  • Wow!!!!
    I tried the puts instead of printf as Dan said, and the code went from 1186 bytes down to 251 bytes. It's amazing.
    One more question here forks: Is there any penalty for doing this? Because I see the "Hello World" print out on the screen seem to be a little bit slower than using printf. Is it just my feeling or it's something else that I don't know of?
    Thank you all.
    Best Regards,
    T.L

Reply
  • Wow!!!!
    I tried the puts instead of printf as Dan said, and the code went from 1186 bytes down to 251 bytes. It's amazing.
    One more question here forks: Is there any penalty for doing this? Because I see the "Hello World" print out on the screen seem to be a little bit slower than using printf. Is it just my feeling or it's something else that I don't know of?
    Thank you all.
    Best Regards,
    T.L

Children