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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/04/03 10:31
Read: times


 
#52056 - RE: data pointer
Responding to: ???'s previous message
yes please go through the tutorials.... its quite exhaustive material .... clearing all your doubts ....
well
DPTR holds the data address and thus pointer to data and hence data pointer , DPTR....
by the way DPTR can also be used as a temporary 16 bit register for some intermediate calculations ....

@DPTR is used for accessing the contents of the data memory pointed by the DPTR ....

for example

mov dph, #01h
mov dpl, #00h ; sets the DPTR to point to 100h
mov acc, #00h ; some arbitrary value in accumulator
movx @dptr, a ; transfers the contents of acc into the location 100h

to read the contents of the location pointed to by DPTR

movx a, @dptr ; fills the acc with the contents of 100h

hope this will clear some of your doubts

to all
i have a small one line doubt (which might run into a few)
in assembly we fill DPTR in two steps ... loading dpl and then dph
in "keil c" we can directly load the 16 bit value ... is there any way that we can use a command like
mov dptr, #<16 bit value>
asking this because i never came across such a command in any of the 4 books that i referred " janice mazidi" "kenneth ayala" "jan axelson" "myke predko"
just a thought

thanks in advance


List of 8 messages in thread
TopicAuthorDate
data pointer            01/01/70 00:00      
   RE: data pointer            01/01/70 00:00      
      RE: data pointer            01/01/70 00:00      
         RE: data pointer            01/01/70 00:00      
   RE: data pointer            01/01/70 00:00      
      RE: data pointer            01/01/70 00:00      
      RE: data pointer -Nitin            01/01/70 00:00      
         RE: data pointer -Nitin            01/01/70 00:00      

Back to Subject List