1 ;======================================================================
2 ; SERIAL PORT - TRANSMISSION TO HOST
6 ;----------------------------------------
8 ; W byte to xmit to host trashed
9 ; FSR0 any set for serial_addbyte_another
10 ; outbuf, outmsg_* buffer not full adjusted appropriately
12 ; all others any not interfered with
15 mov_ff outmsg_end, FSR0L
16 bs_f PIR1, TXIE ; ensure we get interrupted
18 serial_addbyte_another
19 ; W byte to xmit to host trashed
20 ; FSR0 from _addbyte[_another] updated for ..._another again
21 ; outbuf, outmsg_* buffer not full adjusted appropriately
23 ; all others any not interfered with
29 cmp_fw_ifne outmsg_begin
34 ;----------------------------------------------------------------------
37 rcall portb_read ; check flow control
39 ; are we ready to transmit ?
53 bra_n tx_justsent_noacknmra
54 ; we've just sent the last byte of some message:
55 ; maybe we push an NMRADONE message on the front
57 bra_nz tx_acknmra_insert
60 bc_f outmsg_begin, outbuf_szln2
64 ; maybe we send an NMRADONE
66 bra_nz tx_acknmra_send
67 ; nothing at all to do:
72 sub_wff acknmra ; we're acking these now
73 mov_wf INDF0 ; write it over the message we just sent
77 sub_wff acknmra ; we're acking these now
81 ;----------------------------------------
83 ; W undefined value from PORTB
87 bt_w_if0 p0_rs232_fcin >> 4
100 ;----------------------------------------------------------------------
107 ;======================================================================