summaryrefslogtreecommitdiff
path: root/z180
diff options
context:
space:
mode:
authorLeo C2015-06-01 23:29:55 +0200
committerLeo C2015-06-01 23:29:55 +0200
commitad9bc17c8ecab1f0bbd26f2270d4d396f4bc5e52 (patch)
tree0ce8f07e46c5447f7e3d1abd28a53904a431c8d4 /z180
parenta8eb521f94848a627a3fe470e34f62b13c157d34 (diff)
downloadz180-stamp-ad9bc17c8ecab1f0bbd26f2270d4d396f4bc5e52.zip
switch fifos conin,conouthexrel-6.2
Diffstat (limited to 'z180')
-rw-r--r--z180/conbuf-a.1802
-rw-r--r--z180/config.inc9
-rw-r--r--z180/ddtz.18019
-rw-r--r--z180/init.1804
4 files changed, 23 insertions, 11 deletions
diff --git a/z180/conbuf-a.180 b/z180/conbuf-a.180
index e86b8b2..0a35195 100644
--- a/z180/conbuf-a.180
+++ b/z180/conbuf-a.180
@@ -19,8 +19,8 @@
dseg
- mkbuf co.fifo_id, co.fifo, co.fifo_len
mkbuf ci.fifo_id, ci.fifo, ci.fifo_len
+ mkbuf co.fifo_id, co.fifo, co.fifo_len
;--------------------------------------------------------------
diff --git a/z180/config.inc b/z180/config.inc
index 7b6d7ac..2a8a842 100644
--- a/z180/config.inc
+++ b/z180/config.inc
@@ -151,7 +151,7 @@ AVRINT6 equ 5Fh
; Definition of (logical) top 2 memory pages
sysram_start equ 0FE00h
-stacksize equ 80
+bs$stack$size equ 80
isvsw_loc equ 0FEE0h
@@ -198,3 +198,10 @@ inidate macro
dseg
ds ??ps.len
endm
+
+;-----------------------------------------------------
+
+b0call macro address
+ call _b0call
+ dw address
+ endm
diff --git a/z180/ddtz.180 b/z180/ddtz.180
index aa4e977..4411549 100644
--- a/z180/ddtz.180
+++ b/z180/ddtz.180
@@ -958,11 +958,11 @@ do_op_mod:
jr l0b58h
; divide x/y
-; x: hl
-; y: de
+; hl: x
+; de: y
; return:
-; x/y: hl
-; rem: de
+; hl: q (x/y)
+; de: r (x%y)
DIV_HL_DE:
push bc
@@ -971,6 +971,11 @@ DIV_HL_DE:
ld c,l
ld hl,0 ;r = 0
ld a,16 ;count
+
+; de: x (x shifted out, q shifted in)
+; bc: y
+; hl: r (initially 0)
+
l0b89h:
ex de,hl ;x
add hl,hl ;x <<= 1
@@ -986,7 +991,7 @@ l0b89h:
div_no_restore:
dec a
jr nz,l0b89h
- ex de,hl
+ ex de,hl ;hl: q de: r
pop bc
ret
@@ -6240,9 +6245,9 @@ vartabe:
;------------------------------------------
- .phase sysram_start+stacksize
+ .phase sysram_start+bs$stack$size
$stack:
-$stcka equ $ - stacksize
+$stcka equ $ - bs$stack$size
curphse defl $
.dephase
diff --git a/z180/init.180 b/z180/init.180
index 11f45ec..b0b4b21 100644
--- a/z180/init.180
+++ b/z180/init.180
@@ -361,9 +361,9 @@ buffers:
db 1
dw mrx.fifo
db 2
- dw co.fifo
- db 3
dw ci.fifo
+ db 3
+ dw co.fifo
buftablen equ ($ - buffers)/3
inimsg: