| ??? 10/29/03 07:21 Read: times |
#57424 - RE: JMP @A+DPTR instruction could help Responding to: ???'s previous message |
"you could use 'JMP @A+DPTR' instruction"
Which would mean that A has the P2 value and DPTR is initialized properly. Another way would be this - ( first Move P2 to A ) cjne A, #NXTCHK_1 jmp ROUTINE_1 NXTXHK_1: cjne A, #NXTCHK_2 jmp ROUTINE_2 NXTCHK_2: cjne A, #NXTCHK_3 jmp ROUTINE_3 . . . . NXTCHK_15: cjne A, ENDCHK jmp ROUTINE_15 ENDCHK : jmp ERROR_ROUTINE And ROUTINE_1 to ROUTINE_15 will have statements for each value of P2 based on the DIP switch. Not very short -but easy to maintain and modify. Raghu |
| Topic | Author | Date |
| Need Help reading DIP switch | 01/01/70 00:00 | |
| JMP @A+DPTR instruction could help | 01/01/70 00:00 | |
| RE: JMP @A+DPTR instruction could help | 01/01/70 00:00 | |
| one more way of doing it | 01/01/70 00:00 | |
| RE: JMP @A+DPTR instruction could help | 01/01/70 00:00 | |
| RE: Need Help reading DIP switch | 01/01/70 00:00 | |
| RE: Need Help reading DIP switch | 01/01/70 00:00 | |
| RE: Need Help reading DIP switch | 01/01/70 00:00 | |
| RE: Need Help reading DIP switch | 01/01/70 00:00 | |
| RE: Need Help reading DIP switch | 01/01/70 00:00 | |
| RE: Need Help reading DIP switch | 01/01/70 00:00 | |
| RE: Need Help reading DIP switch | 01/01/70 00:00 | |
RE: Need Help reading DIP switch | 01/01/70 00:00 |



