From: ian Date: Wed, 28 Dec 2005 23:53:48 +0000 (+0000) Subject: fix initialisation of reversers polarity_cmds_section X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=4c4abb5a55b82ad052e07a33a433eb2e5abed102;p=trains.git fix initialisation of reversers polarity_cmds_section --- diff --git a/detpic/reverse.asm b/detpic/reverse.asm index b607b0b..7d4e76d 100644 --- a/detpic/reverse.asm +++ b/detpic/reverse.asm @@ -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'