summaryrefslogtreecommitdiff
path: root/memdisk/conio.c
diff options
context:
space:
mode:
authorhpa <hpa>2003-04-10 06:28:08 +0000
committerhpa <hpa>2003-04-10 06:28:08 +0000
commitd2db81f142edd2040e86b1ab52502c6ae96b8951 (patch)
tree93f485b85de7b13dfce28c785adad3ef056b8c90 /memdisk/conio.c
parentdff695ae6570c029de9ffea3969ff1ae43236a0e (diff)
downloadsyslinux-d2db81f142edd2040e86b1ab52502c6ae96b8951.tar.gz
Convert to using a 32-bit installer framework, in preparation for
supporting gzip compressed images
Diffstat (limited to 'memdisk/conio.c')
-rw-r--r--memdisk/conio.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/memdisk/conio.c b/memdisk/conio.c
index 1efe724e..34a75b35 100644
--- a/memdisk/conio.c
+++ b/memdisk/conio.c
@@ -18,26 +18,20 @@
*/
#include <stdint.h>
+#include "memdisk.h"
#include "conio.h"
int putchar(int ch)
{
+ com32sys_t regs;
+
if ( ch == '\n' ) {
/* \n -> \r\n */
- asm volatile("movw $0x0e0d,%%ax ; "
- "movw $0x0007,%%bx ; "
- "int $0x10"
- ::: "eax", "ebx", "ecx", "edx",
- "esi", "edi", "ebp");
+ putchar('\r');
}
- {
- uint16_t ax = 0x0e00|(ch&0xff);
- asm volatile("movw $0x0007,%%bx ; "
- "int $0x10"
- : "+a" (ax)
- :: "ebx", "ecx", "edx", "esi", "edi", "ebp");
- }
+ regs.eax.w[0] = 0x0e00|(ch&0xff);
+ syscall(0x10, &regs, NULL);
return ch;
}