CAP/TP01/riscv/minmax.s
2024-09-23 13:39:04 +02:00

27 lines
413 B
ArmAsm

.text
.globl main
main:
addi sp,sp,-16
sd ra,8(sp)
## TODO Your assembly code there
addi t0, zero, 17
addi t1, zero, 12
blt t0, t1, inf
sb zero, t1, min
j end
inf:
sb zero, t2, min
## END TODO End of user assembly code
end:
ld ra,8(sp)
addi sp,sp,16
ret
# Data comes here
.section .data
mydata:
.dword 7
.dword 42
min:
.dword 8