+void send_string(char* c) {
+ for (; *c; c++) {
+ while (!(_io_ports[M6811_SCSR] & M6811_TDRE)); /* wait for TX ready */
+ _io_ports[M6811_SCDR] = *c; /* send byte */
+ }
+}
+
+void sci_rx_int() {
+ char buf = _io_ports[M6811_SCDR];
+ if (sci_echo) {
+ while (!(_io_ports[M6811_SCSR] & M6811_TDRE)); /* wait for TX ready */
+ _io_ports[M6811_SCDR] = buf; /* send byte */
+ }
+
+ /* XXX FIXME we should do something about errors. nack? */
+ if (sci_have_packet) {