summaryrefslogtreecommitdiff
path: root/z180/fifoio.180
diff options
context:
space:
mode:
authorLeo C2015-05-10 12:54:12 +0200
committerLeo C2015-05-10 12:54:12 +0200
commite4c4b148ced1347935dff6200380e90cb3bfcde3 (patch)
tree9ec51f8058aebc22d1b3ff415f4b15ab01ceedb6 /z180/fifoio.180
parent1a2460dcd3bed50d5f2b7ba53e6e21a12935639b (diff)
downloadz180-stamp-e4c4b148ced1347935dff6200380e90cb3bfcde3.zip
Add unique id to fifos
Diffstat (limited to 'z180/fifoio.180')
-rw-r--r--z180/fifoio.18017
1 files changed, 8 insertions, 9 deletions
diff --git a/z180/fifoio.180 b/z180/fifoio.180
index dd99c53..cbcece9 100644
--- a/z180/fifoio.180
+++ b/z180/fifoio.180
@@ -1,6 +1,6 @@
page 255
.z80
-
+
;
; FIFO channels for communication with stm32
;
@@ -15,10 +15,10 @@
;--------------------------------------------------------------
dseg
-
- mkbuf rx.buf,rx.buf_len
- mkbuf tx.buf,tx.buf_len
+
+ mkbuf ci.fifo_id, rx.buf,rx.buf_len
+ mkbuf co.fifo_id, tx.buf,tx.buf_len
;--------------------------------------------------------------
@@ -48,7 +48,7 @@ buf.empty:
ret z
or 0ffh
ret
-
+
f.in:
push ix
@@ -69,12 +69,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
@@ -118,7 +118,7 @@ bp.wait:
jr z,bp.wait
ld (hl),b
ld (ix+o.in_idx),a
-
+
ld a,b
pop bc
pop hl
@@ -126,4 +126,3 @@ bp.wait:
ret
end
-