summaryrefslogtreecommitdiff
path: root/z180/r3init.180
diff options
context:
space:
mode:
authorLeo C2014-10-23 02:22:01 +0200
committerLeo C2014-10-23 02:22:01 +0200
commit6a4e9540b950d871ea8fa072b195490a231b251d (patch)
tree2078c1bcf0abe120c28f0e0f9a1404162bb29c85 /z180/r3init.180
parent424b184a9bab3b1b8fe93fbc9e8a6e9d566904c8 (diff)
downloadz180-stamp-6a4e9540b950d871ea8fa072b195490a231b251d.zip
new fifos msg in, msg out, console in, console out
Diffstat (limited to 'z180/r3init.180')
-rw-r--r--z180/r3init.18062
1 files changed, 37 insertions, 25 deletions
diff --git a/z180/r3init.180 b/z180/r3init.180
index 1936c9b..2dd1bb8 100644
--- a/z180/r3init.180
+++ b/z180/r3init.180
@@ -313,7 +313,7 @@ buf.init:
ret
;----------------------------------------------------------------------
-
+if 0
extrn msginit,msg_tx_fifo,msg_rx_fifo
extrn msg.sout
@@ -325,19 +325,19 @@ bufferinit:
ld (40h+0),hl
ld (40h+2),a
- ld (bufdat+1),hl
- ld (bufdat+3),a
- xor a
- ld (bufdat+0),a
- ld hl,inimsg
- call msg.sout
+; ld (bufdat+1),hl
+; ld (bufdat+3),a
+; ld a,1
+; ld (bufdat+0),a
+; ld hl,inimsg
+; call msg.sout
ld de,msg_rx_fifo
in0 a,cbr
call log2phys
ld (bufdat+1),hl
ld (bufdat+3),a
- ld a,1
+ ld a,2
ld (bufdat+0),a
ld hl,inimsg
call msg.sout
@@ -355,50 +355,63 @@ bufdat:
db 0
inimsg_e:
+endif
;----------------------------------------------------------------------
;
-if 0
- extrn msginit,msg.sout,msg_fifo
- extrn tx.buf,rx.buf
+ extrn msginit,msg.sout
+ extrn mtx.fifo,mrx.fifo
+ extrn co.fifo,ci.fifo
bufferinit:
call msginit
ld hl,buffers
- ld bc,0300h ; b:count, c:buffer nr
+ ld b,buftablen
bfi_1:
+ ld a,(hl)
+ inc hl
+ ld (bufdat+0),a
ld e,(hl)
inc hl
ld d,(hl)
inc hl
push hl
+
+ or a
+ jr nz,bfi_2
+ in0 a,cbr
+ call log2phys
+ ld (40h+0),hl
+ ld (40h+2),a
+ out0 (AVRINT5),a
+ jr bfi_3
+bfi_2:
in0 a,cbr
call log2phys
ld (bufdat+1),hl
ld (bufdat+3),a
- ld a,c
- ld (bufdat+0),a
ld hl,inimsg
call msg.sout
+bfi_3:
pop hl
- inc c
djnz bfi_1
ret
- rept 20
- db 0
- endm
-
buffers:
- dw msg_fifo
- dw tx.buf
- dw rx.buf
+ db 0
+ dw mtx.fifo
+ db 1
+ dw mrx.fifo
+ db 2
+ dw co.fifo
+ db 3
+ dw ci.fifo
+buftablen equ ($ - buffers)/3
inimsg:
- db inimsg_e - $ -2
- db PMSG
+ db inimsg_e - $ -1
db 81h
db inimsg_e - $ -1
db 0
@@ -408,7 +421,6 @@ bufdat:
db 0
inimsg_e:
-endif
;
;----------------------------------------------------------------------