diff --git a/src/biosint.s b/src/biosint.s index 786f102..71b38f0 100644 --- a/src/biosint.s +++ b/src/biosint.s @@ -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