1
0
Fork 0
This repository has been archived on 2022-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
riscv-opensbi-hello/src/opensbi.s

25 lines
375 B
ArmAsm

.section .text
.global sbi_console_putchar
.global sbi_console_getchar
# EIDs are stored in a7
# FIDs are stored in a6
# sbi_console_putchar(char) -> void
# Puts a character onto the UART port.
sbi_console_putchar:
li a6, 0
li a7, 1
ecall
ret
# sbi_console_getchar() -> int
# Gets a character from the UART port.
sbi_console_getchar:
li a6, 0
li a7, 2
ecall
ret