From 828bb38a9a69de09ae5ee7cad7da723737c69ee4 Mon Sep 17 00:00:00 2001 From: giomba Date: Mon, 16 Oct 2023 22:12:08 +0200 Subject: [PATCH] Add routine to read from IO space from C. --- src/io_a.asm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/io_a.asm b/src/io_a.asm index dcf2f82..9fe1ade 100644 --- a/src/io_a.asm +++ b/src/io_a.asm @@ -16,3 +16,19 @@ _io_out: pop ix ret + +PUBLIC _io_in +_io_in: + push ix + ld ix,$0000 + add ix,sp + + push bc + + ld c,(ix+$04) + in l,(c) + + pop bc + + pop ix + ret