blob: d5729773336d60aad2459c3df13959bba30c773e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// MIT License, Copyright (c) 2021 Marvin Borner
typedef unsigned int u32;
typedef unsigned short u16;
typedef unsigned char u8;
static void draw(u8 color, u8 data)
{
u16 *out = (u16 *)0xb8000;
for (u16 i = 0; i < 80 * 25; i++) {
out[i] = data | (color << 8);
}
}
int kernel_main(u32 magic, u32 addr, u32 esp); // Decl
int kernel_main(u32 magic, u32 addr, u32 esp)
{
(void)magic;
(void)addr;
(void)esp;
if (magic == 0x2badb002)
draw(0x02, 'y');
else
draw(0x04, 'n');
while (1)
;
return 1;
}
|