summaryrefslogtreecommitdiff
path: root/z180/r3init.180
diff options
context:
space:
mode:
authorLeo C2014-10-20 13:19:34 +0200
committerLeo C2014-10-20 13:19:34 +0200
commitbad2d92d98f9990ee5ccf509c0eafe5b3af9f4dc (patch)
tree5f40467c58dc2aa6aad35c96575506a4784e0444 /z180/r3init.180
parent6dc26e92c20eedcfcba9e0b75a015a5b160748c5 (diff)
downloadz180-stamp-bad2d92d98f9990ee5ccf509c0eafe5b3af9f4dc.zip
Define fifos: msg_tx_fifo, msg_rx_fifo
Diffstat (limited to 'z180/r3init.180')
-rw-r--r--z180/r3init.18060
1 files changed, 24 insertions, 36 deletions
diff --git a/z180/r3init.180 b/z180/r3init.180
index 0d3e5be..1936c9b 100644
--- a/z180/r3init.180
+++ b/z180/r3init.180
@@ -94,8 +94,8 @@ start:
ld a,M_NCD ;No Clock Divide
out0 (ccr),a
- ld a,M_X2CM ;X2 Clock Multiplier
- out0 (cmr),a
+; ld a,M_X2CM ;X2 Clock Multiplier
+; out0 (cmr),a
; search warm start mark
@@ -280,12 +280,9 @@ wstart:
call prt0_init
-
-;;; call bufferinit
-
-
call $coninit
+ call bufferinit
@@ -301,7 +298,6 @@ wstart:
ld e,a ;
jp ddtz ;0290
-
;
;----------------------------------------------------------------------
;
@@ -317,56 +313,48 @@ buf.init:
ret
;----------------------------------------------------------------------
-if 0
- extrn msginit,msg.sout,msg_fifo
- extrn tx.buf,rx.buf
+ extrn msginit,msg_tx_fifo,msg_rx_fifo
+ extrn msg.sout
bufferinit:
- call msginit
- ld hl,buffers
- ld bc,0300h
-bfi_1:
- ld e,(hl)
- inc hl
- ld d,(hl)
- inc hl
- push hl
+ ld de,msg_tx_fifo
in0 a,cbr
call log2phys
ld (40h+0),hl
ld (40h+2),a
- ld a,c
+
+ ld (bufdat+1),hl
+ ld (bufdat+3),a
+ xor a
ld (bufdat+0),a
ld hl,inimsg
call msg.sout
- pop hl
- inc c
- djnz bfi_1
- ret
- rept 20
- db 0
- endm
+ ld de,msg_rx_fifo
+ in0 a,cbr
+ call log2phys
+ ld (bufdat+1),hl
+ ld (bufdat+3),a
+ ld a,1
+ ld (bufdat+0),a
+ ld hl,inimsg
+ call msg.sout
-buffers:
- dw msg_fifo
- dw tx.buf
- dw rx.buf
+ ret
inimsg:
- db inimsg_e - $ -2
- db PMSG
+ db inimsg_e - $ - 1
db 81h
- db inimsg_e - $ -1
+ db inimsg_e - $ - 1
db 0
bufdat:
db 0
dw 0
db 0
inimsg_e:
-endif
+
;----------------------------------------------------------------------
;
if 0
@@ -379,7 +367,7 @@ bufferinit:
call msginit
ld hl,buffers
- ld bc,0300h
+ ld bc,0300h ; b:count, c:buffer nr
bfi_1:
ld e,(hl)
inc hl