diff --git a/README.md b/README.md index ca1126540..4e83502ba 100644 --- a/README.md +++ b/README.md @@ -388,6 +388,12 @@ specified page; e.g.: http://localhost:8088/?aspect=2.0 +- *resume*: set it to a numeric value (0-3) to override a machine's *resume* setting; e.g.: + + http://localhost:8088/?resume=0 + +More information about the *resume* attribute is available in the [documentation](/docs/pcx86/computer/#attributes). + Updating PCjs --- diff --git a/_posts/2014-09-30-pcjs-coding-conventions.md b/_posts/2014-09-30-pcjs-coding-conventions.md index 445e5c654..0317ecf4c 100644 --- a/_posts/2014-09-30-pcjs-coding-conventions.md +++ b/_posts/2014-09-30-pcjs-coding-conventions.md @@ -81,10 +81,10 @@ However, I've gradually switched to the more conventional JavaScript object nota ``` javascript ChipSet.PIC_LO = { - OCW2_EOI: 0x20, // non-specific EOI (end-of-interrupt) - OCW2_EOI_SPEC: 0x60, // specific EOI - OCW2_EOI_ROT: 0xA0, // rotate on non-specific EOI - OCW2_EOI_ROTSPEC: 0xE0 // rotate on specific EOI + OCW2_EOI: 0x20, // non-specific EOI (end-of-interrupt) + OCW2_EOI_SPEC: 0x60, // specific EOI + OCW2_EOI_ROT: 0xA0, // rotate on non-specific EOI + OCW2_EOI_ROTSPEC: 0xE0 // rotate on specific EOI }; ``` @@ -104,7 +104,7 @@ To ensure that debug-only code is not simply *disabled* but also *removed*, the ``` javascript if (DEBUG) { - [code to be removed by the Closure Compiler] + [code to be removed by the Closure Compiler] } ``` diff --git a/devices/pdp11/machine/1170/panel/debugger/xxdp/README.md b/devices/pdp11/machine/1170/panel/debugger/xxdp/README.md index 1bb90c479..bb225b9a4 100644 --- a/devices/pdp11/machine/1170/panel/debugger/xxdp/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/xxdp/README.md @@ -46,7 +46,8 @@ This machine is ready to boot [XXDP+ Diagnostics](/disks/dec/rl02k/xxdp/) ("BOOT We need to select a drive to load the [RL02K XXDP+ Diagnostics Disk](/disks/dec/rl02k/xxdp/), and since it is an RL02K disk, we need to use an RL02 drive. A typical PDP-11 machine with a single [RL11 Disk Controller](/devices/pdp11/rl11/) -could contain up to four such drives, which we refer to as RL0 through RL3. +could contain up to four such drives, which we refer to as RL0 through RL3. And since we want to boot the XXDP +disk, we need to select drive RL0, since the boot code on the disk appears to assume drive 0. To automatically boot the [RL02K XXDP+ Diagnostics Disk](/disks/dec/rl02k/xxdp/) and run the **EKBAD0** diagnostic, press: {% include machine-command.html type='button' label='Run EKBAD0' machine='test1170' command='runEKBAD0' %} diff --git a/disks/dec/rl02k/xxdp/README.md b/disks/dec/rl02k/xxdp/README.md index efe419b28..3e248a987 100644 --- a/disks/dec/rl02k/xxdp/README.md +++ b/disks/dec/rl02k/xxdp/README.md @@ -34,7 +34,8 @@ At the prompt, type "BOOT RL0". The following text should appear: . -NOTE: Any RL11 disk drive (RL0-RL3) can be used. RL0 was selected for demonstration purposes. +NOTE: In theory, any RL11 disk drive (RL0-RL3) could be used. However, the boot code on the disk appears to assume +drive 0, so RL0 should be selected. PDPjs has been tested with the following diagnostics: diff --git a/modules/shared/lib/component.js b/modules/shared/lib/component.js index f8ac0f397..495a590bc 100644 --- a/modules/shared/lib/component.js +++ b/modules/shared/lib/component.js @@ -621,11 +621,19 @@ class Component { /** * Component.getScriptCommands(sScript) * - * Backslash sequences like \n, \r, and \\ have already been converted to LF, CR and backslash - * characters, since the entire script string was injected into a JavaScript function call, so - * any backslash sequence that JavaScript supports was automatically converted. + * This is a simple parser that breaks sScript into an array of commands, where each command + * is an array of tokens, where tokens are sequences of characters separated by any of: tab, space, + * carriage-return (CR), line-feed (LF), semi-colon, single-quote, or double-quote; if a quote is + * used, all characters up to the next matching quote become part of the token, allowing any of the + * other separators to be part of the token. CR, LF and semi-colon also serve to terminate a command, + * with semi-colon being preferred, because it's 1) more visible, and 2) essential when the entire + * script is a multi-line string where all CR/LF were replaced by spaces (which is what Jekyll does, + * and since we can't change Jekyll, it's what our own MarkDown Front Matter parser does as well; + * see convertMD() in markout.js, where the aCommandDefs array is built). * - * The complete list of backslash sequences supported by JavaScript: + * Backslash sequences like \n, \r, and \\ have already been converted to LF, CR and backslash + * characters, since the entire script string is injected into a JavaScript function call, so any + * backslash sequence that JavaScript supports is automatically converted: * * \0 \' \" \\ \n \r \v \t \b \f \uXXXX \xXX * ^J ^M ^K ^I ^H ^L @@ -741,26 +749,26 @@ class Component { }(iCommand + 1); } - var fnScript = Component.globalCommands[sCommand]; - if (fnScript) { + var fnCommand = Component.globalCommands[sCommand]; + if (fnCommand) { if (!fnCallReady) { - fSuccess = fnScript(aTokens[1], aTokens[2], aTokens[3]); + fSuccess = fnCommand(aTokens[1], aTokens[2], aTokens[3]); } else { - if (!fnScript(fnCallReady, aTokens[1], aTokens[2], aTokens[3])) break; + if (!fnCommand(fnCallReady, aTokens[1], aTokens[2], aTokens[3])) break; } } else { fSuccess = false; var component = Component.getComponentByType(aTokens[1], idMachine); if (component) { - fnScript = Component.componentCommands[sCommand]; - if (fnScript) { - fSuccess = fnScript(component, aTokens[2], aTokens[3]); + fnCommand = Component.componentCommands[sCommand]; + if (fnCommand) { + fSuccess = fnCommand(component, aTokens[2], aTokens[3]); } else { var exports = component['exports']; if (exports) { - var fnCommand = exports[sCommand]; + fnCommand = exports[sCommand]; if (fnCommand) { fSuccess = true; if (!fnCallReady) {