Fixed backspace, mostly

This commit is contained in:
DavidBuchanan314 2017-02-08 15:37:31 +00:00
parent 622a2dda85
commit b9d74c2a85
1 changed files with 4 additions and 0 deletions

4
6850.c
View File

@ -29,6 +29,7 @@ int stdin_ready() {
void step_uart() {
if (write_addr == &memory[DATA_ADDR]) {
putchar(memory[DATA_ADDR]);
if (memory[DATA_ADDR] == '\b') printf(" \b");
fflush(stdout);
write_addr = NULL;
} else if (read_addr == &memory[DATA_ADDR]) {
@ -46,6 +47,9 @@ void step_uart() {
printf("\r\n");
exit(0);
}
if (incoming_char == 0x7F) { // Backspace
incoming_char = '\b';
}
uart_SR.bits.RDRF = 1;
}
}