X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/bad2d92d98f9990ee5ccf509c0eafe5b3af9f4dc..b51d2360e5a32408daae39b1c311868d0d34374c:/z180/msgfifo.180 diff --git a/z180/msgfifo.180 b/z180/msgfifo.180 index 582c219..cf1ae2a 100644 --- a/z180/msgfifo.180 +++ b/z180/msgfifo.180 @@ -1,11 +1,11 @@ page 255 .z80 - + global msg_rx_fifo,msg_tx_fifo global msginit,msgi.st,msg.in,msgo.st,msg.out global msg.sout,msg.co - + extrn buf.init include config.inc @@ -15,8 +15,8 @@ dseg - mkbuf msg_rx_fifo,msg_rx_fifo_len - mkbuf msg_tx_fifo,msg_tx_fifo_len + mkbuf mtx.fifo_id, msg_tx_fifo, msg_tx_fifo_len + mkbuf mrx.fifo_id, msg_rx_fifo, msg_rx_fifo_len @@ -27,7 +27,7 @@ ; ; Init buffer ; - + msginit: ld ix,msg_rx_fifo ld a,msg_rx_fifo.mask @@ -49,7 +49,7 @@ buf.empty: ret z or 0ffh ret - + ;-------------------------------------------------------------- msg.in: @@ -71,12 +71,12 @@ bg.wait: inc h bg.nc: ld l,(hl) - + ld a,(ix+o.out_idx) ; inc a and (ix+o.mask) ld (ix+o.out_idx),a - + ld a,l pop hl pop ix @@ -122,7 +122,7 @@ bp.wait: jr z,bp.wait ld (hl),b ld (ix+o.in_idx),a - + ld a,b out0 (AVRINT5),a pop bc @@ -152,7 +152,7 @@ bp.wait: ld a,b out (PMSG),a ld (ix+o.in_idx),c - + pop bc pop ix ret @@ -171,7 +171,7 @@ msg.sout: ld b,(hl) ; inc hl ex de,hl - + ms.ol: push ix pop hl @@ -242,8 +242,8 @@ msg.co: pop hl pop af ret - - + + buf: db buf_end - $ - 1 ;output string length db 081h ; message start token @@ -257,4 +257,3 @@ buf_end: ;---------------------------------------------------------------------- end -