Fixed libc

This commit is contained in:
vanten-s 2024-08-10 01:19:50 +02:00
parent 864d607810
commit e66040a0c3
Signed by: vanten-s
GPG key ID: DE3060396884D3F2

View file

@ -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");
}