chiark / gitweb /
shuffle sections and files so it compiles without out of range branches
authorian <ian>
Fri, 23 Dec 2005 00:08:22 +0000 (00:08 +0000)
committerian <ian>
Fri, 23 Dec 2005 00:08:22 +0000 (00:08 +0000)
detpic/Makefile
detpic/mascan.asm
detpic/panic.asm
detpic/points.asm
detpic/program.asm
detpic/reverse.asm

index 1d8b12c26713ad04ade4f139e7bf80491c3fa2af..a6dfd84c2aec455dbd377a0c2f7284352921fe57 100644 (file)
@@ -5,7 +5,7 @@ PICNOS=         0 1 2
 PROGRAMS=              program
 OBJS_program=          vectors.o panic.o routines-led.o i2clib.o       \
                        misc.o detect.o variables.o points.o serout.o   \
-                       syncwrite.o reverse.o nmra-stream.o mascan.o
+                       syncwrite.o mascan.o reverse.o nmra-stream.o
 XCODEN_program=        morse
 XCODE1_program=        ours+pindata
 
index 4dfb201c9ebb920bbe337d2d57020248f0393959..8cf7eaa14e7510ebcea24511217d2b73bbd8384e 100644 (file)
@@ -53,7 +53,7 @@ i2cmu_write_next_byte
        panic   morse_UI
 
 ;======================================================================
-; PROCESSING OF INCOMING BYTES
+; PROCESSING OF INCOMING BYTES - CORE AND DETECTION
 
 ;----------------------------------------
 i2cmu_read_got_byte
@@ -157,21 +157,9 @@ read_got_notfirst
        bt_f_if0 b, 7           ; any more ?
        bc_f    cbyte, 7
        bc_f    b, 7
-       rcall   process_got_extra
+       call    process_got_extra
        bra     i2c_arrange_next_byte
 
-;----------------------------------------
-process_got_extra
-       mov_fw  b
-loopback_read_byte
-;...
-;  W           message
-       xor_lw  0x00 ^ 0x20
-       bra_z   got_pointed
-       xor_lw  0x20 ^ 0xb0
-       bra_z   got_aargh
-       panic   morse_MX
-
 ;----------
 read_got_detectbyte_prep
 ;
@@ -215,6 +203,22 @@ i2c_arrange_something
 ; figure out what to do next - which pic to address, etc.
        panic   morse_UG
 
+;======================================================================
+; PROCESSING OF INCOMING BYTES - EXTRA (NON-DETECTION)
+
+near_gots code
+;----------------------------------------
+process_got_extra
+       mov_fw  b
+loopback_read_byte
+;...
+;  W           message
+       xor_lw  0x00 ^ 0x20
+       bra_z   got_pointed
+       xor_lw  0x20 ^ 0xb0
+       bra_z   got_aargh
+       panic   morse_MX
+
 ;======================================================================
 ; GENERATION OF DETECTION MESSAGES FOR HOST - MAD BT_F_IF1 TABLES
 
index 151e0d2e1308adb134be161b99a38b63a53b9e98..4908b29927a154c0df5e546a535a64517e418352 100644 (file)
@@ -392,10 +392,6 @@ panic_crashread_commanded
        bs_f    panicst, panicst_acked ; since we were asked to
        panic   morse_E
 
-;----------
-got_aargh
-       panic   morse_T
-
 ;----------
 i2csu_read_begin_panicd
        mov_lw  0x80 ; M0000000
@@ -414,5 +410,10 @@ i2csu_read_another_panicd
        mov_lw  0x0b ; AARGH
        goto    i2cs_read_data
 
+near_gots code
+;----------
+got_aargh
+       panic   morse_T
+
 ;***************************************************************************
        include final.inc
index 4a08751ffbe298e56c4adae01dfeb2b30a1af66b..7ca27a442ff13c760a155da51cacdf7257ef885c 100644 (file)
@@ -19,7 +19,6 @@ ptix2latbit_section udata ptix2latbit
 pointmsg               res     1
 
 ;======================================================================
- code
 
 ;======================================================================
 ; LOCAL POINTS
@@ -28,6 +27,7 @@ pointmsg              res     1
 ;----------------------------------------------------------------------
 ; LOCAL POINTS - ACTUALLY DOING
 
+near_local_do code
 ;----------------------------------------
 point_local_do
 ; On slave, called during i2c receive, ie High ISR
@@ -39,13 +39,18 @@ point_local_do
        mov_wf  pointmsg        ; pointmsg = SS zz zz pp  pp pp pp pp
 
        intrh_fsr0_save         ; point_set_pin uses FSR0, see below
-       rcall   point_set_pin
+       call    point_set_pin
        intrh_fsr0_restore
 
        clr_f   TMR3L           ; also copies TMR3H into actual timer register
        bs_f    T3CON, TMR3ON
        return
 
+;----------
+point_clash
+       panic   morse_PB
+
+ code
 ;----------------------------------------
 points_local_intrl
        bt_f_if0 PIR2, TMR3IF
@@ -93,13 +98,10 @@ point_set_pin
        xor_wff INDF0           ; pin = !pin
        return
 
+;----------
 point_nonexistent
        panic   morse_PU
 
-;----------
-point_clash
-       panic   morse_PB
-
 ;----------------------------------------------------------------------
 ; LOCAL POINTS - INITIALISATION
 
@@ -231,6 +233,8 @@ point_timer_init_endif_masterslave
 
 ;======================================================================
 
+near_gots code
+
 cdu_init       panic   morse_UCI
 ; For master pic only.  Sorts out the CDU's pin.
 
index a5ef99d82bb39888d2942a6bf3fe8c3b5c47f193..c4a436d74cc580e2a09e1a61dffd3306c95e5824 100644 (file)
@@ -165,8 +165,6 @@ command_point
 command_crashed
        panic   morse_UC
 
-code2  code
-
 ;======================================================================
 ; SLAVE
 
@@ -192,6 +190,7 @@ slave_interrupt_low
 i2csu_write_begin
        return
 
+near_local_do code
 ;----------------------------------------
 i2csu_write_data
        call    led_green
@@ -214,6 +213,7 @@ i2csu_write_if_special
        bra     i2csu_write_if_bad
        goto    panic_crashread_commanded
 
+code2 code
 ;======================================================================
 ; MASTER/SLAVE deviations
 
index b49454da91f1d78d344e36d5d1578ec843ed2d1e..c6829dde2e1e24936db4066a7030a51a4c75668d 100644 (file)
@@ -21,11 +21,11 @@ polarities_commanded_buffer res     maxpics+1
        ;       000000000       we have written any relevant command
        ;       000000002       sentinel
 
- code
 ;======================================================================
 ; LOCAL REVERSERS
 ; on slave, or master's own
 
+near_local_do code
 ;----------
 polarity_local_do
 ; On slave, called during i2c receive, ie High ISR
@@ -66,6 +66,7 @@ polarity_local_do
                                ;       v<n> is new reverse bit
        return
 
+ code
 ;----------
 polarity_local_init
        load_perpic_tblptr picno2revmasks, 2
@@ -79,7 +80,7 @@ polarity_local_init
        mov_wf  maske
 
        clr_w
-       rcall   polarity_local_do
+       call    polarity_local_do
 
        com_fw  maska
        and_wff TRISA