aboutsummaryrefslogtreecommitdiff
path: root/prog/src/prog.s
diff options
context:
space:
mode:
authorFlavian Kaufmann <flavian@flaviankaufmann.ch>2024-05-08 12:12:09 +0200
committerFlavian Kaufmann <flavian@flaviankaufmann.ch>2024-05-08 12:12:09 +0200
commit7ff0d605067d57f638da50e53eb4a7dbb7ef11e6 (patch)
tree96b198b1e2d961d0ae713e086420a003b7307666 /prog/src/prog.s
parentd1133b1f41d426482cb54b747caada8427654b3a (diff)
downloadriscv_cpu-7ff0d605067d57f638da50e53eb4a7dbb7ef11e6.tar.gz
riscv_cpu-7ff0d605067d57f638da50e53eb4a7dbb7ef11e6.zip
build assembly files
Diffstat (limited to 'prog/src/prog.s')
-rw-r--r--prog/src/prog.s24
1 files changed, 24 insertions, 0 deletions
diff --git a/prog/src/prog.s b/prog/src/prog.s
new file mode 100644
index 0000000..bbae5bb
--- /dev/null
+++ b/prog/src/prog.s
@@ -0,0 +1,24 @@
+.section .text
+.globl _start
+
+_start:
+ #la sp, stack_top
+
+ #li a0, 10
+ #li a1, 20
+ #add a2, a0, a1
+ addi t0, zero, 5
+ addi t1, zero, 3
+ add t2, t0, t1
+
+halt_loop:
+ j halt_loop
+
+.section .data
+
+
+.section .bss
+
+.section .stack
+ .space 0x1000 # Allocate stack space
+stack_top: