Skip to content

Commit 14aec16

Browse files
fix stack pointer
1 parent 864d67e commit 14aec16

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,4 @@ nix-shell -p imagemagick --run "convert frame.ppm frame.png"
136136

137137
python convert.py
138138

139-
python.exe .\load_program.py .\programs\test.hex --port COM6
139+
python.exe .\load_program.py .\programs\test.hex --port COM6

programs/hello.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__attribute__((naked)) void _start(void) {
22
__asm__ volatile(
3-
"li sp, 0x8000\n" // top of 32KB RAM
3+
"li sp, 0x4000\n" // top of 32KB RAM
44
"call main\n"
55
"loop: j loop\n");
66
}

programs/hello.hex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
00008137
1+
00004137
22
00c000ef
33
0000006f
44
00000013

programs/hello.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
_start:
1111
#APP
1212
# 2 "./programs/hello.c" 1
13-
li sp, 0x8000
13+
li sp, 0x4000
1414
call main
1515
loop: j loop
1616

0 commit comments

Comments
 (0)