add tw document 01-HelloOs

This commit is contained in:
ccckmit
2020-11-14 17:08:52 +08:00
parent cdeb1fb7f1
commit f262ca56ba
15 changed files with 357 additions and 1 deletions

View File

@@ -1,6 +1,5 @@
#include <stdint.h>
// ref: https://www.activexperts.com/serial-port-component/tutorials/uart/
#define UART 0x10000000
#define UART_THR (uint8_t*)(UART+0x00) // THR:transmitter holding register
#define UART_LSR (uint8_t*)(UART+0x05) // LSR:line status register
@@ -18,5 +17,6 @@ void lib_puts(char *s) {
int os_main(void)
{
lib_puts("Hello OS!\n");
while (1) {}
return 0;
}