chiark / gitweb /
set TXIE in PIE not IPR or PIR(!) also get sense of flow control right
authorian <ian>
Fri, 30 Dec 2005 03:00:10 +0000 (03:00 +0000)
committerian <ian>
Fri, 30 Dec 2005 03:00:10 +0000 (03:00 +0000)
detpic/serout.asm

index 48b5081423a70d2a930fd84ef59e041ffc12372c..377c5558e76cf4402bfa75937090e581a4dece64 100644 (file)
@@ -37,7 +37,7 @@ serial_addbyte_another @
        bra_z   addbyte_toomany
        ; no, we're ok:
 
-       bt_f_if1 INTCON, TXIE
+       bt_f_if1 PIE1, TXIE
        return ; don't bother messing about if tx is already enabled
 
 ; we fall through to portb_read to reenable TXIE if appropriate
@@ -60,16 +60,16 @@ portb_read @
        mov_fw  PORTB
        bc_f    INTCON, RBIF
 
-       bt_w_if0  p0_rs232_fcin >> 4
+       bt_w_if1  p0_rs232_fcin >> 4
        bra     txfc_disable
        ; tx enable:
 
-       bs_f    PIR1, TXIE
+       bs_f    PIE1, TXIE
        return
 
 ;----------
 txfc_disable
-       bc_f    PIR1, TXIE
+       bc_f    PIE1, TXIE
        goto    led_red ; flow control forces us not to transmit
 
 ;----------------------------------------------------------------------
@@ -97,7 +97,7 @@ serialtx_intrl @
        ; are we ready to transmit ?
        bt_f_if0 PIR1, TXIF
        return
-       bt_f_if0 PIR1, TXIE
+       bt_f_if0 PIE1, TXIE
        return
        ; yes, it's us:
 
@@ -140,7 +140,7 @@ tx_bufempty
        mov_fw  acknmra
        bra_nz  tx_acknmra_send
        ; nothing at all to do:
-       bc_f    PIR1, TXIE
+       bc_f    PIE1, TXIE
        call    led_black ; we're not transmitting
        intrl_handled_nostack