aboutsummaryrefslogtreecommitdiff
path: root/01-ctest/start.S
diff options
context:
space:
mode:
authorTakamichi Horikawa <myon@myon98.net>2021-12-04 13:41:35 +0900
committerTakamichi Horikawa <myon@myon98.net>2021-12-04 13:41:35 +0900
commit74fe5e24beb14b00ce3d69e5a3010c520d4bf8e5 (patch)
tree7977c7d2df8f02bdea1a2fc0dd50df000eb044e6 /01-ctest/start.S
Initial: vram write test
Diffstat (limited to '01-ctest/start.S')
-rw-r--r--01-ctest/start.S25
1 files changed, 25 insertions, 0 deletions
diff --git a/01-ctest/start.S b/01-ctest/start.S
new file mode 100644
index 0000000..933bf48
--- /dev/null
+++ b/01-ctest/start.S
@@ -0,0 +1,25 @@
+#define VRAMADDR 0x14800000
+#define DISPH 480
+#define DISPW 800
+
+#define DRAM_START 0xa0000000
+#define DRAM_END 0xa4000000
+
+.globl start
+.arm
+start:
+ @setup stack
+ ldr sp, =(DRAM_END)
+ @initialize bss
+ ldr r0, =_edata
+ ldr r1, =_end
+ mov r2, #0
+.Lbssloop:
+ cmp r0, r1
+ bhs .Lbssloopend
+ stmia r0!, {r2}
+ b .Lbssloop
+.Lbssloopend:
+ blx cstart
+.Lhalt:
+ b .Lhalt