summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/core/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/core/console.c')
-rw-r--r--contrib/syslinux-4.02/core/console.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/core/console.c b/contrib/syslinux-4.02/core/console.c
new file mode 100644
index 0000000..282c57f
--- /dev/null
+++ b/contrib/syslinux-4.02/core/console.c
@@ -0,0 +1,22 @@
+#include <stddef.h>
+#include <com32.h>
+#include <stdio.h>
+#include <string.h>
+
+void myputchar(int c)
+{
+ static com32sys_t ireg;
+
+ if (c == '\n')
+ myputchar('\r');
+
+ ireg.eax.b[1] = 0x02;
+ ireg.edx.b[0] = c;
+ __intcall(0x21, &ireg, NULL);
+}
+
+void myputs(const char *str)
+{
+ while (*str)
+ myputchar(*str++);
+}