SummerCart64/fw/btldr/btldr.c

18 lines
344 B
C
Raw Normal View History

2021-08-12 21:07:47 +02:00
#include "btldr.h"
2021-08-05 19:50:29 +02:00
2021-08-12 21:07:47 +02:00
int reset_handler (void) {
io8_t pointer = &RAM;
while (!(UART_SR & UART_SR_TXE));
UART_TX = '>';
2021-08-05 19:50:29 +02:00
while (1) {
2021-08-12 21:07:47 +02:00
if (UART_SR & UART_SR_RXNE) {
*pointer++ = UART_RX;
}
if ((uint32_t)pointer == (24 * 1024)) {
__asm__("call 0");
2021-08-05 19:50:29 +02:00
}
}
}