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 !
But you're using _WWORD - the OP said he was using WWORD (no undrescore)
i meant _WWORD , sorry
Which goes to show why you should never manually type code into a post - always copy & paste from the real source!
Otherwise you just waste everybody's time debugging your posting typos!