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
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
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'