1
|
1 /* markus schnalke <meillo@marmaro.de> */
|
|
2
|
|
3 #include "io.h"
|
|
4 #include "mem.h"
|
|
5
|
|
6 void
|
|
7 kmain(void)
|
|
8 {
|
|
9 unsigned char* p;
|
|
10
|
|
11 cls();
|
|
12 printf("OS says: Hi!\n\n");
|
|
13
|
|
14 initmem(0x00400000); /* heap starts at 4MB */
|
|
15
|
|
16 printf("init done\n");
|
|
17 printf("\n");
|
|
18
|
|
19 p = malloc(28);
|
|
20 printf("allocated %d bytes at %p\n", 28, p);
|
|
21 p = malloc(15);
|
|
22 printf("allocated %d bytes at %p\n", 15, p);
|
|
23
|
|
24 printf("aa %d bb %c cc %s\n", 5, '@', "hallo");
|
|
25 printf("minmem: %p\n", 0x00400000);
|
|
26
|
|
27 setpos(24, 0);
|
|
28 printf("loop\n");
|
|
29 while (1) {
|
|
30 }
|
|
31 }
|