mirror of
https://github.com/DavidBuchanan314/6502-emu.git
synced 2025-01-13 09:30:00 +00:00
Fixed backspace, mostly
This commit is contained in:
parent
622a2dda85
commit
b9d74c2a85
4
6850.c
4
6850.c
@ -29,6 +29,7 @@ int stdin_ready() {
|
|||||||
void step_uart() {
|
void step_uart() {
|
||||||
if (write_addr == &memory[DATA_ADDR]) {
|
if (write_addr == &memory[DATA_ADDR]) {
|
||||||
putchar(memory[DATA_ADDR]);
|
putchar(memory[DATA_ADDR]);
|
||||||
|
if (memory[DATA_ADDR] == '\b') printf(" \b");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
write_addr = NULL;
|
write_addr = NULL;
|
||||||
} else if (read_addr == &memory[DATA_ADDR]) {
|
} else if (read_addr == &memory[DATA_ADDR]) {
|
||||||
@ -46,6 +47,9 @@ void step_uart() {
|
|||||||
printf("\r\n");
|
printf("\r\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
if (incoming_char == 0x7F) { // Backspace
|
||||||
|
incoming_char = '\b';
|
||||||
|
}
|
||||||
uart_SR.bits.RDRF = 1;
|
uart_SR.bits.RDRF = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user