added more code
This commit is contained in:
1 parent
5a2894ed1b
commit
7dabaef6f6
2345 files changed
+1343530
No files matched your search
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
volatile unsigned int * const UART0DR = (unsigned int *)0x101f1000;
|
||||
// UART0 is the terminal running at 0x101f1000
|
||||
// UART0DR is the register used to transmit and receive bytes
|
||||
|
||||
void print_uart0(const char *s) {
|
||||
while(*s != '\0') { /* Loop until end of string */
|
||||
*UART0DR = (unsigned int)(*s); /* Transmit char */
|
||||
s++; /* Next char */
|
||||
}
|
||||
}
|
||||
|
||||
void c_entry() {
|
||||
print_uart0("Hello world!\n");
|
||||
}
|
||||
Reference in new issue
Block a user