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

Using the function WWORD when simulating with keil uvision 4

Hi , im trying to simulate some peripherals for mi c51 application , but i have the following problem :

One of these peripherals needs to write several positions of the external memory of the C51 , im using the function WWORD ( but the same applies to RWORD when i want to read external memory)

if i use :

WWORD ( X: 0003 , WordToCopy) ; the vlaue of WordToCopy its written on the direccion 0x0003 from the external memory

now if i do :

buffer = 0x0003;
WWORD (X:buffer , WordToCopy);

or

buffer = X:0x0003:
WWORD(buffer , WordToCopy);

in bot cases WordToCopy its written in the address 0x0003 of the internal ram in this case its the register r3 , and r4

My question is , how can i write external memory without having to write address by addres ( i wanted to use this variable buffer inside a for , changing its value , since i have to write lots of bytes)

Thanks for the help !

0