a risc-v simulator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
vriscv/tests/swlw.s

21 lines
322 B

.global _start
_start:
# Set base value of a0 to 'test failed'
addi a0, zero, 1
# Store Word 0xBA at 0x104
addi t0, zero, 0x100
addi t1, zero, 0xBA
sw t1, 4(t0)
# Load Word at 0x104 in t0
lw t0, 4(t0)
# Compare
beq t0, t1, good
ebreak
good:
addi a0, zero, 0
ebreak