projects
/
3sys
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
console cursor positioning
[3sys]
/
sys1
/
kern
/
src
/
main.c
1
#include <stdio.h>
2
#include <string.h>
3
#include <stdint.h>
4
#include "con.h"
5
#include "vga.h"
6
#include "mem.h"
7
#include "intr.h"
8
9
void kmain(void)
10
{
11
int i, line;
12
13
con_init();
14
15
mem_init();
16
intr_init();
17
18
line = 0;
19
for(;;) {
20
printf("line %d", line++);
21
22
con_pushcur();
23
con_setcur(30, 0);
24
for(i=0; i<65536 * 300; i++) {
25
if((i & 0xfffff) == 0) {
26
con_setcolor(VGA_BRIGHT | (line & 7), VGA_BLACK);
27
con_putchar('>');
28
}
29
}
30
con_setcolor(VGA_WHITE, VGA_BLACK);
31
con_popcur();
32
con_putchar('\n');
33
}
34
}