summaryrefslogtreecommitdiff
path: root/Source/Library/Userland/Syscall/Syscall.wtf.cpp
blob: a28c202db85effeb3925e644eed0b015cb0867a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "Syscall.wtf.h"

u32int syscall(u32int n, u32int a, u32int b, u32int c, u32int d, u32int e) {
	u32int r;
	asm volatile ("int $64;"
			: "=a"(r) : "a"(n), "b"(a), "c"(b), "d"(c), "D"(d), "S"(e));
	return r;
}

void putch(char c) {
	u32int x = c;
	syscall(0xFFFFFF01, x);
}

void sleep(u32int t) {
	syscall(0xFFFFFF02, t);
}

void write_hex(u32int n) {
	syscall(0XFFFFFF03, n);
}