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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/07/02 20:21
Read: times


 
#24125 - RE: DB and DW
frank;

table:
db 01h
dw proc_1
db 02h
dw proc2
;assume r0 contains process code 01,02etc.
mov r1,#0h

mov dptr,#table
loop:
clr a
movc a,@a+dptr
cjne a,r0,check_end
;match found now branch
inc dptr
;read branch routine msb
clr a
movc a,@a+dptr
mov b,a
;read branch routine lsb
clr a
inc dptr
movc a,@a+dptr
push acc
push b
ret

check_end:
inc r1
cjne r1,#loop_count,check_next
jmp exit_loop
check_next:
inc dptr
inc dptr
inc dptr
jmp loop
exit_loop:
regards
pranav

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

Back to Subject List