Eventually I want the kernel to be loaded from the SD card as well, but it still needs to separate from user programs. At some point there should be a folder just for the BIOS, which should read from the boot block of the SD card and start executing, and thats it.
24 lines
405 B
C
24 lines
405 B
C
|
|
#include <stdint.h>
|
|
#include <conio.h>
|
|
|
|
#include "devices/interrupt.h"
|
|
#include "devices/uart.h"
|
|
|
|
char lastchar;
|
|
|
|
|
|
void handle_irq() {
|
|
uint8_t status;
|
|
|
|
status = irq_get_status();
|
|
|
|
if (status & BUTTON) {
|
|
cputs("Button Interrupt!\n");
|
|
irq_set_status(status & ~BUTTON);
|
|
}
|
|
if (status & UART) {
|
|
lastchar = uart_rxb();
|
|
irq_set_status(status & ~UART);
|
|
}
|
|
} |