??? 09/20/07 05:37 Read: times |
#144807 - Good idea, bad example Responding to: ???'s previous message |
Richard said:
Now, consider that you have seven inputs, hypothetically, of course, and they're left-justifed on P1. You have a table, called JTBL, containing 128 addresses, each corresponding to a value that can occur on P1. Many of these input "states" might require the same action. Nonetheless, a specific response is provided in this table, for each possible input state.
STP1: Load DPTR with JTBL. Now load A with P1, then LJMP @A+DPTR Hi Richard, The technique you describe is valid and useful. However, the implementation you have suggested is flawed in multiple ways and very likely to confuse a novice. For the benefit of those who might take what you have given here at face value, could you find the time to implement an example that demonstrates the technique, debug it, and post a complete program that will actually work? -- Russ |