??? 09/21/07 01:51 Read: times |
#144858 - Here's what's confusing Responding to: ???'s previous message |
Richard said:
Perhaps I'll understand better what you want if you tell me what you find confusing. Okay, I can do that. First of all, your use of DPTR, P1, A, and LJMP @A+DPTR in your example--along with your little three-line description of how it works--all suggest very strongly that you were giving an actual 8051 implementation and not some generalized description of the technique. Secondly, you stated that your table contained "128 addresses, each corresponding to a value that can occur on P1." That simply won't work with the three-line implementation you gave. Finally, a complete, properly commented, working example would make it crystal clear why the 7-bit input vector needs to be left justified in the accumulator. You hinted at this in what Jan called a "misty" way, but a novice might well miss the point and have a merry old time trying to figure it out. As both Jan and I have already stated, none of this is a big deal for an expert who already knows what you are talking about and who understands the 8051 instructions completely. But for the folks who don't, and who might therefore be inclined take your incorrect description at face value, I think an accurate example would be very helpful. -- Russ |