From 5d5629c27bc16599d708cbb426fe306cf7af3b5a Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 22 Oct 2016 14:21:33 -0700 Subject: [PATCH] More README updates, particularly in regard to DEC's Absolute Loader --- apps/pdp11/boot/bootstrap/README.md | 4 +- apps/pdp11/tapes/README.md | 13 +----- apps/pdp11/tapes/absloader/README.md | 44 +++++++++++++++++-- apps/pdp11/tapes/basic/README.md | 4 +- devices/pdp11/machine/1120/basic/README.md | 4 +- .../machine/1120/basic/debugger/README.md | 4 +- .../pdp11/machine/1120/bootstrap/README.md | 20 ++++----- .../machine/1120/bootstrap/debugger/README.md | 20 ++++----- devices/pdp11/machine/1120/test/README.md | 6 +-- .../machine/1120/test/debugger/README.md | 6 +-- devices/pdp11/pc11/README.md | 16 ++++++- modules/pdp11/lib/ram.js | 8 +++- 12 files changed, 97 insertions(+), 52 deletions(-) diff --git a/apps/pdp11/boot/bootstrap/README.md b/apps/pdp11/boot/bootstrap/README.md index 94a6c239b..c94db4fde 100644 --- a/apps/pdp11/boot/bootstrap/README.md +++ b/apps/pdp11/boot/bootstrap/README.md @@ -7,8 +7,8 @@ permalink: /apps/pdp11/boot/bootstrap/ DEC PDP-11 Bootstrap Loader --------------------------- -The **Bootstrap Loader** is a small program that loads the **[Absolute Loader](/apps/pdp11/tapes/absloader/)**, -which is then used to load other PDP-11 tapes, such as **[BASIC (Single User)](/apps/pdp11/tabes/basic/)**. +The **Bootstrap Loader** is a small program that loads the [Absolute Loader](/apps/pdp11/tapes/absloader/), +which is then used to load other PDP-11 tapes, such as [BASIC (Single User)](/apps/pdp11/tabes/basic/). Here's what the **Bootstrap Loader** looks like: diff --git a/apps/pdp11/tapes/README.md b/apps/pdp11/tapes/README.md index 5f6e83e65..b7bafbf27 100644 --- a/apps/pdp11/tapes/README.md +++ b/apps/pdp11/tapes/README.md @@ -15,14 +15,5 @@ We have archived the following DEC PDP-11 Tapes: along with a copy of the [DEC PDP-11 Bootstrap Loader](/apps/pdp11/boot/bootstrap/), which is required if you actually want to load any of the above tapes into memory using the [PC11 High-Speed Paper Tape Reader/Punch](/devices/pdp11/pc11/). -To make it easy for PDPjs machines to load these tapes, we created the following High-Speed -Paper Tape Reader (PC11) configurations: - -- [demo.xml](/devices/pdp11/pc11/demo.xml) - -which is typically instantiated by a Machine XML file using: - - - -These configuration files create UI controls that allow you to choose from a set of tapes that are automatically sent -to the machine's PC11 device. +For the most part, the tapes we have archived are in the DEC Absolute Loader format. More information about that format +is on the [Absolute Loader](absloader/) page. diff --git a/apps/pdp11/tapes/absloader/README.md b/apps/pdp11/tapes/absloader/README.md index ded2b0ef7..72a1ecaab 100644 --- a/apps/pdp11/tapes/absloader/README.md +++ b/apps/pdp11/tapes/absloader/README.md @@ -8,10 +8,48 @@ DEC PDP-11 Absolute Loader -------------------------- The Absolute Loader is a special tape image that must be loaded in order to load *other* tapes -which use the Absolute Loader format. To see the Absolute Loader in action, start with the -[Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/debugger/). +that use what we'll call the "Absolute Format." To see the Absolute Loader in action, start with the +[PDP-11/20 Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/debugger/). -PCjs has archived the following DEC resources: +The *loadImage()* interface of the [PDPjs RAM Component](/modules/pdp11/lib/ram.js) explains what +we know about the "Absolute Format": + + Data on tapes in the "Absolute Format" is organized into blocks; each block begins with + a 6-byte header: + + 2-byte signature (0x0001) + 2-byte block length (N + 6, because it includes the 6-byte header) + 2-byte load address + + followed by N data bytes. If N is zero, then the 2-byte load address is the exec address, + unless the address is odd (usually 1). DEC's Absolute Loader jumps to the exec address + in former case, halts in the latter. + + All values are stored "little endian" (low byte followed by high byte), just like the + PDP-11's memory architecture. + + After the data bytes, there is a single checksum byte. The 8-bit sum of all the bytes in + the block (including the header bytes and checksum byte) should be zero. + + ANOMALIES: Tape files don't always begin with a signature word, so I allow any number of + leading zeros before the first signature. Tape files don't always end cleanly either, so as + soon as I see an invalid signature, I break out of the loop without signalling an error, as + long as at least ONE block was successfully processed. In fact, it's possible that as + soon as a block with ZERO data bytes is encountered, processing is supposed to stop, but + I haven't examined enough tapes (or the Absolute Loader code) to know for sure. + +[Other sites](http://www.retrocmp.com/stories/dec-pc05-papertape/242-dec-pc05-working-with-paper-tapes) +have referred to this tape format as the "Standard Absolute" format, but I've not found confirmation of +that terminology in any DEC publication. In fact, I think that term may have been a misreading of instructions +found in DEC manuals like the ["MEM EXER 16K" Diagnostics Manual](http://archive.pcjs.org/pubs/dec/pdp11/other/AC-9045F-MC_CZQMCF0-0-124K-Mem-Exer-16k_Feb78.pdf): + + Load the program using any standard absolute loader. + +The most notable feature of the "Absolute Format" is that it contains no relocation information; it is +designed for code that has been linked to run at a fixed ("absolute") address, or position-independent code +for which a specific address has been selected, based on the amount of RAM present in the target machine. + +PCjs has archived the following Absolute Loader resources: - [Absolute Loader](DEC-11-L2PC-PO.json) - [LISTING OF PDP-11 ABSOLUTE LOADER (June 1975)](http://archive.pcjs.org/pubs/dec/pdp11/other/DEC-11-UABLA-A-LA_PDP-11AbsoluteLoaderListing_Jun75.pdf) diff --git a/apps/pdp11/tapes/basic/README.md b/apps/pdp11/tapes/basic/README.md index 4bb612983..3e483ea8e 100644 --- a/apps/pdp11/tapes/basic/README.md +++ b/apps/pdp11/tapes/basic/README.md @@ -13,12 +13,12 @@ machines: DEC PDP-11 BASIC ---------------- -The first PCjs machine to run DEC PDP-11 BASIC was this [PDP-11/20](/devices/pdp11/machine/1120/basic/debugger/), +The first PDPjs machine to run DEC PDP-11 BASIC was this [PDP-11/20](/devices/pdp11/machine/1120/basic/debugger/), shown below. {% include machine.html id="test1120" %} -PCjs has archived these DEC PDP-11 BASIC resources: +PCjs has archived the following DEC PDP-11 BASIC resources: - [BASIC (Single User) Tape Image](DEC-11-AJPB-PB.json) - [LISTING OF BASIC/PTS (March 1974)](http://archive.pcjs.org/pubs/dec/pdp11/basic/AB-2045B-SC_BASIC_PTS_Listing_Mar77.pdf) diff --git a/devices/pdp11/machine/1120/basic/README.md b/devices/pdp11/machine/1120/basic/README.md index eb1bd2305..317b75e19 100644 --- a/devices/pdp11/machine/1120/basic/README.md +++ b/devices/pdp11/machine/1120/basic/README.md @@ -11,11 +11,11 @@ machines: PDP-11/20 BASIC Demo -------------------- -This machine pre-loads the **[DEC PDP-11 BASIC](/apps/pdp11/tapes/basic/)** tape image into 16Kb of RAM: +This machine pre-loads the [DEC PDP-11 BASIC](/apps/pdp11/tapes/basic/) tape image into 16Kb of RAM: -You can also manually load it into memory using the **[Bootstrap Loader](/apps/pdp11/boot/bootstrap/)**. +You can also manually load it into memory using the [Bootstrap Loader](/apps/pdp11/boot/bootstrap/). See the [Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/) for details. {% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1120/basic/debugger/README.md b/devices/pdp11/machine/1120/basic/debugger/README.md index 454c5c6e7..01ddfa962 100644 --- a/devices/pdp11/machine/1120/basic/debugger/README.md +++ b/devices/pdp11/machine/1120/basic/debugger/README.md @@ -12,11 +12,11 @@ machines: PDP-11/20 BASIC Demo (with Debugger) ------------------------------------ -This machine pre-loads the **[DEC PDP-11 BASIC](/apps/pdp11/tapes/basic/)** tape image into 16Kb of RAM: +This machine pre-loads the [DEC PDP-11 BASIC](/apps/pdp11/tapes/basic/) tape image into 16Kb of RAM: -You can also manually load it into memory using the **[Bootstrap Loader](/apps/pdp11/boot/bootstrap/)**. +You can also manually load it into memory using the [Bootstrap Loader](/apps/pdp11/boot/bootstrap/). See the [Bootstrap Loader Demo (with Debugger)](/devices/pdp11/machine/1120/bootstrap/debugger/) for details. There are also some [Debugging Notes](/apps/pdp11/tapes/basic/#debugging-notes) on the diff --git a/devices/pdp11/machine/1120/bootstrap/README.md b/devices/pdp11/machine/1120/bootstrap/README.md index e56f8d35e..5f39840db 100644 --- a/devices/pdp11/machine/1120/bootstrap/README.md +++ b/devices/pdp11/machine/1120/bootstrap/README.md @@ -7,29 +7,29 @@ machines: type: pdp11 --- -Bootstrap Loader Demo ---------------------- +PDP-11/20 Bootstrap Loader Demo +------------------------------- -This machine pre-loads the **[Bootstrap Loader](/apps/pdp11/boot/bootstrap/)** code into 16Kb of RAM: +This machine pre-loads the [Bootstrap Loader](/apps/pdp11/boot/bootstrap/) code into 16Kb of RAM: -and then pre-attaches the **[Absolute Loader](/apps/pdp11/tapes/absloader/)** tape image to the PC11 Paper Tape Reader: +and then pre-attaches the [Absolute Loader](/apps/pdp11/tapes/absloader/) tape image to the PC11 Paper Tape Reader: ... -Click "Run" to load the **[Absolute Loader](/apps/pdp11/tapes/absloader/)**. -When the **[Bootstrap Loader](/apps/pdp11/boot/bootstrap/)** is finished, it will HALT, -leaving the **[Absolute Loader](/apps/pdp11/tapes/absloader/)** ready to run immediately after the HALT. +Click "Run" to load the [Absolute Loader](/apps/pdp11/tapes/absloader/). +When the [Bootstrap Loader](/apps/pdp11/boot/bootstrap/) is finished, it will HALT, +leaving the [Absolute Loader](/apps/pdp11/tapes/absloader/) ready to run immediately after the HALT. -You can then select another tape image in the Absolute Loader format, such as **[BASIC (Single User)](/apps/pdp11/tapes/basic/)**, +You can then select another tape image in the Absolute Loader format, such as [BASIC (Single User)](/apps/pdp11/tapes/basic/), click "Attach" and then "Run". If you need to start over, select "Bootstrap Loader (16Kb)" from the list of tapes and click "Load" instead of -"Attach", re-installing the **[Bootstrap Loader](/apps/pdp11/boot/bootstrap/)** directly into RAM. +"Attach", re-installing the [Bootstrap Loader](/apps/pdp11/boot/bootstrap/) directly into RAM. Alternatively, just press the "Reset" button. The RAM component was recently updated to restore pre-loaded images whenever -the entire machine is reset. You'll still need to manually re-attach the **[Absolute Loader](/apps/pdp11/tapes/absloader/)** +the entire machine is reset. You'll still need to manually re-attach the [Absolute Loader](/apps/pdp11/tapes/absloader/) tape image, however. {% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1120/bootstrap/debugger/README.md b/devices/pdp11/machine/1120/bootstrap/debugger/README.md index 02f151044..746ea7347 100644 --- a/devices/pdp11/machine/1120/bootstrap/debugger/README.md +++ b/devices/pdp11/machine/1120/bootstrap/debugger/README.md @@ -8,29 +8,29 @@ machines: debugger: true --- -Bootstrap Loader Demo (with Debugger) -------------------------------------- +PDP-11/20 Bootstrap Loader Demo (with Debugger) +----------------------------------------------- -This machine pre-loads the **[Bootstrap Loader](/apps/pdp11/boot/bootstrap/)** code into 16Kb of RAM: +This machine pre-loads the [Bootstrap Loader](/apps/pdp11/boot/bootstrap/) code into 16Kb of RAM: -and then pre-attaches the **[Absolute Loader](/apps/pdp11/tapes/absloader/)** tape image to the PC11 Paper Tape Reader: +and then pre-attaches the [Absolute Loader](/apps/pdp11/tapes/absloader/) tape image to the PC11 Paper Tape Reader: ... -Click "Run" to load the **[Absolute Loader](/apps/pdp11/tapes/absloader/)**. -When the **[Bootstrap Loader](/apps/pdp11/boot/bootstrap/)** is finished, it will HALT, -leaving the **[Absolute Loader](/apps/pdp11/tapes/absloader/)** ready to run immediately after the HALT. +Click "Run" to load the [Absolute Loader](/apps/pdp11/tapes/absloader/). +When the [Bootstrap Loader](/apps/pdp11/boot/bootstrap/) is finished, it will HALT, +leaving the [Absolute Loader](/apps/pdp11/tapes/absloader/) ready to run immediately after the HALT. -You can then select another tape image in the Absolute Loader format, such as **[BASIC (Single User)](/apps/pdp11/tapes/basic/)**, +You can then select another tape image in the Absolute Loader format, such as [BASIC (Single User)](/apps/pdp11/tapes/basic/), click "Attach" and then "Run". If you need to start over, select "Bootstrap Loader (16Kb)" from the list of tapes and click "Load" instead of -"Attach", re-installing the **[Bootstrap Loader](/apps/pdp11/boot/bootstrap/)** directly into RAM. +"Attach", re-installing the [Bootstrap Loader](/apps/pdp11/boot/bootstrap/) directly into RAM. Alternatively, just press the "Reset" button. The RAM component was recently updated to restore pre-loaded images whenever -the entire machine is reset. You'll still need to manually re-attach the **[Absolute Loader](/apps/pdp11/tapes/absloader/)** +the entire machine is reset. You'll still need to manually re-attach the [Absolute Loader](/apps/pdp11/tapes/absloader/) tape image, however. {% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1120/test/README.md b/devices/pdp11/machine/1120/test/README.md index 9206edffe..0967ce1d9 100644 --- a/devices/pdp11/machine/1120/test/README.md +++ b/devices/pdp11/machine/1120/test/README.md @@ -7,10 +7,10 @@ machines: type: pdp11 --- -Boot Test ---------- +PDP-11/20 Boot Test +------------------- -This machine pre-loads the **[PDP-11 Boot Test](/apps/pdp11/boot/test/)** code into RAM: +This machine pre-loads the [PDP-11 Boot Test](/apps/pdp11/boot/test/) code into RAM: diff --git a/devices/pdp11/machine/1120/test/debugger/README.md b/devices/pdp11/machine/1120/test/debugger/README.md index 08f70a009..9737e17dc 100644 --- a/devices/pdp11/machine/1120/test/debugger/README.md +++ b/devices/pdp11/machine/1120/test/debugger/README.md @@ -8,10 +8,10 @@ machines: debugger: true --- -Boot Test (with Debugger) -------------------------- +PDP-11/20 Boot Test (with Debugger) +----------------------------------- -This machine pre-loads the **[PDP-11 Boot Test](/apps/pdp11/boot/test/)** code into RAM: +This machine pre-loads the [PDP-11 Boot Test](/apps/pdp11/boot/test/) code into RAM: diff --git a/devices/pdp11/pc11/README.md b/devices/pdp11/pc11/README.md index b30c0854c..0a456035e 100644 --- a/devices/pdp11/pc11/README.md +++ b/devices/pdp11/pc11/README.md @@ -9,12 +9,24 @@ PC11 High-Speed Paper Tape Reader/Punch PDPjs implements the PC11 component in [pc11.js](/modules/pdp11/lib/pc11.js). -A selection of [Paper Tape Images](/apps/pdp11/tapes/) have been archived for use by PDPjs machines: +PDPjs machines that contain a PC11 Tape Reader include: - [Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/) - [PDP-11/20 BASIC Demo](/devices/pdp11/machine/1120/basic/) (with [Debugger](/devices/pdp11/machine/1120/basic/debugger/)) -The tape images are typically listed in a common configuration file that all machines can use, such as [demo.xml](demo.xml): +We have archived a selection of [Paper Tape Images](/apps/pdp11/tapes/) for use by those machines. + +To make it easy for PDPjs machines to load those tapes, we created the following High-Speed Paper Tape Reader (PC11) +Device XML file: + +- [Demo](/devices/pdp11/pc11/demo.xml) + +which is typically referenced by a Machine XML file as: + + + +Device XML files typically configure the device, list all the resource the device will use, and define UI elements +used to control the device, such as choosing which tape should be "attached" to the PC11 device. For example: diff --git a/modules/pdp11/lib/ram.js b/modules/pdp11/lib/ram.js index 675c39d4f..3751c982d 100644 --- a/modules/pdp11/lib/ram.js +++ b/modules/pdp11/lib/ram.js @@ -249,6 +249,9 @@ RAMPDP11.prototype.reset = function() /** * loadImage(aBytes, addrLoad, addrExec, addrInit, fReset) * + * If the array contains an image in the "Absolute Format," load it as specified by + * the format; otherwise, load it as-is using the address(es) supplied. + * * @this {RAMPDP11} * @param {Array|Uint8Array} aBytes * @param {number|null} [addrLoad] @@ -261,14 +264,15 @@ RAMPDP11.prototype.loadImage = function(aBytes, addrLoad, addrExec, addrInit, fR { var fLoaded = false; /* - * Data on tapes is organized into blocks; each block begins with a 6-byte header: + * Data on tapes in the "Absolute Format" is organized into blocks; each block begins with + * a 6-byte header: * * 2-byte signature (0x0001) * 2-byte block length (N + 6, because it includes the 6-byte header) * 2-byte load address * * followed by N data bytes. If N is zero, then the 2-byte load address is the exec address, - * unless the address is odd (usually 1). DEC's "Absolute Loader" jumps to the exec address + * unless the address is odd (usually 1). DEC's Absolute Loader jumps to the exec address * in former case, halts in the latter. * * All values are stored "little endian" (low byte followed by high byte), just like the