
:
        rl A               ;A now 0, or 2, or 4 ....
        push ACC           ;effectively, push A
        anl A,#08H         ;check for A >=8
        cjne A,#08H,USE0_3 ;A < 8, use IM0_3
        pop ACC            ;A >= 8, restore A
        add A,#IM4_7+8     ;pointer into IM4_7
        jmp OVR0_3         ;skip over 0-3 setup
USE0_3: pop ACC            ;ch A < 8, restore A
        add A,#IM0_3+8     ;get the pointer into IM0_3
OVR0_3: mov R0,A           ;from here on, same for all A
:

This attempts to implement.
for (A=0; A<16; A+=2)
  if ( A >= 8 )
    do this;
  else
    do that; 
