From: Leo C Date: Wed, 22 May 2019 16:22:42 +0000 (+0200) Subject: Add iobyte and console i/o drivers. WIP X-Git-Tag: v0.6~2 X-Git-Url: http://cloudbase.mooo.com/gitweb/ddt180.git/commitdiff_plain/58a0ff859f66987bede0399473118829c90ec0ae?ds=inline Add iobyte and console i/o drivers. WIP --- 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