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
c9781c73e7e2 Added first kernel files
Windel Bouwman
parents:
diff changeset
1 module memory;
293
6aa721e7b10b Try to improve build sequence
Windel Bouwman
parents: 283
diff changeset
2
377
9667d78ba79e Switched to xml for project description
Windel Bouwman
parents: 367
diff changeset
3 import arch;
381
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 377
diff changeset
4 import io;
283
c9781c73e7e2 Added first kernel files
Windel Bouwman
parents:
diff changeset
5
301
6753763d3bec merge codegen into ppci package
Windel Bouwman
parents: 296
diff changeset
6 var int ptr;
283
c9781c73e7e2 Added first kernel files
Windel Bouwman
parents:
diff changeset
7
367
577ed7fb3fe4 Try to make thumb work again
Windel Bouwman
parents: 359
diff changeset
8 function void init()
577ed7fb3fe4 Try to make thumb work again
Windel Bouwman
parents: 359
diff changeset
9 {
381
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 377
diff changeset
10 ptr = 0;
6df89163e114 Fix section and ldr pseudo instruction
Windel Bouwman
parents: 377
diff changeset
11 io.print2("ptr = ", ptr);
367
577ed7fb3fe4 Try to make thumb work again
Windel Bouwman
parents: 359
diff changeset
12 // TODO
577ed7fb3fe4 Try to make thumb work again
Windel Bouwman
parents: 359
diff changeset
13 }
577ed7fb3fe4 Try to make thumb work again
Windel Bouwman
parents: 359
diff changeset
14
296
9417caea2eb3 Directorized some backend files
Windel Bouwman
parents: 293
diff changeset
15 function u8* Alloc(int size)
283
c9781c73e7e2 Added first kernel files
Windel Bouwman
parents:
diff changeset
16 {
296
9417caea2eb3 Directorized some backend files
Windel Bouwman
parents: 293
diff changeset
17 ptr = ptr + size;
301
6753763d3bec merge codegen into ppci package
Windel Bouwman
parents: 296
diff changeset
18 return cast<u8*>(ptr);
283
c9781c73e7e2 Added first kernel files
Windel Bouwman
parents:
diff changeset
19 }
c9781c73e7e2 Added first kernel files
Windel Bouwman
parents:
diff changeset
20
c9781c73e7e2 Added first kernel files
Windel Bouwman
parents:
diff changeset
21