??? 10/30/03 14:54 Read: times |
#57515 - RE: More on DIP Switch Code Responding to: ???'s previous message |
Erik:
Sure I agree that AJMP or SJMP is quite useful in such a table. Particularly when, as you point out, that the "cases" of a routine that does this kind of decoding are usually small bits of code and close by in terms of program counter distance. This does also allow the index to be computed with a simple ... RL A ... instruction. I always tend to like to write programs in a manner that makes the resulting code the most generic in terms of ability to cut/paste to next project. In this consideration the use of the MUL instruction (which takes only 4 bus cycles anyway) is of little performance hit. Of course we all encounter the need to do things different when a performance bottle neck arises. Then you have to code in a way where either..... A) You struggle to reduce the number of bytes used. or B) You contemplate the fastest execution speed. (Note that very often A and B above end up working together on an 8051 architecture as every byte in a code stream does relate quite closely to execution speed). Michael Karas |
Topic | Author | Date |
More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code![]() | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 | |
RE: More on DIP Switch Code | 01/01/70 00:00 |