summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo C2019-05-22 18:22:42 +0200
committerLeo C2019-05-22 18:22:42 +0200
commit58a0ff859f66987bede0399473118829c90ec0ae (patch)
treece03cfdfa7573a4a060dff1f3b9d9bb54585eb2e
parenta3bccdeb0f929b999c07c180da6615da6460b1ad (diff)
downloadddt180-58a0ff859f66987bede0399473118829c90ec0ae.zip
Add iobyte and console i/o drivers. WIP
-rw-r--r--ddt180.z8023
1 files changed, 16 insertions, 7 deletions
diff --git a/ddt180.z80 b/ddt180.z80
index 7f0ff31..6f701ff 100644
--- a/ddt180.z80
+++ b/ddt180.z80
@@ -43,9 +43,10 @@ di_or_ei: ;ints enabled/disabled while ddtz is running
nop
ret
-?const: jp 0 ; return console input status
-?conin: jp 0 ; return console input character
-?cono: jp 0 ; send console output character
+convec:
+const: jp cist ; return console input status
+conin: jp ci ; return console input character
+conout: jp co ; send console output character
;-------------------------------------------------------------------------------
@@ -142,7 +143,7 @@ init::
LD SP,stack
ld hl,(1) ;wboot addr
- ld de,?const
+ ld de,convec
ex de,hl
ld b,3
vini_l:
@@ -184,6 +185,14 @@ l0093h:
;-------------------------------------------------------------------------------
+cist:
+ci:
+co:
+ ret
+
+
+;-------------------------------------------------------------------------------
+
CMDTAB::
; dw ERROR ;cmd_@ ;examine/substitute the displacement register @
; dw ERROR ;cmd_A ;Assemble
@@ -383,7 +392,7 @@ outchar:
push af
and 07fh
ld c,a
- call ?cono
+ call conout
ld hl,con_col
inc (hl)
pop af
@@ -416,10 +425,10 @@ inchar:
push hl
push de
push bc
- call ?const
+ call const
and a
jr z,inch1
- call ?conin
+ call conin
scf
inch1:
pop bc