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

How to use movc in keil?

Hi,
Using at89c51 i want some data to copy from program memory to external Data memory..
without using memcopy()...
any idea ?

Parents
  • OK. Now I know where I'm getting confused. You're right about the read/mod/write.

    The P2 problem I'm thinking of arises not when you increment, rather when you push P2...which is the case when you may have interrupt routines that want to use P2-R0/R1 for xdata and you wish to preserve.

    In this case, PUSH P2 doesn't cut it. You have to keep an image of P2 and push that instead. This, then, means that all forground use of P2 must keep the P2 image in sync.

    (I hope I'm remembering this correctly. I don't have the problem in front of me but I recall it biting me in the ass years ago)

Reply
  • OK. Now I know where I'm getting confused. You're right about the read/mod/write.

    The P2 problem I'm thinking of arises not when you increment, rather when you push P2...which is the case when you may have interrupt routines that want to use P2-R0/R1 for xdata and you wish to preserve.

    In this case, PUSH P2 doesn't cut it. You have to keep an image of P2 and push that instead. This, then, means that all forground use of P2 must keep the P2 image in sync.

    (I hope I'm remembering this correctly. I don't have the problem in front of me but I recall it biting me in the ass years ago)

Children