1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-30 20:38:05 +11:00
collapseos/blk/583
Virgil Dupras 9424770caa rc2014: add a declaration part to ACIA drivers
Driver configuration don't need their own words at runtime, we only
need to compile them as literals when compiling words.

Now that we have this "declaration blocks" pattern emerging, it
seems like a good idea to take advantage of this in drivers, both
for simplifying the xcomp unit and to make final binary slimmer.
2020-06-28 17:30:01 -04:00

14 lines
455 B
Plaintext

(entry) ~ACIA ( Set RST 38 jump ) PC ORG @ 0x39 + !
AF PUSH, HL PUSH, DE PUSH,
( Read our character from ACIA into our BUFIDX )
ACIA_CTL INAi,
0x01 ANDi, ( is ACIA rcv buf full? )
IFNZ,
( correct interrupt cause )
ACIAW> LDHL(n),
( is it == to ACIAR>? )
( +0 == ACIAR> )
DE ACIAR> LDdd(n),
( carry cleared from ANDi above )
DE SBCHLd, ( cont. )