;this section-matrixes are called from ;scan_direction ;All of them requires that ;sets run_flags.RUN_LEFTDOWN, (which is default ;cleared by scan_direction previous), ;is a move to left is required. ;regb0 has to contain the section of the targetposition ;current-pos is in section 0 cursecmatrix0 trgc0_0_f BTFSC regb0,0x03,AC BRA trgc0_8_f trgc0_0_7 BTFSC regb0,0x02,AC BRA trgc0_4_7 trgc0_0_3 BTFSC regb0,0x01,AC BRA trgc0_2_3 trgc0_0_1 BTFSC regb0,0x00,AC BRA trgc0___1 trgc0___0 ;sector target 0 never reached, set by test_pos ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0___1 ;sector target 1 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0_2_3 BTFSC regb0,0x00,AC BRA trgc0___3 trgc0___2 ;sector target 2 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0___3 ;sector target 3 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0_4_7 BTFSC regb0,0x01,AC BRA trgc0_6_7 trgc0_4_5 BTFSC regb0,0x00,AC BRA trgc0___5 trgc0___4 ;sector target 4 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0___5 ;sector target 5 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0_6_7 BTFSC regb0,0x00,AC BRA trgc0___7 trgc0___6 ;sector target 6 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0___7 ;sector target 7 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0_8_f BTFSC regb0,0x02,AC BRA trgc0_c_f trgc0_8_b BTFSC regb0,0x01,AC BRA trgc0_a_b trgc0_8_9 BTFSC regb0,0x00,AC BRA trgc0___9 trgc0___8 ;sector target 8 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0___9 ;sector target 9 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0_a_b BTFSC regb0,0x00,AC BRA trgc0___b trgc0___a ;sector target 10 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0___b ;sector target 11 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0_c_f BTFSC regb0,0x01,AC BRA trgc0_e_f trgc0_c_d BTFSC regb0,0x00,AC BRA trgc0___d trgc0___c ;sector target 12 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0___d ;sector target 13 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0_e_f BTFSC regb0,0x00,AC BRA trgc0___f trgc0___e ;sector target 14 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc0___f ;sector target 15 BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 1 cursecmatrix1 trgc1_0_f BTFSC regb0,0x03,AC BRA trgc1_8_f trgc1_0_7 BTFSC regb0,0x02,AC BRA trgc1_4_7 trgc1_0_3 BTFSC regb0,0x01,AC BRA trgc1_2_3 trgc1_0_1 BTFSC regb0,0x00,AC BRA trgc1___1 trgc1___0 ;sector target 0 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1___1 ;sector target 1, never reached, set by test_pos ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1_2_3 BTFSC regb0,0x00,AC BRA trgc1___3 trgc1___2 ;sector target 2 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1___3 ;sector target 3 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1_4_7 BTFSC regb0,0x01,AC BRA trgc1_6_7 trgc1_4_5 BTFSC regb0,0x00,AC BRA trgc1___5 trgc1___4 ;sector target 4 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1___5 ;sector target 5 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1_6_7 BTFSC regb0,0x00,AC BRA trgc1___7 trgc1___6 ;sector target 6 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1___7 ;sector target 7 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1_8_f BTFSC regb0,0x02,AC BRA trgc1_c_f trgc1_8_b BTFSC regb0,0x01,AC BRA trgc1_a_b trgc1_8_9 BTFSC regb0,0x00,AC BRA trgc1___9 trgc1___8 ;sector target 8 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1___9 ;sector target 9 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1_a_b BTFSC regb0,0x00,AC BRA trgc1___b trgc1___a ;sector target 10 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1___b ;sector target 11 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1_c_f BTFSC regb0,0x01,AC BRA trgc1_e_f trgc1_c_d BTFSC regb0,0x00,AC BRA trgc1___d trgc1___c ;sector target 12 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1___d ;sector target 13 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1_e_f BTFSC regb0,0x00,AC BRA trgc1___f trgc1___e ;sector target 14 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc1___f ;sector target 15 BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 2 cursecmatrix2 trgc2_0_f BTFSC regb0,0x03,AC BRA trgc2_8_f trgc2_0_7 BTFSC regb0,0x02,AC BRA trgc2_4_7 trgc2_0_3 BTFSC regb0,0x01,AC BRA trgc2_2_3 trgc2_0_1 BTFSC regb0,0x00,AC BRA trgc2___1 trgc2___0 ;sector target 0 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2___1 ;sector target 1 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2_2_3 BTFSC regb0,0x00,AC BRA trgc2___3 trgc2___2 ;sector target 2, never reached, set by test_pos ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2___3 ;sector target 3 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2_4_7 BTFSC regb0,0x01,AC BRA trgc2_6_7 trgc2_4_5 BTFSC regb0,0x00,AC BRA trgc2___5 trgc2___4 ;sector target 4 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2___5 ;sector target 5 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2_6_7 BTFSC regb0,0x00,AC BRA trgc2___7 trgc2___6 ;sector target 6 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2___7 ;sector target 7 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2_8_f BTFSC regb0,0x02,AC BRA trgc2_c_f trgc2_8_b BTFSC regb0,0x01,AC BRA trgc2_a_b trgc2_8_9 BTFSC regb0,0x00,AC BRA trgc2___9 trgc2___8 ;sector target 8 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2___9 ;sector target 9 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2_a_b BTFSC regb0,0x00,AC BRA trgc2___b trgc2___a ;sector target 10 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2___b ;sector target 11 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2_c_f BTFSC regb0,0x01,AC BRA trgc2_e_f trgc2_c_d BTFSC regb0,0x00,AC BRA trgc2___d trgc2___c ;sector target 12 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2___d ;sector target 13 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2_e_f BTFSC regb0,0x00,AC BRA trgc2___f trgc2___e ;sector target 14 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc2___f ;sector target 15 BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 3 cursecmatrix3 trgc3_0_f BTFSC regb0,0x03,AC BRA trgc3_8_f trgc3_0_7 BTFSC regb0,0x02,AC BRA trgc3_4_7 trgc3_0_3 BTFSC regb0,0x01,AC BRA trgc3_2_3 trgc3_0_1 BTFSC regb0,0x00,AC BRA trgc3___1 trgc3___0 ;sector target 0 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3___1 ;sector target 1 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3_2_3 BTFSC regb0,0x00,AC BRA trgc3___3 trgc3___2 ;sector target 2 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3___3 ;sector target 3, never reached, set by test_pos ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3_4_7 BTFSC regb0,0x01,AC BRA trgc3_6_7 trgc3_4_5 BTFSC regb0,0x00,AC BRA trgc3___5 trgc3___4 ;sector target 4 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3___5 ;sector target 5 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3_6_7 BTFSC regb0,0x00,AC BRA trgc3___7 trgc3___6 ;sector target 6 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3___7 ;sector target 7 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3_8_f BTFSC regb0,0x02,AC BRA trgc3_c_f trgc3_8_b BTFSC regb0,0x01,AC BRA trgc3_a_b trgc3_8_9 BTFSC regb0,0x00,AC BRA trgc3___9 trgc3___8 ;sector target 8 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3___9 ;sector target 9 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3_a_b BTFSC regb0,0x00,AC BRA trgc3___b trgc3___a ;sector target 10 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3___b ;sector target 11 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3_c_f BTFSC regb0,0x01,AC BRA trgc3_e_f trgc3_c_d BTFSC regb0,0x00,AC BRA trgc3___d trgc3___c ;sector target 12 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3___d ;sector target 13 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3_e_f BTFSC regb0,0x00,AC BRA trgc3___f trgc3___e ;sector target 14 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc3___f ;sector target 15 BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 4 cursecmatrix4 trgc4_0_f BTFSC regb0,0x03,AC BRA trgc4_8_f trgc4_0_7 BTFSC regb0,0x02,AC BRA trgc4_4_7 trgc4_0_3 BTFSC regb0,0x01,AC BRA trgc4_2_3 trgc4_0_1 BTFSC regb0,0x00,AC BRA trgc4___1 trgc4___0 ;sector target 0 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4___1 ;sector target 1 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4_2_3 BTFSC regb0,0x00,AC BRA trgc4___3 trgc4___2 ;sector target 2 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4___3 ;sector target 3 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4_4_7 BTFSC regb0,0x01,AC BRA trgc4_6_7 trgc4_4_5 BTFSC regb0,0x00,AC BRA trgc4___5 trgc4___4 ;sector target 4, not reached, set by test_pos ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4___5 ;sector target 5 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4_6_7 BTFSC regb0,0x00,AC BRA trgc4___7 trgc4___6 ;sector target 6 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4___7 ;sector target 7 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4_8_f BTFSC regb0,0x02,AC BRA trgc4_c_f trgc4_8_b BTFSC regb0,0x01,AC BRA trgc4_a_b trgc4_8_9 BTFSC regb0,0x00,AC BRA trgc4___9 trgc4___8 ;sector target 8 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4___9 ;sector target 9 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4_a_b BTFSC regb0,0x00,AC BRA trgc4___b trgc4___a ;sector target 10 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4___b ;sector target 11 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4_c_f BTFSC regb0,0x01,AC BRA trgc4_e_f trgc4_c_d BTFSC regb0,0x00,AC BRA trgc4___d trgc4___c ;sector target 12 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4___d ;sector target 13 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4_e_f BTFSC regb0,0x00,AC BRA trgc4___f trgc4___e ;sector target 14 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc4___f ;sector target 15 BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 5 cursecmatrix5 trgc5_0_f BTFSC regb0,0x03,AC BRA trgc5_8_f trgc5_0_7 BTFSC regb0,0x02,AC BRA trgc5_4_7 trgc5_0_3 BTFSC regb0,0x01,AC BRA trgc5_2_3 trgc5_0_1 BTFSC regb0,0x00,AC BRA trgc5___1 trgc5___0 ;sector target 0 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5___1 ;sector target 1 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5_2_3 BTFSC regb0,0x00,AC BRA trgc5___3 trgc5___2 ;sector target 2 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5___3 ;sector target 3 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5_4_7 BTFSC regb0,0x01,AC BRA trgc5_6_7 trgc5_4_5 BTFSC regb0,0x00,AC BRA trgc5___5 trgc5___4 ;sector target 4 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5___5 ;sector target 5, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5_6_7 BTFSC regb0,0x00,AC BRA trgc5___7 trgc5___6 ;sector target 6 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5___7 ;sector target 7 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5_8_f BTFSC regb0,0x02,AC BRA trgc5_c_f trgc5_8_b BTFSC regb0,0x01,AC BRA trgc5_a_b trgc5_8_9 BTFSC regb0,0x00,AC BRA trgc5___9 trgc5___8 ;sector target 8 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5___9 ;sector target 9 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5_a_b BTFSC regb0,0x00,AC BRA trgc5___b trgc5___a ;sector target 10 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5___b ;sector target 11 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5_c_f BTFSC regb0,0x01,AC BRA trgc5_e_f trgc5_c_d BTFSC regb0,0x00,AC BRA trgc5___d trgc5___c ;sector target 12 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5___d ;sector target 13 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5_e_f BTFSC regb0,0x00,AC BRA trgc5___f trgc5___e ;sector target 14 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc5___f ;sector target 15 BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 8 cursecmatrix6 trgc6_0_f BTFSC regb0,0x03,AC BRA trgc6_8_f trgc6_0_7 BTFSC regb0,0x02,AC BRA trgc6_4_7 trgc6_0_3 BTFSC regb0,0x01,AC BRA trgc6_2_3 trgc6_0_1 BTFSC regb0,0x00,AC BRA trgc6___1 trgc6___0 ;sector target 0 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6___1 ;sector target 1 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6_2_3 BTFSC regb0,0x00,AC BRA trgc6___3 trgc6___2 ;sector target 2 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6___3 ;sector target 3 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6_4_7 BTFSC regb0,0x01,AC BRA trgc6_6_7 trgc6_4_5 BTFSC regb0,0x00,AC BRA trgc6___5 trgc6___4 ;sector target 4 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6___5 ;sector target 5 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6_6_7 BTFSC regb0,0x00,AC BRA trgc6___7 trgc6___6 ;sector target 6, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6___7 ;sector target 7 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6_8_f BTFSC regb0,0x02,AC BRA trgc6_c_f trgc6_8_b BTFSC regb0,0x01,AC BRA trgc6_a_b trgc6_8_9 BTFSC regb0,0x00,AC BRA trgc6___9 trgc6___8 ;sector target 8 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6___9 ;sector target 9 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6_a_b BTFSC regb0,0x00,AC BRA trgc6___b trgc6___a ;sector target 10 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6___b ;sector target 11 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6_c_f BTFSC regb0,0x01,AC BRA trgc6_e_f trgc6_c_d BTFSC regb0,0x00,AC BRA trgc6___d trgc6___c ;sector target 12 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6___d ;sector target 13 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6_e_f BTFSC regb0,0x00,AC BRA trgc6___f trgc6___e ;sector target 14 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc6___f ;sector target 15 BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 7 cursecmatrix7 trgc7_0_f BTFSC regb0,0x03,AC BRA trgc7_8_f trgc7_0_7 BTFSC regb0,0x02,AC BRA trgc7_4_7 trgc7_0_3 BTFSC regb0,0x01,AC BRA trgc7_2_3 trgc7_0_1 BTFSC regb0,0x00,AC BRA trgc7___1 trgc7___0 ;sector target 0 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7___1 ;sector target 1 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7_2_3 BTFSC regb0,0x00,AC BRA trgc7___3 trgc7___2 ;sector target 2 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7___3 ;sector target 3 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7_4_7 BTFSC regb0,0x01,AC BRA trgc7_6_7 trgc7_4_5 BTFSC regb0,0x00,AC BRA trgc7___5 trgc7___4 ;sector target 4 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7___5 ;sector target 5 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7_6_7 BTFSC regb0,0x00,AC BRA trgc7___7 trgc7___6 ;sector target 6 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7___7 ;sector target 7, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7_8_f BTFSC regb0,0x02,AC BRA trgc7_c_f trgc7_8_b BTFSC regb0,0x01,AC BRA trgc7_a_b trgc7_8_9 BTFSC regb0,0x00,AC BRA trgc7___9 trgc7___8 ;sector target 8 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7___9 ;sector target 9 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7_a_b BTFSC regb0,0x00,AC BRA trgc7___b trgc7___a ;sector target 10 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7___b ;sector target 11 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7_c_f BTFSC regb0,0x01,AC BRA trgc7_e_f trgc7_c_d BTFSC regb0,0x00,AC BRA trgc7___d trgc7___c ;sector target 12 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7___d ;sector target 13 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7_e_f BTFSC regb0,0x00,AC BRA trgc7___f trgc7___e ;sector target 14 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc7___f ;sector target 15 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 8 cursecmatrix8 trgc8_0_f BTFSC regb0,0x03,AC BRA trgc8_8_f trgc8_0_7 BTFSC regb0,0x02,AC BRA trgc8_4_7 trgc8_0_3 BTFSC regb0,0x01,AC BRA trgc8_2_3 trgc8_0_1 BTFSC regb0,0x00,AC BRA trgc8___1 trgc8___0 ;sector target 0 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8___1 ;sector target 1 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8_2_3 BTFSC regb0,0x00,AC BRA trgc8___3 trgc8___2 ;sector target 2 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8___3 ;sector target 3 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8_4_7 BTFSC regb0,0x01,AC BRA trgc8_6_7 trgc8_4_5 BTFSC regb0,0x00,AC BRA trgc8___5 trgc8___4 ;sector target 4 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8___5 ;sector target 5 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8_6_7 BTFSC regb0,0x00,AC BRA trgc8___7 trgc8___6 ;sector target 6 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8___7 ;sector target 7 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8_8_f BTFSC regb0,0x02,AC BRA trgc8_c_f trgc8_8_b BTFSC regb0,0x01,AC BRA trgc8_a_b trgc8_8_9 BTFSC regb0,0x00,AC BRA trgc8___9 trgc8___8 ;sector target 8, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8___9 ;sector target 9 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8_a_b BTFSC regb0,0x00,AC BRA trgc8___b trgc8___a ;sector target 10 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8___b ;sector target 11 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8_c_f BTFSC regb0,0x01,AC BRA trgc8_e_f trgc8_c_d BTFSC regb0,0x00,AC BRA trgc8___d trgc8___c ;sector target 12 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8___d ;sector target 13 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8_e_f BTFSC regb0,0x00,AC BRA trgc8___f trgc8___e ;sector target 14 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc8___f ;sector target 15 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 9 cursecmatrix9 trgc9_0_f BTFSC regb0,0x03,AC BRA trgc9_8_f trgc9_0_7 BTFSC regb0,0x02,AC BRA trgc9_4_7 trgc9_0_3 BTFSC regb0,0x01,AC BRA trgc9_2_3 trgc9_0_1 BTFSC regb0,0x00,AC BRA trgc9___1 trgc9___0 ;sector target 0 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9___1 ;sector target 1 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9_2_3 BTFSC regb0,0x00,AC BRA trgc9___3 trgc9___2 ;sector target 2 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9___3 ;sector target 3 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9_4_7 BTFSC regb0,0x01,AC BRA trgc9_6_7 trgc9_4_5 BTFSC regb0,0x00,AC BRA trgc9___5 trgc9___4 ;sector target 4 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9___5 ;sector target 5 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9_6_7 BTFSC regb0,0x00,AC BRA trgc9___7 trgc9___6 ;sector target 6 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9___7 ;sector target 7 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9_8_f BTFSC regb0,0x02,AC BRA trgc9_c_f trgc9_8_b BTFSC regb0,0x01,AC BRA trgc9_a_b trgc9_8_9 BTFSC regb0,0x00,AC BRA trgc9___9 trgc9___8 ;sector target 8 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9___9 ;sector target 9, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9_a_b BTFSC regb0,0x00,AC BRA trgc9___b trgc9___a ;sector target 10 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9___b ;sector target 11 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9_c_f BTFSC regb0,0x01,AC BRA trgc9_e_f trgc9_c_d BTFSC regb0,0x00,AC BRA trgc9___d trgc9___c ;sector target 12 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9___d ;sector target 13 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9_e_f BTFSC regb0,0x00,AC BRA trgc9___f trgc9___e ;sector target 14 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgc9___f ;sector target 15 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 10 cursecmatrixa trgca_0_f BTFSC regb0,0x03,AC BRA trgca_8_f trgca_0_7 BTFSC regb0,0x02,AC BRA trgca_4_7 trgca_0_3 BTFSC regb0,0x01,AC BRA trgca_2_3 trgca_0_1 BTFSC regb0,0x00,AC BRA trgca___1 trgca___0 ;sector target 0 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca___1 ;sector target 1 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca_2_3 BTFSC regb0,0x00,AC BRA trgca___3 trgca___2 ;sector target 2 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca___3 ;sector target 3 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca_4_7 BTFSC regb0,0x01,AC BRA trgca_6_7 trgca_4_5 BTFSC regb0,0x00,AC BRA trgca___5 trgca___4 ;sector target 4 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca___5 ;sector target 5 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca_6_7 BTFSC regb0,0x00,AC BRA trgca___7 trgca___6 ;sector target 6 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca___7 ;sector target 7 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca_8_f BTFSC regb0,0x02,AC BRA trgca_c_f trgca_8_b BTFSC regb0,0x01,AC BRA trgca_a_b trgca_8_9 BTFSC regb0,0x00,AC BRA trgca___9 trgca___8 ;sector target 8 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca___9 ;sector target 9 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca_a_b BTFSC regb0,0x00,AC BRA trgca___b trgca___a ;sector target 10, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca___b ;sector target 11 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca_c_f BTFSC regb0,0x01,AC BRA trgca_e_f trgca_c_d BTFSC regb0,0x00,AC BRA trgca___d trgca___c ;sector target 12 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca___d ;sector target 13 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca_e_f BTFSC regb0,0x00,AC BRA trgca___f trgca___e ;sector target 14 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgca___f ;sector target 15 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 11 cursecmatrixb trgcb_0_f BTFSC regb0,0x03,AC BRA trgcb_8_f trgcb_0_7 BTFSC regb0,0x02,AC BRA trgcb_4_7 trgcb_0_3 BTFSC regb0,0x01,AC BRA trgcb_2_3 trgcb_0_1 BTFSC regb0,0x00,AC BRA trgcb___1 trgcb___0 ;sector target 0 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb___1 ;sector target 1 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb_2_3 BTFSC regb0,0x00,AC BRA trgcb___3 trgcb___2 ;sector target 2 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb___3 ;sector target 3 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb_4_7 BTFSC regb0,0x01,AC BRA trgcb_6_7 trgcb_4_5 BTFSC regb0,0x00,AC BRA trgcb___5 trgcb___4 ;sector target 4 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb___5 ;sector target 5 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb_6_7 BTFSC regb0,0x00,AC BRA trgcb___7 trgcb___6 ;sector target 6 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb___7 ;sector target 7 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb_8_f BTFSC regb0,0x02,AC BRA trgcb_c_f trgcb_8_b BTFSC regb0,0x01,AC BRA trgcb_a_b trgcb_8_9 BTFSC regb0,0x00,AC BRA trgcb___9 trgcb___8 ;sector target 8 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb___9 ;sector target 9 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb_a_b BTFSC regb0,0x00,AC BRA trgcb___b trgcb___a ;sector target 10 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb___b ;sector target 11, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb_c_f BTFSC regb0,0x01,AC BRA trgcb_e_f trgcb_c_d BTFSC regb0,0x00,AC BRA trgcb___d trgcb___c ;sector target 12 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb___d ;sector target 13 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb_e_f BTFSC regb0,0x00,AC BRA trgcb___f trgcb___e ;sector target 14 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcb___f ;sector target 15 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 12 cursecmatrixc trgcc_0_f BTFSC regb0,0x03,AC BRA trgcc_8_f trgcc_0_7 BTFSC regb0,0x02,AC BRA trgcc_4_7 trgcc_0_3 BTFSC regb0,0x01,AC BRA trgcc_2_3 trgcc_0_1 BTFSC regb0,0x00,AC BRA trgcc___1 trgcc___0 ;sector target 0 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc___1 ;sector target 1 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc_2_3 BTFSC regb0,0x00,AC BRA trgcc___3 trgcc___2 ;sector target 2 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc___3 ;sector target 3 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc_4_7 BTFSC regb0,0x01,AC BRA trgcc_6_7 trgcc_4_5 BTFSC regb0,0x00,AC BRA trgcc___5 trgcc___4 ;sector target 4 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc___5 ;sector target 5 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc_6_7 BTFSC regb0,0x00,AC BRA trgcc___7 trgcc___6 ;sector target 6 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc___7 ;sector target 7 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc_8_f BTFSC regb0,0x02,AC BRA trgcc_c_f trgcc_8_b BTFSC regb0,0x01,AC BRA trgcc_a_b trgcc_8_9 BTFSC regb0,0x00,AC BRA trgcc___9 trgcc___8 ;sector target 8 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc___9 ;sector target 9 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc_a_b BTFSC regb0,0x00,AC BRA trgcc___b trgcc___a ;sector target 10 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc___b ;sector target 11 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc_c_f BTFSC regb0,0x01,AC BRA trgcc_e_f trgcc_c_d BTFSC regb0,0x00,AC BRA trgcc___d trgcc___c ;sector target 12, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc___d ;sector target 13 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc_e_f BTFSC regb0,0x00,AC BRA trgcc___f trgcc___e ;sector target 14 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcc___f ;sector target 15 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 13 cursecmatrixd trgcd_0_f BTFSC regb0,0x03,AC BRA trgcd_8_f trgcd_0_7 BTFSC regb0,0x02,AC BRA trgcd_4_7 trgcd_0_3 BTFSC regb0,0x01,AC BRA trgcd_2_3 trgcd_0_1 BTFSC regb0,0x00,AC BRA trgcd___1 trgcd___0 ;sector target 0 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd___1 ;sector target 1 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd_2_3 BTFSC regb0,0x00,AC BRA trgcd___3 trgcd___2 ;sector target 2 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd___3 ;sector target 3 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd_4_7 BTFSC regb0,0x01,AC BRA trgcd_6_7 trgcd_4_5 BTFSC regb0,0x00,AC BRA trgcd___5 trgcd___4 ;sector target 4 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd___5 ;sector target 5 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd_6_7 BTFSC regb0,0x00,AC BRA trgcd___7 trgcd___6 ;sector target 6 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd___7 ;sector target 7 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd_8_f BTFSC regb0,0x02,AC BRA trgcd_c_f trgcd_8_b BTFSC regb0,0x01,AC BRA trgcd_a_b trgcd_8_9 BTFSC regb0,0x00,AC BRA trgcd___9 trgcd___8 ;sector target 8 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd___9 ;sector target 9 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd_a_b BTFSC regb0,0x00,AC BRA trgcd___b trgcd___a ;sector target 10 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd___b ;sector target 11 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd_c_f BTFSC regb0,0x01,AC BRA trgcd_e_f trgcd_c_d BTFSC regb0,0x00,AC BRA trgcd___d trgcd___c ;sector target 12 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd___d ;sector target 13, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd_e_f BTFSC regb0,0x00,AC BRA trgcd___f trgcd___e ;sector target 14 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcd___f ;sector target 15 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 14 cursecmatrixe trgce_0_f BTFSC regb0,0x03,AC BRA trgce_8_f trgce_0_7 BTFSC regb0,0x02,AC BRA trgce_4_7 trgce_0_3 BTFSC regb0,0x01,AC BRA trgce_2_3 trgce_0_1 BTFSC regb0,0x00,AC BRA trgce___1 trgce___0 ;sector target 0 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce___1 ;sector target 1 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce_2_3 BTFSC regb0,0x00,AC BRA trgce___3 trgce___2 ;sector target 2 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce___3 ;sector target 3 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce_4_7 BTFSC regb0,0x01,AC BRA trgce_6_7 trgce_4_5 BTFSC regb0,0x00,AC BRA trgce___5 trgce___4 ;sector target 4 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce___5 ;sector target 5 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce_6_7 BTFSC regb0,0x00,AC BRA trgce___7 trgce___6 ;sector target 6 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce___7 ;sector target 7 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce_8_f BTFSC regb0,0x02,AC BRA trgce_c_f trgce_8_b BTFSC regb0,0x01,AC BRA trgce_a_b trgce_8_9 BTFSC regb0,0x00,AC BRA trgce___9 trgce___8 ;sector target 8 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce___9 ;sector target 9 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce_a_b BTFSC regb0,0x00,AC BRA trgce___b trgce___a ;sector target 10 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce___b ;sector target 11 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce_c_f BTFSC regb0,0x01,AC BRA trgce_e_f trgce_c_d BTFSC regb0,0x00,AC BRA trgce___d trgce___c ;sector target 12 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce___d ;sector target 13 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce_e_f BTFSC regb0,0x00,AC BRA trgce___f trgce___e ;sector target 14, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgce___f ;sector target 15 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN ;current-pos is in section 15 cursecmatrixf trgcf_0_f BTFSC regb0,0x03,AC BRA trgcf_8_f trgcf_0_7 BTFSC regb0,0x02,AC BRA trgcf_4_7 trgcf_0_3 BTFSC regb0,0x01,AC BRA trgcf_2_3 trgcf_0_1 BTFSC regb0,0x00,AC BRA trgcf___1 trgcf___0 ;sector target 0 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf___1 ;sector target 1 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf_2_3 BTFSC regb0,0x00,AC BRA trgcf___3 trgcf___2 ;sector target 2 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf___3 ;sector target 3 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf_4_7 BTFSC regb0,0x01,AC BRA trgcf_6_7 trgcf_4_5 BTFSC regb0,0x00,AC BRA trgcf___5 trgcf___4 ;sector target 4 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf___5 ;sector target 5 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf_6_7 BTFSC regb0,0x00,AC BRA trgcf___7 trgcf___6 ;sector target 6 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf___7 ;sector target 7 ;BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf_8_f BTFSC regb0,0x02,AC BRA trgcf_c_f trgcf_8_b BTFSC regb0,0x01,AC BRA trgcf_a_b trgcf_8_9 BTFSC regb0,0x00,AC BRA trgcf___9 trgcf___8 ;sector target 8 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf___9 ;sector target 9 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf_a_b BTFSC regb0,0x00,AC BRA trgcf___b trgcf___a ;sector target 10 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf___b ;sector target 11 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf_c_f BTFSC regb0,0x01,AC BRA trgcf_e_f trgcf_c_d BTFSC regb0,0x00,AC BRA trgcf___d trgcf___c ;sector target 12 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf___d ;sector target 13 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf_e_f BTFSC regb0,0x00,AC BRA trgcf___f trgcf___e ;sector target 14 BSF work_flags,RUN_LEFTDOWN,AC RETURN trgcf___f ;sector target 15, never reached ;BSF work_flags,RUN_LEFTDOWN,AC RETURN