CoolPotOS/apps/include/syscall.h

33 lines
840 B
C
Raw Normal View History

2024-08-30 16:12:44 +08:00
#ifndef CRASHPOWEROS_SYSCALL_H
#define CRASHPOWEROS_SYSCALL_H
2024-08-31 12:36:49 +08:00
#define SYSCALL_PUTC 1
2024-08-30 16:12:44 +08:00
#define SYSCALL_PRINT 2
2024-09-01 11:56:39 +08:00
#define SYSCALL_GETCH 3
2024-08-31 12:36:49 +08:00
#define SYSCALL_MALLOC 4
#define SYSCALL_FREE 5
#define SYSCALL_EXIT 6
#define SYSCALL_G_CLEAN 7
2024-09-01 11:56:39 +08:00
#define SYSCALL_GET_CD 8
2024-09-01 14:56:38 +08:00
#define SYSCALL_VFS_FILESIZE 9
#define SYSCALL_VFS_READFILE 10
#define SYSCALL_VFS_WRITEFILE 11
2024-09-01 20:09:41 +08:00
#define SYSCALL_SYSINFO 12
2024-08-30 16:12:44 +08:00
2024-09-01 16:43:58 +08:00
#include "ctype.h"
2024-08-30 16:12:44 +08:00
2024-08-31 12:36:49 +08:00
void syscall_print(char* c);
void syscall_putchar(char c);
2024-09-01 11:56:39 +08:00
char syscall_getch();
2024-08-31 12:36:49 +08:00
void* syscall_malloc(size_t size);
void syscall_free(void *ptr);
void syscall_exit(int code);
void syscall_g_clean();
2024-09-01 11:56:39 +08:00
void syscall_get_cd(char *buffer);
2024-09-01 14:56:38 +08:00
int syscall_vfs_filesize(char* filename);
void syscall_vfs_readfile(char* filename,char* buffer);
void syscall_vfs_writefile(char* filename,char* buffer,unsigned int size);
2024-09-01 20:09:41 +08:00
void* syscall_sysinfo();
2024-08-31 01:23:06 +08:00
2024-08-30 16:12:44 +08:00
#endif