Fixed libc
This commit is contained in:
parent
864d607810
commit
e66040a0c3
10
libc/stdio.c
10
libc/stdio.c
|
@ -1,11 +1,13 @@
|
||||||
void print(char* s)
|
void print(char* s)
|
||||||
{
|
{
|
||||||
asm("mov %0, %%edx" :: "r" (s));
|
asm("mov %0, %%eax" :: "r" (s));
|
||||||
asm("int $0x21");
|
asm("mov $0, %edx");
|
||||||
|
asm("int $0x80");
|
||||||
}
|
}
|
||||||
|
|
||||||
void input(char* buf)
|
void input(char* buf)
|
||||||
{
|
{
|
||||||
asm("mov %0, %%edx" :: "r" (buf));
|
asm("mov %0, %%eax" :: "r" (buf));
|
||||||
asm("int $0x22");
|
asm("mov $1, %edx");
|
||||||
|
asm("int $0x80");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue