QDNix
Quick’n’dirty *NIX
init.c
1 #include <stdarg.h>
2 #include <stddef.h>
3 #include <stdint.h>
4 
5 void printk(const char *fmt, ...);
6 
7 extern void (*early_console_putchar)(char);
8 
9 void
10 debug_putchar(char c)
11 {
12  while ((*((unsigned *)0177564) & 0x80) == 0)
13  {
14 
15  }
16  *((char *)0177566) = c;
17  while ((*((unsigned *)0177564) & 0x80) == 0)
18  {
19 
20  }
21 }
22 
23 void
24 arch_init(void)
25 {
26  printk("QDNX hello\n");
27  early_console_putchar = &debug_putchar;
28  printk("\r\nOwO");
29 
30  printk("\r\nyay");
31  return;
32 }