aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2001-12-10 09:36:55 +0000
committerhpa <hpa>2001-12-10 09:36:55 +0000
commitef08f2558ee8126cbe95fdf7e6f22da540b3fc4b (patch)
treef5d43485b6f7b3ea0570dd949a698eaab28123ed
parent7ea877cf24fdbb3968d4e818c6664a6478ffba45 (diff)
downloadsyslinux-1.65-pre3.tar.gz
syslinux-1.65-pre3.tar.xz
syslinux-1.65-pre3.zip
Hello, World now working...syslinux-1.65-pre3
-rw-r--r--memdisk/conio.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/memdisk/conio.c b/memdisk/conio.c
index 744dc52c..c2f8616a 100644
--- a/memdisk/conio.c
+++ b/memdisk/conio.c
@@ -22,12 +22,18 @@
int putchar(int ch)
{
- if ( ch == '\n' )
- putchar('\r'); /* \n -> \r\n */
+ if ( ch == '\n' ) {
+ /* \n -> \r\n */
+ asm volatile("movw $0x0e0d,%%ax ; "
+ "movw $0x0007,%%bx ; "
+ "int $0x10"
+ ::: "eax", "ebx", "ecx", "edx",
+ "esi", "edi", "ebp");
+ }
- asm volatile("int $0x10"
- :: "a" ((uint16_t)(0x0e00|(ch&0xff))),
- "b" ((uint16_t)0x07)
+ asm volatile("movw $0x0007,%%bx ; "
+ "int $0x10"
+ :: "a" ((uint16_t)(0x0e00|(ch&0xff)))
: "eax", "ebx", "ecx", "edx",
"esi", "edi", "ebp");