summaryrefslogtreecommitdiff
path: root/z180/console.180
diff options
context:
space:
mode:
Diffstat (limited to 'z180/console.180')
-rw-r--r--z180/console.18048
1 files changed, 48 insertions, 0 deletions
diff --git a/z180/console.180 b/z180/console.180
new file mode 100644
index 0000000..d4f4130
--- /dev/null
+++ b/z180/console.180
@@ -0,0 +1,48 @@
+ ;page 255
+ .z80
+
+
+ global $coninit
+ global $cists,$ci
+ global $co
+
+
+ extrn ser.init,ser.ist,ser.in,ser.ost,ser.out
+ extrn ff.init,ff.i.st,ff.in
+ extrn ff.o.st,ff.out
+
+
+ include config.inc
+ include z180reg.inc
+
+ cseg
+;
+;
+
+$coninit:
+ call ff.init
+ call ser.init
+ ret
+
+$cists:
+ call ff.i.st
+ ret nz
+ call ser.ist
+ ret
+
+$ci:
+ call ff.i.st
+ jp nz,ff.in
+ call ser.ist
+ jp nz,ser.in
+ jr $ci
+
+;$costs:
+; jp f.o.st
+
+$co:
+ call ff.out
+ jp ser.out
+
+ end
+