commit f6681f83ad1eadc2f66a1ec907436afc33486fc9
parent 9b0c7c0acbd703df14bd4ecd0a94a88da9c60eef
Author: Matsuda Kenji <info@mtkn.jp>
Date: Tue, 12 Mar 2024 08:06:00 +0900
labels refer to the content of that address, not the address itself
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ex3/main.c b/ex3/main.c
@@ -3,9 +3,10 @@ int puts(char *);
void printh(void *);
void set_alarm(unsigned int);
void proc0(void);
+void halt(void);
extern void proc0_start, proc0_size;
-extern char *msg0;
+extern char msg0;
// A proc represents a process in execution.
typedef struct proc {
@@ -34,8 +35,7 @@ main(void) {
proc *p0 = (proc *) 0x20041000, *p1 = (proc *) 0x20041100; // sram5
memcpy((void *)0x20000000, (void *)&proc0_start, (long) &proc0_size);
- puts(msg0);
-
+ puts(&msg0);
p0->r[13] = (void *) 0x20000100; // sp
p0->r[14] = (void *) 0xdeadbeef; // lr
p0->r[15] = (void *) 0x20000000; // pc