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.
13 lines
778 B
13 lines
778 B
# Runtime support function abort (does not return).
|
|
mv t0, a0 # Save exit code in temp
|
|
li a0, @print_string # Code for print_string ecall
|
|
ecall # Print error message in a1
|
|
li a1, 10 # Load newline character
|
|
li a0, @print_char # Code for print_char ecall
|
|
ecall # Print newline
|
|
mv a1, t0 # Move exit code to a1
|
|
li a0, @exit2 # Code for exit2 ecall
|
|
ecall # Exit with code
|
|
abort_17: # Infinite loop
|
|
j abort_17 # Prevent fallthrough
|