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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/15/08 07:53
Read: times


 
#160045 - DPTR Is Just Fine
Responding to: ???'s previous message
You say that you have a doubt about the DPTR and its inability to be decremented. Let me comment that in fact the DPTR can decreased by a value of one. It just takes a short sequence of instructions operating on DPH and DPL as opposed to a single opcode.

Historically keep in mind that the 8051 instruction set was devised a loooooonnng time ago when the transistor count on a chip was decidedly more expensive than it is today. The internal structure of the 8051 had already a 16-bit incrementer logic to deal with stepping the PC (Program Counter) ahead through the program space. The 16-bit incrementer was probably dual purposed to support the INC DPTR instruction as well.

You can use instead:
- Re organize your code and data storage so DPTR uses an increasing index...
- Re design your code to utilize the common @Rn type of addressing.
- Work out a short instruction sequence to decrement the DPTR.

Michael Karas





List of 3 messages in thread
TopicAuthorDate
Doubt on DPTR            01/01/70 00:00      
   DPTR Is Just Fine            01/01/70 00:00      
   Some can! [edited]            01/01/70 00:00      

Back to Subject List