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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/09/01 08:02
Read: times


 
#8003 - RE: [ACCESSING TABLES]
Make use the datapointer (16-bit) DPTR.
First let it point to the first byte
you wish to send. and with the "inc DPTR" you can jump to the next byte in your table.

ex.
MOV DPTR,#BTRST
MOVX A,@DPTR
INC DPTR
MOV A,@DPTR


MOV DPTR,#BTRST ;puts address of first byte into the datapointer With

MOV A,@DPTR ;moves the contents of the memory addres pointed to by the DPTR, into the accumulator.

INC DPTR ; increases the dptr so it will point to the next byte in your table.

MOV A,@DPTR ; etc, etc.


Of course you als can dot it on the following way :


MOV DPTR,#BTRST ;copy addres of table
CLR A ;clear offset
MOV R0,@A+DPTR ;copy first byte

INC A ;increment offset
MOV R0,@A+DPTR ;copy second byte
etc. etc.

Hope i have helped you







List of 5 messages in thread
TopicAuthorDate
[ACCESSING TABLES]            01/01/70 00:00      
RE: [ACCESSING TABLES]            01/01/70 00:00      
RE: [ACCESSING TABLES]            01/01/70 00:00      
RE: [ACCESSING TABLES]            01/01/70 00:00      
RE: [ACCESSING TABLES]            01/01/70 00:00      

Back to Subject List