projects
/
3sys
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
vga text output and libc expansion
[3sys]
/
sys1
/
kern
/
src
/
main.c
1
#include <stdio.h>
2
#include <string.h>
3
#include <stdint.h>
4
#include "vga.h"
5
6
void drawtext(int x, int y, const char *s)
7
{
8
while(*s) {
9
vga_drawchar(x++, y, *s++);
10
}
11
}
12
13
void kmain(void)
14
{
15
char buf[64];
16
17
vga_reset();
18
vga_setcolor(VGA_YELLOW | VGA_BRIGHT, VGA_BLACK);
19
20
sprintf(buf, "kmain addr: %p", (void*)kmain);
21
drawtext(10, 5, buf);
22
}