mirror of
https://github.com/plctlab/riscv-operating-system-mooc.git
synced 2025-11-16 12:34:47 +00:00
17 lines
435 B
ArmAsm
17 lines
435 B
ArmAsm
# Substract Immediate
|
|
# Description:
|
|
# There is no “subtract immediate” instruction because subtraction is
|
|
# equivalent to adding a negative value of immediate.
|
|
|
|
.text # Define beginning of text section
|
|
.global _start # Define entry _start
|
|
|
|
_start: # Label, not really required
|
|
li x6, 30 # x5 = 1
|
|
addi x5, x6, -20 # x5 = x6 - 20
|
|
|
|
stop:
|
|
j stop # Infinite loop to stop execution
|
|
|
|
.end # End of file
|