aboutsummaryrefslogblamecommitdiff
path: root/src/lib/libkogata/syscall.c
blob: b9cefa7b167fea7cfe91c7ae713a81da95fb35ee (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                    

                   
                                 
                                                                               


              




                                                          
 

                                   
#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));
}

/* vim: set ts=4 sw=4 tw=0 noet :*/