chiark / gitweb /
mascan compilation wip
[trains.git] / detpic / mascan.asm
index af518c0c9cfde691376703f8d1a1cc302b82fee6..4dfb201c9ebb920bbe337d2d57020248f0393959 100644 (file)
@@ -16,7 +16,7 @@ cbyte res     1
        ;       1000 0000       we're expecting an extra byte
 
 ;----------------------------------------------------------------------
-slavetable_section udata 0x280
+slavetable_section udata 0x400
 
 ste_szln2      equ     3
        ; each entry is a number of bytes, at these offsets:
@@ -81,8 +81,8 @@ read_got_first_detectors      ; b =           MdBBdddd
        mov_lw  0x4f            ; W =           01001111
        and_wff b               ; b =           0d00dddd
        mov_fw  POSTINC1        ; W = detbasel; FSR1 -> lastd0
-       rcall   read_prep_detectbyte    ; b =   0d00dddd
-                                       ; u =   0C00CCCC
+       rcall   read_got_detectbyte_prep ; b =  0d00dddd
+                                        ; u =  0C00CCCC
        bt_f_if1 b, 6           ; b bit         .d......
        bs_f    b, 4            ; b =           0d0ddddd
                                ;                ^ ^ copies of same bit
@@ -100,7 +100,7 @@ read_got_first_reversers
        mov_wf  cbyte           ; cbyte =       M0000000
        bc_f    b, 7            ; b =           00dddddd
        mov_fw  POSTINC1        ; W = detbasel; FSR1 -> lastd0
-       rcall   read_prep_detectbyte
+       rcall   read_got_detectbyte_prep
        goto    addmsgs_revhead
 
 ;-----
@@ -112,7 +112,7 @@ read_got_detectors_b1               ; b =           dddddddd
        mov_fw  POSTINC1        ; W = detbasel; FSR1 -> lastd0
        inc_f   FSR1L           ; FSR1 -> lastd1
        add_lw  5               ; W = detbasel+8
-       rcall   read_prep_detectbyte
+       rcall   read_got_detectbyte_prep
        goto    addmsgs_all
 
 ;----------
@@ -121,7 +121,7 @@ read_got_detectors_b2               ; b =           dddddddd
        mov_fw  POSTDEC1        ; W = detbasel; FSR1 -> flags
        bs_f    FSR1L, 2        ; FSR1L ->      lastd2
        add_lw  13              ; W = detbasel+16
-       rcall   read_prep_detectbyte
+       rcall   read_got_detectbyte_prep
        goto    addmsgs_all
 
 ;----------
@@ -219,7 +219,7 @@ i2c_arrange_something
 ; GENERATION OF DETECTION MESSAGES FOR HOST - MAD BT_F_IF1 TABLES
 
 addmsg_testbit macro bit
-       bt_f_if1 u, bit   fixme need to test something other than w !
+       bt_f_if1 u, bit
        rcall   addmsg_one
        endm
 
@@ -292,7 +292,7 @@ addmsg_one
 ; other conditions on entry and exit as for entry to addmsgs_<kind>, above
        rr_fw   TOSL            ; W =           0???bbb0
        rr_w                    ; W =           00???bbb
-       ior_fw  0xf8            ; W =           11111bbb
+       ior_wfw 0xf8            ; W =           11111bbb
        mov_wf  FSR0L           ; FSR0L =       11111bbb
        clr_f   FSR0H           ; FSR0 ->       bitnum2bit[bbb]
        add_wfw t               ; W =           adjdetbasel + 11111bbb