From e66040a0c369947ff2214c857423115d1e8940c3 Mon Sep 17 00:00:00 2001 From: vanten-s Date: Sat, 10 Aug 2024 01:19:50 +0200 Subject: [PATCH] Fixed libc --- libc/stdio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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"); }