Mercurial > lcfOS
diff kernel/memory.c3 @ 408:ad6be5454067
Added image build task
author | Windel Bouwman |
---|---|
date | Sat, 21 Feb 2015 12:17:47 +0100 |
parents | 0fb6633c42f6 |
children | 6aa9743ed362 |
line wrap: on
line diff
--- a/kernel/memory.c3 Fri Feb 20 15:47:54 2015 +0100 +++ b/kernel/memory.c3 Sat Feb 21 12:17:47 2015 +0100 @@ -9,7 +9,7 @@ function void init() { - ptr = 0x80000; + ptr = 0x60080000; } function byte* alloc(int size) @@ -25,10 +25,24 @@ return ptr2; } +function byte* allocate_physical() +{ + return 0; +} + +function byte* allocate_virtual(byte* address) +{ + var byte* address2; + address2 = allocate_physical(); + return address2; +} + function void memcpy(byte* dst, byte* src, int size) { var int i; - for (i = 0; i < size; i = i + 1) + io.print2("memcpy to ", cast<int>(dst)); + io.print2("memcpy from ", cast<int>(src)); + for (i = 0; i < size; i += 1) { *(dst + i) = *(src + i); }