Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Merge branch 'next-release'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffpar committed Feb 4, 2017
2 parents fe5d588 + dc52157 commit bdbfbd9
Show file tree
Hide file tree
Showing 44 changed files with 1,991 additions and 781 deletions.
2 changes: 1 addition & 1 deletion apps/pdp11/tapes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ p. 155, "PAPER TAPE SOFTWARE", the following software was available on paper tap
- [IOX](iox/) (PDP-11 Input/Output eXecutive)
- [PDP-11 BASIC](basic/) (Beginners All-purpose Symbolic Instruction Code)

There was a separate DEC publication, [PDP-11 Paper Tape Software Handbook](http://archive.pcjs.org/pubs/dec/pdp11/pc11/Paper_Tape_Software_Handbook.pdf),
There was a separate DEC publication, [PDP-11 Paper Tape Software Handbook](http://archive.pcjs.org/pubs/dec/pdp11/other/PDP11_Paper_Tape_Software_Handbook_1976.pdf),
that described all of the above software in greater detail, and it included some programs that the 1971 Handbook listed under
"Disk Operating System" instead of "Paper Tape System", such as:

Expand Down
4 changes: 2 additions & 2 deletions apps/pdp11/tapes/absloader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ we know about the "Absolute Format":
[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 that terminology
used in any DEC publication. In fact, I think that term may have arisen from a misreading of instructions
found in DEC manuals like the ["MEM EXER 16K" Diagnostics Manual](http://archive.pcjs.org/pubs/dec/pdp11/pc11/Mem-Exer-16k_Feb78.pdf):
found in DEC manuals like the ["MEM EXER 16K" Diagnostics Manual](http://archive.pcjs.org/pubs/dec/pdp11/diags/AC-9045F-MC_CZQMCFO_MEM_EXER_16K_Feb78.pdf):

Load the program using any standard absolute loader.

Expand All @@ -54,5 +54,5 @@ for which a specific address has been selected, based on the amount of RAM prese
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/pc11/Absolute_Loader_Listing_Jun75.pdf)
- [LISTING OF PDP-11 ABSOLUTE LOADER (June 1975)](http://archive.pcjs.org/pubs/dec/pdp11/other/DEC-11-UABLA_ABSOLUTE_LOADER_LISTING_Jun75.pdf)
- "APPENDIX D: THE BOOTSTRAP AND ABSOLUTE LOADERS" from the [PDP-11 BASIC PROGRAMMING MANUAL (December 1970)](http://archive.pcjs.org/pubs/dec/pdp11/basic/BASIC_Programming_Manual_Dec70.pdf)
53 changes: 27 additions & 26 deletions apps/pdp11/tapes/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ DEC PDP-11 BASIC

[![DEC-11-AJPB-PB](DEC-11-AJPB-PB.jpg)](DEC-11-AJPB-PB.json)

According to the [PDP-11/20 Handbook (1971)](http://archive.pcjs.org/pubs/dec/pdp11/1120/PDP1120_Handbook_1971.pdf), p. 160,
notable features of PDP-11 BASIC included:
According to the [PDP-11/20 Handbook (1971)](http://archive.pcjs.org/pubs/dec/pdp11/1120/PDP1120_Handbook_1971.pdf),
p. 160, notable features of PDP-11 BASIC included:

- Use of BASIC statements in immediate mode (no line number)
- Ability to use any BASIC command (RUN, LIST, etc.) in deferred mode (with a line number)
Expand Down Expand Up @@ -47,19 +47,19 @@ Debugging Notes

### PDPjs Debugger vs. SIMH

When I first tried to run BASIC in a PDPjs machine, it crashed almost immediately. It was attempting to use memory beyond
the 16Kb of installed RAM. After a bit of poking around, I found BASIC's memory sizing code here:
When I first tried to run BASIC in a PDPjs machine, it crashed almost immediately. It was attempting to use memory
beyond the 16Kb of installed RAM. After a bit of poking around, I found BASIC's memory sizing code here:

016142: 012701 160000 MOV #160000,R1
016146: 022626 CMP (SP)+,(SP)+
016150: 014111 MOV -(R1),@R1

The code sets R1 to highest possible RAM address and starts scanning backwards for the first valid memory location. However,
the scanning process wasn't clear to me at first glance, and the `CMP (SP)+,(SP)+` was a bit of a head-scratcher, so I decided
to do an instruction-by-instruction comparison with SIMH.
The code sets R1 to highest possible RAM address and starts scanning backwards for the first valid memory location.
However, the scanning process wasn't clear to me at first glance, and the `CMP (SP)+,(SP)+` was a bit of a
head-scratcher, so I decided to do an instruction-by-instruction comparison with SIMH.

After cloning the [SIMH project](https://github.com/simh/simh) and building the *pdp11* binary, I created a *pdp11.ini* text file
that contained:
After cloning the [SIMH project](https://github.com/simh/simh) and building the *pdp11* binary, I created a *pdp11.ini*
text file that contained:

ECHO Configuring PDP-11/20 with 16Kb of RAM...
SET CPU 11/20
Expand Down Expand Up @@ -154,15 +154,15 @@ After typing several "do tr" commands, I was surprised to see SIMH execution con

Step expired, PC: 016150 (MOV -(R1),(R1))

until I remembered that when the PDP-11 accesses an invalid address, it's supposed to trap to vector 000004, and that BASIC
must have modified vector 000004 to jump into the middle of this code.
until I remembered that when the PDP-11 accesses an invalid address, it's supposed to trap to vector 000004, and that
BASIC must have modified vector 000004 to jump into the middle of this code.

This code fragment was simply marching down the address space until it reached an address that didn't trap. The odd-looking
`CMP (SP)+,(SP)+` instruction was throwing away the PC and PSW that each trap pushed onto the stack, by effectively adding
4 to SP.
This code fragment was simply marching down the address space until it reached an address that didn't trap. The
odd-looking `CMP (SP)+,(SP)+` instruction was throwing away the PC and PSW that each trap pushed onto the stack, by
effectively adding 4 to SP.

The problem with PDPjs was that it wasn't generating a trap to vector 000004 when an invalid address was accessed. After fixing
that, I verified with the PDPjs Debugger that the memory sizing code was working properly:
The problem with PDPjs was that it wasn't generating a trap to vector 000004 when an invalid address was accessed.
After fixing that, I verified with the PDPjs Debugger that the memory sizing code was working properly:

PDPjs v1.30.1
Copyright © 2012-2016 Jeff Parsons <[email protected]>
Expand Down Expand Up @@ -263,18 +263,19 @@ When the code starts, the TRAP instruction has already pushed two words onto the
0(SP): previous PC
2(SP): previous PSW

The first instruction, `MOV @SP,2(SP)`, copies the *previous PC* onto the *previous PSW*, which is where we'll eventually want
*previous PC*, so that the handler can eventually return with a simple `RTS PC`.
The first instruction, `MOV @SP,2(SP)`, copies the *previous PC* onto the *previous PSW*, which is where we'll
eventually want *previous PC*, so that the handler can eventually return with a simple `RTS PC`.

The next instruction, `SUB #2,@SP`, subtracts 2 from the original *previous PC*, so that it now points to the TRAP instruction.
The next instruction, `SUB #2,@SP`, subtracts 2 from the original *previous PC*, so that it now points to the TRAP
instruction.

Then `@(SP)+,-(SP)` fetches the TRAP instruction while also "popping" the original *previous PC* and then "pushing" TRAP
instruction onto the stack, overwriting the original *previous PC*.
Then `@(SP)+,-(SP)` fetches the TRAP instruction while also "popping" the original *previous PC* and then "pushing"
TRAP instruction onto the stack, overwriting the original *previous PC*.

The next few instructions shift the TRAP right to see if bit 0 is set, and if it is not, then the TRAP instruction is restored
by shifting it left again, and then a large offset is added to it, transforming the TRAP instruction (which is now known to be
an *even* value) into a jump table index.
The next few instructions shift the TRAP right to see if bit 0 is set, and if it is not, then the TRAP instruction
is restored by shifting it left again, and then a large offset is added to it, transforming the TRAP instruction (which
is now known to be an *even* value) into a jump table index.

The final instruction, `MOV @(SP)+,PC`, moves the address at the jump table index into PC, while also removing the TRAP
instruction from the stack, leaving only the *previous PC* on the stack, so that when the TRAP handler is done, it can execute
`RTS PC` to return to the caller.
instruction from the stack, leaving only the *previous PC* on the stack, so that when the TRAP handler is done, it can
execute `RTS PC` to return to the caller.
2 changes: 1 addition & 1 deletion devices/pdp11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PDP-11 Device Configurations
* [Control Panels](panel/)
* Serial Interface for Display Terminals [(DL11)](dl11/)
* High-Speed Paper Tape Reader/Punch [(PC11)](pc11/)
* Disk Controllers ([RK11](rk11/), [RL11](rl11/))
* Disk Controllers ([RK11](rk11/), [RL11](rl11/), [RX11](rx11/))
* [ROM Images](rom/)

Sample machines include a
Expand Down
1 change: 1 addition & 0 deletions devices/pdp11/machine/1170/panel/debugger/machine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<panel ref="/devices/pdp11/panel/1170/debugger/front.xml"/>
<debugger id="debugger" base="8" messages="" commands=""/>
<device ref="/devices/pdp11/pc11/default.xml"/>
<device ref="/devices/pdp11/rx11/default.xml"/>
<device ref="/devices/pdp11/rk11/default.xml"/>
<device ref="/devices/pdp11/rl11/default.xml"/>
</machine>
1 change: 1 addition & 0 deletions devices/pdp11/machine/1170/panel/machine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<serial id="dl11" adapter="0" binding="print"/>
<panel ref="/devices/pdp11/panel/1170/front.xml"/>
<device ref="/devices/pdp11/pc11/default.xml"/>
<device ref="/devices/pdp11/rx11/default.xml"/>
<device ref="/devices/pdp11/rk11/default.xml"/>
<device ref="/devices/pdp11/rl11/default.xml"/>
</machine>
1 change: 1 addition & 0 deletions devices/pdp11/machine/1170/vt100/debugger/machine-left.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<panel ref="/devices/pdp11/panel/1170/debugger/front.xml"/>
<debugger id="debugger" base="8" messages="" commands=""/>
<device ref="/devices/pdp11/pc11/default.xml"/>
<device ref="/devices/pdp11/rx11/default.xml"/>
<device ref="/devices/pdp11/rk11/default.xml"/>
<device ref="/devices/pdp11/rl11/default.xml"/>
</machine>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<panel ref="/devices/pdp11/panel/1170/debugger/front.xml"/>
<debugger id="debugger" base="8" messages="" commands=""/>
<device ref="/devices/pdp11/pc11/default.xml"/>
<device ref="/devices/pdp11/rx11/default.xml"/>
<device ref="/devices/pdp11/rk11/default.xml"/>
<device ref="/devices/pdp11/rl11/default.xml"/>
</machine>
1 change: 1 addition & 0 deletions devices/pdp11/machine/1170/vt100/debugger/machine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<panel ref="/devices/pdp11/panel/1170/debugger/front.xml"/>
<debugger id="debugger" base="8" messages="" commands=""/>
<device ref="/devices/pdp11/pc11/default.xml"/>
<device ref="/devices/pdp11/rx11/default.xml"/>
<device ref="/devices/pdp11/rk11/default.xml"/>
<device ref="/devices/pdp11/rl11/default.xml"/>
</machine>
1 change: 1 addition & 0 deletions devices/pdp11/machine/1170/vt100/machine-left.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<serial id="dl11" adapter="0"/>
<panel ref="/devices/pdp11/panel/1170/front.xml"/>
<device ref="/devices/pdp11/pc11/default.xml"/>
<device ref="/devices/pdp11/rx11/default.xml"/>
<device ref="/devices/pdp11/rk11/default.xml"/>
<device ref="/devices/pdp11/rl11/default.xml"/>
</machine>
1 change: 1 addition & 0 deletions devices/pdp11/machine/1170/vt100/machine-right.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<serial id="dl11" adapter="0"/>
<panel ref="/devices/pdp11/panel/1170/front.xml"/>
<device ref="/devices/pdp11/pc11/default.xml"/>
<device ref="/devices/pdp11/rx11/default.xml"/>
<device ref="/devices/pdp11/rk11/default.xml"/>
<device ref="/devices/pdp11/rl11/default.xml"/>
</machine>
1 change: 1 addition & 0 deletions devices/pdp11/machine/1170/vt100/machine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<serial id="dl11" adapter="0"/>
<panel ref="/devices/pdp11/panel/1170/front.xml"/>
<device ref="/devices/pdp11/pc11/default.xml"/>
<device ref="/devices/pdp11/rx11/default.xml"/>
<device ref="/devices/pdp11/rk11/default.xml"/>
<device ref="/devices/pdp11/rl11/default.xml"/>
</machine>
3 changes: 3 additions & 0 deletions devices/pdp11/pc11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ used to control the device, such as choosing which tape should be "loaded" into
</control>
</device>
```

For details about the PC11 hardware, we relied upon the [PDP-11 Peripherals Handbook (1976)](http://archive.pcjs.org/pubs/dec/pdp11/other/PDP11_Peripherals_Handbook_1976.pdf),
p. 4-376 (p. 408 of the PDF).
5 changes: 4 additions & 1 deletion devices/pdp11/rk11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ permalink: /devices/pdp11/rk11/
RK11 Disk Controller
--------------------

The RK11 Disk Controller controls up to eight RK05 disk drives, which in turn read/write [RK03-KA](/disks/dec/rk03/)
The RK11 Disk Controller controls up to eight RK05 disk drives, which in turn read/write [RK03](/disks/dec/rk03/)
disk cartridges.

RK03 disks are single-platter cartridges with 203 tracks per side, 12 sectors per track, and a sector size of 256 words
(512 bytes), for a total capacity of 2.38Mb (2,494,464 bytes).

Machines containing the [RK11 Component](/modules/pdp11/lib/rk11.js) include:

- [PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel/) (with [Debugger](/devices/pdp11/machine/1170/panel/debugger/))
Expand Down
3 changes: 1 addition & 2 deletions devices/pdp11/rk11/default.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<device id="rk11" type="rk11" autoMount='{RK0:{path:"http://archive.pcjs.org/disks/dec/rk03/RK03-XXDP.json"}}' pos="left" width="35%" padLeft="8px" padBottom="8px">
<name>Disk Drive Controls</name>
<device id="rk11" type="rk11" autoMountExample='{RK0:{path:"http://archive.pcjs.org/disks/dec/rk03/RK03-XXDP.json"}}' pos="left" width="35%" padLeft="8px" padBottom="8px">
<control type="container">
<control type="list" binding="listDrives"/>
<control type="list" binding="listDisks">
Expand Down
8 changes: 7 additions & 1 deletion devices/pdp11/rl11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ RL11 Disk Controller
--------------------

The RL11 Disk Controller controls up to four RL01 or RL02 disk drives, which in turn read/write
[RL01K](/disks/dec/rl01k/) or [RL02K](/disks/dec/rl02k/) disk cartridges.
[RL01K](/disks/dec/rl01k/) or [RL02K](/disks/dec/rl02k/) disk cartridges, respectively.

RL01K disks are single-platter cartridges with 256 tracks per side, 40 sectors per track, and a sector size of
256 bytes, for a total capacity of 5Mb (5,242,880 bytes).

RL02K disks are single-platter cartridges with 512 tracks per side, 40 sectors per track, and a sector size of
256 bytes, for a total capacity of 10Mb (10,485,760 bytes).

Machines containing the [RL11 Component](/modules/pdp11/lib/pc11.js) include:

Expand Down
Loading

0 comments on commit bdbfbd9

Please sign in to comment.