aboutsummaryrefslogtreecommitdiff
path: root/src/lib/libkogata/syscall.c
blob: 342426b450370144647cc4f68012efb95ec243ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <debug.h>
#include <syscall.h>

#include <string.h>

void dbg_print(const char* str) {
	asm volatile("int $0x40"::"a"(SC_DBG_PRINT),"b"(str),"c"(strlen(str)));
}

void yield() {
	asm volatile("int $0x40"::"a"(SC_YIELD));
}

void exit(int code) {
	asm volatile("int $0x40"::"a"(SC_EXIT),"b"(code));
}