diff --git a/libc/stdio.c b/libc/stdio.c index 3feb9d8..4191e78 100644 --- a/libc/stdio.c +++ b/libc/stdio.c @@ -1,11 +1,13 @@ void print(char* s) { - asm("mov %0, %%edx" :: "r" (s)); - asm("int $0x21"); + asm("mov %0, %%eax" :: "r" (s)); + asm("mov $0, %edx"); + asm("int $0x80"); } void input(char* buf) { - asm("mov %0, %%edx" :: "r" (buf)); - asm("int $0x22"); + asm("mov %0, %%eax" :: "r" (buf)); + asm("mov $1, %edx"); + asm("int $0x80"); }