I am trying to make a jump (to subroutines) using ICALL. I am assuming the corresponding return instruction is simply ret. is this true?
My code seems to lock up--if I kill the Icall all is well!! any thoughts?
ldi ZH, high(actions*2) ;get address of command check string
ldi ZL, low (actions*2)
mov temp, routine_to_do ;specify which subroutine to run
lsl temp ;mult by 2 to for word address
add ZL,temp ;point to table address (base +2*cmdnum)
adc ZH,temp ;propogate carry
icall ;execute valid cmd subroutine
more code--seems to never come back here/locks up
routine0: ret ;right now routines do nothing but return
actions: dw routine0, routine1