Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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



List of 13 messages in thread
TopicAuthorDate
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      

Back to Subject List