aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk/conio.c
diff options
context:
space:
mode:
Diffstat (limited to 'memdisk/conio.c')
-rw-r--r--memdisk/conio.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/memdisk/conio.c b/memdisk/conio.c
index f1ca699e..1efe724e 100644
--- a/memdisk/conio.c
+++ b/memdisk/conio.c
@@ -30,12 +30,14 @@ int putchar(int ch)
::: "eax", "ebx", "ecx", "edx",
"esi", "edi", "ebp");
}
-
- asm volatile("movw $0x0007,%%bx ; "
- "int $0x10"
- :: "a" ((uint16_t)(0x0e00|(ch&0xff)))
- : "eax", "ebx", "ecx", "edx",
- "esi", "edi", "ebp");
+
+ {
+ uint16_t ax = 0x0e00|(ch&0xff);
+ asm volatile("movw $0x0007,%%bx ; "
+ "int $0x10"
+ : "+a" (ax)
+ :: "ebx", "ecx", "edx", "esi", "edi", "ebp");
+ }
return ch;
}