feat(chibio): implement serial driver bindings for CHIBI/O
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user