feat(chibio): implement serial driver bindings for CHIBI/O

This commit is contained in:
2025-10-19 19:22:33 -05:00
parent e71c23da39
commit ec43c11443

View File

@@ -23,6 +23,28 @@ CHIBIO
tfr d,x ; Put in X for indexing mode
jmp [CHIBIOPTRTBL,x] ; Jump!
; Jump table TODO: Document function IDs and pointers
; Jump table
CHIBIOPTRTBL
fdb $8000 ; TODO Implement BIOS function wrappers (serial, etc)
fdb CIOPOUTCHAR ; serial/POUTCHAR wrapper
fdb CIOPOUTZSTR ; serial/POUTZSTR wrapper
fdb CIOPINCHAR ; serial/CIOPINCHAR wrapper
; POUTCHAR wrapper
; @param B: char to write
CIOPOUTCHAR
tfr b,a
jsr POUTCHAR
rti
; POUTZSTR wrapper
; @param X: start of zstring
CIOPOUTZSTR
jsr POUTZSTR
rti
; PINCHAR
; @return A: filled with char from RX buffer or NUL if no char is ready
; @return B: filled with LSR status codes masked with $9F
CIOPINCHAR
jsr PINCHAR
rti