Added freeze/restore debug command handlers to the debugger
git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@75 64f78de7-aa59-e511-a0e8-0002a5492df0
This commit is contained in:
parent
047eaf800f
commit
c4372853bd
|
@ -155,6 +155,8 @@ int main(int argc, const char * argv[])
|
|||
if (v6502_compareDebuggerCommand(command, commandLen, "help")) {
|
||||
printf("woz Print relevant woz monitor parameters and registers.\n");
|
||||
printf("nonstop Read or toggle nonstop mode. Nonstop mode is considerably less efficient, but may be required for some software that expects runtime to continue while simultaneously waiting for keyboard input.\n");
|
||||
printf("freeze <filename> Dump the entire contents of memory, and the current cpu state, into a file for later loading.\n");
|
||||
printf("restore <filename> Restore memory and cpu state from a freeze file.\n");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -189,6 +191,26 @@ int main(int argc, const char * argv[])
|
|||
// printf("Currently set to %d", continuousMode);
|
||||
// }
|
||||
}
|
||||
else if (v6502_compareDebuggerCommand(command, commandLen, "freeze")) {
|
||||
command = trimheadtospc(command, commandLen);
|
||||
|
||||
if(command[0]) {
|
||||
saveFreeze(pia, command);
|
||||
}
|
||||
else {
|
||||
printf("A filename is required to save freeze.\n");
|
||||
}
|
||||
}
|
||||
else if (v6502_compareDebuggerCommand(command, commandLen, "restore")) {
|
||||
command = trimheadtospc(command, commandLen);
|
||||
|
||||
if(command[0]) {
|
||||
loadFreeze(pia, command);
|
||||
}
|
||||
else {
|
||||
printf("A filename is required to load freeze.\n");
|
||||
}
|
||||
}
|
||||
else if (command[0] != ';') {
|
||||
currentLineText = command;
|
||||
as6502_executeAsmLineOnCPU(cpu, command, strlen(command));
|
||||
|
|
|
@ -33,6 +33,10 @@ void saveFreeze(a1pia *pia, const char *fname) {
|
|||
fclose(f);
|
||||
}
|
||||
|
||||
void loadFreeze(a1pia *pia, const char *fname) {
|
||||
// TODO: implement me
|
||||
}
|
||||
|
||||
char asciiCharFromCursesKey(int key) {
|
||||
return (char)key;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue