X-Git-Url: http://git.subgeniuskitty.com/pdp11-modern-c/.git/blobdiff_plain/846f4d60e4994a39decd6c27463411f53965fc60..202004d54803c861f7fbaa9169eaad750c63f7cf:/pdp11/pdp11_slu.h diff --git a/pdp11/pdp11_slu.h b/pdp11/pdp11_slu.h new file mode 100644 index 0000000..9949360 --- /dev/null +++ b/pdp11/pdp11_slu.h @@ -0,0 +1,27 @@ +// (c) 2020 Aaron Taylor +// See License.txt file for copyright and license details. + +#ifndef SGK_PDP11_SLU_H +#define SGK_PDP11_SLU_H + +#include +#include "pdp11.h" + +/* + * Polled IO functions for default console port. + */ +void putch(uint16_t c); +uint16_t getch(void); + +/* + * Simple printf function. Replaces: + * %s - Print a string + * %o - Print a uint16 in octal + * \n - Print a newline suitable for this system ('\r\n') + * \t - Print a tab + * \% - Print a '%' + * Also converts existing newlines in the 'format' string to '\r\n'. + */ +void printf(const char * format, ...); + +#endif // SGK_PDP11_SLU_H