| ??? 06/07/02 18:11 Read: times |
#24121 - RE: DB and DW |
Hi Frank,
Am I correct in thinking that you want to execute a certain routine, based on an input value? You can do that like this: ; Execute one of several processes, based on the number in ACC Execute_Process: RL A ; Multiply A by two to account for the length of the AJMP ANL A,#0FEh MOV DPTR,#JMP_TBL ; Load the DPTR with the address of the jump table JMP @A+DPTR ; Jump to the indexed position of the table JMP_TBL: AJMP Process_Device1 AJMP Process_Device2 ..... AJMP Process_Device#n You can expand this to 128 jump locations. That should be enough, I think ;o) Best regards, Rob. |
| Topic | Author | Date |
| DB and DW | 01/01/70 00:00 | |
| RE: DB and DW | 01/01/70 00:00 | |
RE: DB and DW | 01/01/70 00:00 |



