commit da33981896d672ce74d31c0c776ceffbc1ff9e6a
parent 188186f19d14278e5217ce39b21042f16fd4562c
Author: Matsuda Kenji <info@mtkn.jp>
Date: Wed, 28 Feb 2024 09:51:32 +0900
use c file
Diffstat:
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/ex3/main.c b/ex3/main.c
@@ -0,0 +1,11 @@
+void puts(char *);
+
+int
+main(void) {
+ puts("C file\n");
+ return 0;
+}
+
+void
+isr_alarm(void) {
+}
diff --git a/ex3/start.s b/ex3/start.s
@@ -123,6 +123,8 @@ wait_vco:
ldr r0, =0x20000 //
bl set_alarm
+ bl main
+
loop:
ldr r0, =message
bl puts
@@ -168,7 +170,6 @@ isr_systick:
pop {pc}
isr_alarm:
- mov r0, sp
push {lr}
// clear interrupt
ldr r3, timer_base
@@ -226,6 +227,7 @@ alpha:
pop {r4, r5, r6, r7, pc}
// puts prints null terminated string starting at r0.
+ .global puts
puts:
push {r4, lr}
mov r4, r0