mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
13 lines
398 B
Plaintext
13 lines
398 B
Plaintext
import uart;
|
|
import semihost;
|
|
|
|
const UART0_BASE = 0x10000000;
|
|
|
|
fn void main() @export("main")
|
|
{
|
|
Uart* uart0 = (Uart*)UART0_BASE; // Create pointer to UART 0
|
|
uart0.fcr = uart::UARTFCR_FFENA; // Enable FIFO
|
|
uart0.puts("Hello World!\n"); // Write the string to the UART
|
|
semihost::exit(0); // Semihosting call to exit host
|
|
}
|