Mercurial > lcfOS
annotate kernel/src/memory.c3 @ 381:6df89163e114
Fix section and ldr pseudo instruction
author | Windel Bouwman |
---|---|
date | Sat, 26 Apr 2014 17:41:56 +0200 |
parents | 9667d78ba79e |
children | 2ec730e45ea1 |
rev | line source |
---|---|
283 | 1 module memory; |
293 | 2 |
377 | 3 import arch; |
381 | 4 import io; |
283 | 5 |
301 | 6 var int ptr; |
283 | 7 |
367 | 8 function void init() |
9 { | |
381 | 10 ptr = 0; |
11 io.print2("ptr = ", ptr); | |
367 | 12 // TODO |
13 } | |
14 | |
296 | 15 function u8* Alloc(int size) |
283 | 16 { |
296 | 17 ptr = ptr + size; |
301 | 18 return cast<u8*>(ptr); |
283 | 19 } |
20 | |
21 |