projects
/
cortex-from-scratch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
static RAM (.data) usage
[cortex-from-scratch]
/
start.asm
diff --git
a/start.asm
b/start.asm
index
8991594
..
8af6fea
100644
(file)
--- a/
start.asm
+++ b/
start.asm
@@
-9,14
+9,23
@@
_start:
/* Start of main program */
start:
/* Start of main program */
start:
- movs r0, #
10
- movs r1, #
5
+ movs r0, #
5
+ movs r1, #
1
loop:
adds r1, r0
subs r0, #1
bne loop
loop:
adds r1, r0
subs r0, #1
bne loop
-/* Result is now in R1 */
+ /* Result is now in R1 */
+ ldr r0, =Result
+ str r1, [r0]
+
deadloop:
b deadloop
deadloop:
b deadloop
+
+ .data
+ .word 0 /* add two words*/
+ .word 0
+Result:
+ .word 0 /* results now is in 0x20000008 (0x20000000 + 2 w) */
.end
.end