~ecs/k

ref: 354b6b991e68fe3ab6bdb0ff42f3261064ba6b21 k/boot.c -rw-r--r-- 255 bytes
354b6b99 — Eyal Sawady Initial commit 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
void
kmain(void)
{
	const char *str = "Hello, world!";
	char *console = (char*)0xb8000;

	for (int i = 0; i < 80 * 25 * 2; i += 2) {
		console[i] = ' ';
		console[i + 1] = 0x7;
	}

	for (int i = 0; str[i]; i++) {
		console[2 * i] = str[i];
	}

	return;
}