chiark / gitweb /
fix initialisation of reversers polarity_cmds_section
authorian <ian>
Wed, 28 Dec 2005 23:53:48 +0000 (23:53 +0000)
committerian <ian>
Wed, 28 Dec 2005 23:53:48 +0000 (23:53 +0000)
detpic/reverse.asm

index b607b0bf1ae9bd50966efea2d6dc649a880c6242..7d4e76d050ec23d69b1fc0a0320832924e99df5e 100644 (file)
@@ -15,7 +15,7 @@ maske                         res     1
 
 polarity_cmds equ 0x5f
 polarity_cmds_section udata polarity_cmds
- res maxpics+1
+ res maxpics
        ; Each byte is:
        ;       11RRRRRR        reverse command for slave, waiting to write
        ;       00000001        this is not a reversers board
@@ -188,13 +188,13 @@ polarity_master_init_boardloop
        dec_f_ifnz t
        bra     polarity_master_init_boardloop
 
-       tst_f_ifnz polarity_cmds
+       bt_f_if1 polarity_cmds, 0
        bra     polarity_bad_masternotused
 
        ; OK, but now we have to work our way back and place
        ; the sentinel
        mov_lw  0x40 ; meaning `sentinel'
-       tst_f_ifnz INDF0
+       bt_f_if0 INDF0, 0
        bra     polarity_bad_lastpicused
 polarity_master_init_truncateloop
        mov_wf  POSTDEC0 ; overwrite with sentinel
@@ -205,6 +205,13 @@ polarity_master_init_truncateloop
        return
 
 polarity_master_init_board_mask_check
+;  W                   preserved
+;  FSR0                        unchanged
+;  INDF0               maybe set to `reversers board but no command'
+;  TBLPTR*             used and advanced
+;  TABLAT              trashed
+;  STATUS              trashed
+;  everything else     preserved
        tblrd_postinc_fixup
        tst_f_ifnz TABLAT
        clr_f   INDF0 ; meaning `reversers board but no command to send'