#include <sl_words.h>
#include <libclite.h>
-void putchar(int ch)
+int putchar(int ch)
{
if ((ch == '\r') || (ch == '\n')) CallMethod(0, 0, SLWordsIH, "slw_cr");
else CallMethod(1, 0, SLWordsIH, "slw_emit", ch);
+
+ return ch;
+}
+
+int puts(const char *str)
+{
+ while (*str != '\0')
+ putchar(*str++);
+
+ putchar('\n');
+
+ return 0;
}