More documentation

This commit is contained in:
Jeff Parsons 2017-02-07 13:27:16 -08:00 committed by Jeff Parsons
commit 54a7fb5119
5 changed files with 35 additions and 19 deletions

View file

@ -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
---

View file

@ -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]
}
```

View file

@ -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' %}

View file

@ -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:

View file

@ -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) {