1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-10-30 11:54:01 -04:00
libkernaux/examples/arch-riscv64-min/main.c

20 lines
312 B
C
Raw Normal View History

2022-01-13 02:11:20 -05:00
#include <stddef.h>
#include <stdint.h>
static unsigned char *const uart = (unsigned char*)0x10000000;
static void putchar(char c) {
*uart = c;
}
static void print(const char * str) {
while (*str != '\0') {
putchar(*str);
str++;
}
}
void main() {
print("Hello world!\r\n");
}