scand res 1
scane res 1
buf0 res 1
- message_buffer res max_messages
udata
outgoing_buffer res max_messages+2
+ message_buffer res max_messages
+ code
; 80 40 20 10 08 04 02 01
; 7 6 5 4 3 2 1 0
mov_lfsr message_buffer, 1
clr_f buf0
+ clr_f INDF1
return
;----------------------------------------------------------------------
- clr_f scana
- clr_f scand
- bra
-
-
- ; a -- 01 -- 03 -- -- -- --
- ; c -- -- -- -- -- 00 -- --
- ; d -- -- -- -- -- -- 04 05
- ; e -- -- -- -- -- 02 -- --
-
- mov_fw scana
- and_lw 0x50 ; W zz 01 zz 03 zz zz zz zz
- or_wf buf0 ; buf0 zz 01 MD 03 MM zz zz zz
- mov_fw scand
- and_lw 0x03 ; d -- -- -- -- -- -- 04 05
- ior_wff buf0 ; buf0 -- 01 -- 03 -- -- 04 05
-
- bt_f_if1 scanc,2; s5=04
- bs_f buf0,5 ; buf0 05 -- 04 -- 03 -- 01 04
- bt_f_if1 scane,2
- bs_f buf0,3 ; s0=08
-
-
-
-
- cmp_fw_ifne last1
- bs_f buf0,6 ; buf0 MM D1 zz zz zz zz zz zz
-
- mov_
-
-
- rr_fw scanb ; W 04 20 17 xx xx xx xx xx
- and_lw 0xe0 ; W 04 20 17 zz zz zz zz zz
- ior_wf buf0 ; buf0 04 20 17 zz MD MM zz zz
-
- rrc_fw scanc ; W xx xx xx 05 xx xx 10 13 C=16
- and_lw 0x13 ; W zz zz zz 05 zz zz 10 13 C=16
- ior_wf buf0 ; buf0 04 20 17 05 MD MM 10 13 C=16
-
- rrc_fw scand ; d 16 08 xx 01 07 02 11 14
- mov_wf buf1 ; buf1 16 08 xx 01 07 02 11 14
-
-
- ; b -- -- -- 04 20 17 -- --
- ; *b 20 17 -- -- -- -- -- 04
- ; >*b 04 20 17 -- -- -- -- --
-
-
-
- ; a -- 19 09 12 15 18 -- --
-
- ; e -- -- -- -- -- 03 00 06
-
-
-
-
-
-
-
- ; <Ce -- -- -- -- 03 00 06 16
-
-
- ; b -- -- -- 04 20 17 -- --
- ; a -- 19 09 12 15 18 -- --
-
-
- ; >a -- -- 19 09 12 15 18 --
- ; >Ce -- -- -- -- -- -- 03 00 C=06
-
-
-
- ; *b 20 17 -- -- -- -- -- 04
-
-
-
- ; *b 20 17 -- -- -- -- -- 04
- ; >Cc XX -- -- 05 -- -- 10 13 C=16
- ; >Cb
-
-
- ; >b -- -- -- -- 04 20 17 --
- ; <c -- 05 -- -- 10 13 16 --
-
- ; <b -- -- 04 20 17 -- -- --
- ; >c 16 -- -- 05 -- -- 10 13
-
- ; *c -- 10 13 16 -- -- 05 --
-
- ; >C*b XX 20 17 -- -- -- -- -- C=04
- ; *c -- 10 13 16 -- -- 05 --
-
- ; c -- -- 05 -- -- 10 13 16
- ; b -- -- -- 04 20 17 -- --
-
- ; buf0 -- -- md -- mm -- -- --
- rl_fw scand ; W 11 14 -- 08 -- 01 07 02
- and_lw 0xeb ;
- or_wf buf0 ; buf0 02 11 14 md 08 mm 01 07
-
- rr_f buf0 ; buf0 05 -- 01 -- 03 -- -- 04
- ; d 02 11 14 -- 08 -- 01 07
-
- ; e -- -- -- -- -- 03 00 06
- ; a -- 19 09 12 15 18 -- --
-
- ; c -- -- 05 -- -- 10 13 16
- ; b -- -- -- 04 20 17 -- --
-
-
-[yy]= '0,-- -- -- -- -- 18 -- --';
-[yy]= '0,-- -- -- -- 15 -- -- --';
-[yy]= '0,-- -- -- 12 -- -- -- --';
-[yy]= '0,-- -- 09 -- -- -- -- --';
-[yy]= '0,-- 19 -- -- -- -- -- --';
-
-[yy]= '1,-- -- -- -- -- 17 -- --';
-[yy]= '1,-- -- -- -- 20 -- -- --';
-[yy]= '1,-- -- -- 04 -- -- -- --';
-
-[yy]= '2,-- -- -- -- -- -- -- 16';
-[yy]= '2,-- -- -- -- -- -- 13 --';
-[yy]= '2,-- -- -- -- -- 10 -- --';
-[yy]= '2,-- -- 05 -- -- -- -- --';
-
-[yy]= '3,-- -- -- -- -- -- -- 07';
-[yy]= '3,-- -- -- -- -- -- 01 --';
-[yy]= '3,-- -- -- -- 08 -- -- --';
-[yy]= '3,-- -- 14 -- -- -- -- --';
-[yy]= '3,-- 11 -- -- -- -- -- --';
-[yy]= '3,02 -- -- -- -- -- -- --';
-
-[yy]= '4,-- -- -- -- -- -- -- 06';
-[yy]= '4,-- -- -- -- -- -- 00 --';
-[yy]= '4,-- -- -- -- -- 03 -- --';
-
-
- ; d 02 11 14 -- 08 -- 01 07
- mov_lw
-
- ; a -- 19 09 12 15 18 -- --
- ; e -- -- -- -- -- 03 00 06
-
- ; b -- -- -- 04 20 17 -- --
- ; c -- -- 05 -- -- 10 13 16
-
-
-
-
-
-
-
-
- ; d 02 11 14 -- 08 -- 01 07
-
- ; a -- -- 09 12 15 18 -- --
- ; c -- -- 05 -- -- 10 13 16
-
- ; b -- -- -- 04 20 17 -- --
- ; e -- -- -- -- -- 03 00 06
-
-
-
-
-
-
-
- ; d 02 11 14 -- 08 -- 01 07
- ; b -- -- -- 04 20 17 -- --
- ; 02 11 14 04 20 17 01 07 (d&0xe3) | (b&0x1c)
- ; missing 08
-
- ; a -- -- 09 12 15 18 -- --
- ; b -- -- -- 04 20 17 -- --
- ; b 20 17 -- -- -- -- -- 04
-
-
- ; a -- -- 09 12 15 18 -- --
- ; c -- -- 05 -- -- 10 13 16
- ; e -- -- -- -- -- 03 00 06
-
-
- mov_lw scanc;2
- and_lw 0x27 ; s5=0:20, s10=0:04, s13=0:02, s16=0:01
- mov_wf buf0
- mov_lw scand;3
-
-
-
-
- mov_fw PORTB
- mov_lw scana
- mov_fw PORTC
- mov_lw scana
- mov_fw PORTD
- mov_lw scana
-
-
-
- include common.inc
-
- extern informative_panic
-
-
;****************************************************************************
code