Espresso 0.0.2c
This commit is contained in:
22
libc/stdio.c
Normal file
22
libc/stdio.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include "include/string.h"
|
||||
|
||||
#include "../syscall.h"
|
||||
|
||||
#include "include/stdio.h"
|
||||
|
||||
|
||||
int writestring(const char* __s)
|
||||
{
|
||||
/*syscall1(SYS_TERMINAL_WRITESTRING, __s);*/
|
||||
return syscall3(SYS_WRITE, 1, __s, strlen(__s));
|
||||
}
|
||||
|
||||
void writechar(char __c)
|
||||
{
|
||||
syscall1(SYS_TERMINAL_PUTCHAR, __c);
|
||||
}
|
||||
|
||||
int getstring(char* __str)
|
||||
{
|
||||
return syscall3(SYS_READ, 0, __str, 0);
|
||||
}
|
||||
Reference in New Issue
Block a user