Some minor Debugger tweaks and other improvements

If a Markdown document contains an embedded machine that specifies a version number (eg, "1.15.6"), then the web server will switch to serving a compiled version, since that's the only way it can guarantee the requested version
This commit is contained in:
Jeff Parsons 2014-10-31 17:44:34 -07:00 • committed by jeffpar
commit 905a30017e
9 changed files with 911 additions and 889 deletions

View file

@ -1124,7 +1124,7 @@ Computer.prototype.onReset = function()
* I used to bypass the prompt if this.resume == Computer.RESUME_AUTO, setting fSave to true automatically,
* but that gives the user no means of resetting a resumable machine that contains errors in its resume state.
*/
var fSave = (/* this.resume == Computer.RESUME_AUTO || */ !web.confirmUser("Click OK to save the " + Computer.sAppName + " machine state.\n\nWARNING: If you CANCEL, all disk changes will be discarded."));
var fSave = (/* this.resume == Computer.RESUME_AUTO || */ web.confirmUser("Click OK to save changes to this " + Computer.sAppName + " machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded."));
this.powerOff(fSave, true);
/*
* Forcing the page to reload is an expedient option, but ugly. It's preferable to call powerOn()

View file

@ -202,7 +202,7 @@ if (DEBUGGER) {
'?': "help",
'a [#]': "assemble",
'b [#]': "breakpoint",
'c': "clear window",
'c': "clear output",
'd [#]': "dump memory",
'e [#]': "edit memory",
'f': "frequencies",
@ -216,7 +216,9 @@ if (DEBUGGER) {
'r': "dump/edit registers",
't [#]': "step instruction(s)",
'u [#]': "unassemble",
'x': "execution options"
'x': "execution options",
'reset': "reset computer",
'ver': "display version"
};
/*
@ -4188,7 +4190,7 @@ if (DEBUGGER) {
fUnknown = false;
switch(sReg){
case "MS":
X86Help.opHelpLMSW(w);
X86Help.opHelpLMSW.call(this.cpu, w);
break;
case "TR":
this.cpu.segTSS.load(w);
@ -4530,6 +4532,9 @@ if (DEBUGGER) {
case "reset":
if (this.cmp) this.cmp.reset();
return true;
case "ver":
this.println((APPNAME || "PCjs") + " version " + APPVERSION + " (" + (COMPILED? "release" : (DEBUG? "debug" : "nodebug")) + (PREFETCH? ",prefetch" : "") + (TYPEDARRAYS? ",typedarrays" : (FATARRAYS? ",fatarrays" : "")) + ")");
return true;
default:
ch0 = sCmd.charAt(0);
for (i = 1; i < sCmd.length; i++) {

View file

@ -414,7 +414,13 @@ Disk.prototype.powerDown = function(fSave, fShutdown)
if (fShutdown) {
this.disconnectRemoteDisk();
}
if (!nErrorCode) this.controller.notice(this.sDiskName + " saved");
/*
* I only report that changes to the disk have been "saved" if fSave is true, to avoid confusing
* users who might not understand the difference between discarding local changes (which should restore
* all diskettes to their original state) and discarding remote changes (which could leave the remote disk
* in a bad state).
*/
if (!nErrorCode && fSave) this.controller.notice(this.sDiskName + " saved");
}
return true;
};