Add 'r' serial command to reset and resume processor

This commit is contained in:
Satoshi N. M 2018-01-13 10:55:33 -08:00
parent f53c02b815
commit ffae187098
1 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,10 @@ char *process_serial_command(char *buf, int len) {
} else if (buf[0] == 'p') {
paused = !paused;
return paused ? "paused" : "resumed";
} else if (buf[0] == 'r') {
reset6502();
paused = false;
return "reset";
} else if (buf[0] == 't') {
static char buf[64];
snprintf(buf, sizeof(buf), "%ld ticks\r\n%ld instructions", clockticks6502, instructions);