Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/26/01 19:12
Read: times


 
#18105 - Can I change a definite byte in run mod?
Hi All.

I'm using the definite byte (DB) Instruction. example:

ONE: DB B7H

After that, I'm accesing this data using the DPTR, with the following code, I'm moving the B7H to the Accumulator:

MOV DPTR,#ONE
CLR A
MOVC A,@A+DPTR

Then I need to do some data manipulation, as an example:

MOV A,A+R0

Finally I want to replace the result on the DB (the DPTR is still pointing to #ONE) so I tried

MOV DPTR,A

But this doesn't work.

The purpose of this is to keep the A result on the DB address (one) after every cpu reset.

I'm using an AT89C51 MCU
a x8051 assembler
and the avsim51 simulator.

Can you help me?

Regards.
Carlos.



List of 5 messages in thread
TopicAuthorDate
Can I change a definite byte in run mod?            01/01/70 00:00      
RE: Can I change a definite byte in run mod?            01/01/70 00:00      
RE: Can I change a definite byte in run mod?            01/01/70 00:00      
RE: Can I change a definite byte in run mod?            01/01/70 00:00      
RE: Can I change a definite byte in run mod?            01/01/70 00:00      

Back to Subject List