Using Mass Storage Devices on Simh PDP-11/RT-11: Paper Tape, Diskette, Dectape

I want to know how to transfer ASCII data in/out of the PDP-11 and any type of file between simulated PDP-11s. So I learned to use several simh mass storage devices on the PDP-11 emulator.

Paper Tape



I definitely want to be able to get ASCII data into and out of the system. Way back when I was messing with the DEC-10 emulation I was doing this using a card punch and reader. Looking at the PDP-11 emulation there is no card punch and someone said the reader has an issue as well (I’ve forgotten what though).

This leaves the paper tape punch/reader. Which works just as well.

The combo paper tape reader/punch device controller in simh is called ptp. It is enabled by default:

sim> show ptp
PTP address=17777554-17777557, vector=74, BR4
not attached
sim>

I’m going to copy a text file to the paper tape punch first, so I attach a file to the controller in simh:

sim> att ptp punch.out
%SIM-INFO: PTP: creating new file
sim> c

The RT-11 device name for the punch is PC:, so I simply copy a text file to it:

.COPY MYMAC.MAC PC:
Files copied:
DK:MYMAC.MAC to PC:

To examine the punch.out file I must detach it:

sim> det ptp
sim> cat punch.out
        .TITLE  HELLO WORLD
        .MCALL  .TTYOUT,.EXIT
HELLO:: MOV     #MSG,R1  ;STARTING ADDRESS OF STRING
1$:     MOVB    (R1)+,R0 ;FETCH NEXT CHARACTER
        BEQ     DONE     ;IF ZERO, EXIT LOOP
        .TTYOUT          ;OTHERWISE PRINT IT
        BR      1$       ;REPEAT LOOP
DONE:   .EXIT

MSG:    .ASCIZ /Hello, world!/
        .END    HELLO

To copy the paper tape back to a different file on the PDP-11:

sim> att ptr punch.out
sim> c
.COPY PC: TEST.MAC
Files copied:
PC: to DK:TEST.MAC
.TYPE TEST.MAC
        .TITLE  HELLO WORLD
        .MCALL  .TTYOUT,.EXIT
HELLO:: MOV     #MSG,R1  ;STARTING ADDRESS OF STRING
1$:     MOVB    (R1)+,R0 ;FETCH NEXT CHARACTER
        BEQ     DONE     ;IF ZERO, EXIT LOOP
        .TTYOUT          ;OTHERWISE PRINT IT
        BR      1$       ;REPEAT LOOP
DONE:   .EXIT

MSG:    .ASCIZ /Hello, world!/
        .END    HELLO

I did attempt to copy a binary file (using /BINARY switch) and it failed with

?PIP-F-Output error PC:

probably not happy having a binary file sent to a paper tape punch.

RX01 Floppy Drive

I don’t think I’ll have any need to transfer binary data (e.g. programs) INTO a PDP-11, BUT I might want to copy binary from one PDP-11 to another. This would be done using the floppy drive.

The simh controller for RX01 drives is call RX. The RT-11 devices are DX[n]: .

When attaching a ‘new’ file to an RX controller, you need to include the -I switch so the floppy is formatted correctly.

sim> att rx0 -i rx-floppy.dsk
%SIM-INFO: RX0: Creating new file: rx-floppy.dsk
%SIM-INFO: Initializing 2002 sectors each 128 bytes in size with the sector address
%SIM-INFO: RX0: Initialized To Sector Address 2002 sectors. 100% complete.
%SIM-INFO: RX0: buffering file in memory
sim> c

If you try to access the newly created diskette, it will fail until you initialize it:

.DIR DX0:

?DIR-F-Illegal directory
.INITIALIZE DX0:
DX0:/Initialize; Are you sure? Y

.DIR DX0:

0 Files, 0 Blocks
486 Free blocks

Now copy a file to DX0:

.COPY MYMAC.MAC DX:
Files copied:
DK:MYMAC.MAC to DX:MYMAC.MAC

and copy it back to the hard drive under a different name:

.COPY DX:MYMAC.MAC TEST.MAC

Finally, compare the files to see if there are any changes:

.R SRCCOM
*MYMAC.MAC,TEST.MAC
?SRCCOM-I-No differences found

RX02 Floppy Drive

At first, I couldn’t get the RX02 Floppy Drive to work so I assumed version 4 of RT-11 just didn’t support it. Eventually I discovered if you disable controller RX, enable controller RY, and reboot it will work.

simh>set rx disable
simh>set ry enable
simh>att ry -i ry.dsk
simh>c

.INIT DY:
DY0:/Initialize; Are you sure? Y

.DIR DY:

0 Files, 0 Blocks
974 Free blocks
.

RX02 drive give you twice the number of blocks.

I have not experimented with this, but this post describes how to format a floppy so it can be booted:

DECtape

It appears DECTapes have less storage capacity than an RX02 floppy so there probably isn’t much point messing with the DECTape controller except as an experiment.

After using it a bit I realized that DECTapes work very much like floppies except they are much slower (in real-life, not the simulation). The 9 track tape drives I used in the days of the HP3000 didn’t have a directory nor could they be updated. The only ‘update’ possible was to append new data to the end.

The simh controller for the DECTape drive is TC and must be enabled:

sim> set tc enable
sim> show tc
TC address=17777340-17777351, vector=214, BR6, 8 units
TC0 147KW, not attached, write enabled
16b
TC1 147KW, not attached, write enabled
16b

The RT-11 device names for the DECTape drive are TC[n]: .

To create a new file and attach it to the DECTape controller:

sim> att tc dec.tap
%SIM-INFO: TC0: creating new file
TC0: 16b format, buffering file in memory
sim> c

As with a floppy you must initialize the DECTape:

.INIT /BADBLOCK DT0:
DT0:/Initialize; Are you sure? Y
?DUP-I-No bad blocks detected DT0:

.DIR DT0:
20-Dec-94

0 Files, 0 Blocks
564 Free blocks

Copying files to the DECTape:

.COPY MYMAC.* DT:
Files copied:
DK:MYMAC.SAV to DT:MYMAC.SAV
DK:MYMAC.MAC to DT:MYMAC.MAC
DK:MYMAC.OBJ to DT:MYMAC.OBJ

.DIR DT:
20-Dec-94
MYMAC .SAV 2 20-Dec-94 MYMAC .MAC 1 20-Dec-94
MYMAC .OBJ 1 20-Dec-94
3 Files, 4 Blocks
560 Free blocks

Copy a file from the DECTape:

.COPY DT:MYMAC.MAC TEST.MAC

.DIR TEST.MAC
20-Dec-94
TEST .MAC 1 20-Dec-94
1 Files, 1 Blocks
762 Free blocks

Delete a File from a DECTape:

.COPY TEST.MAC DT:
Files copied:
DK:TEST.MAC to DT:TEST.MAC

.DIR DT:
20-Dec-94
MYMAC .SAV 2 20-Dec-94 TEST .MAC 1 20-Dec-94
MYMAC .OBJ 1 20-Dec-94 MYMAC .MAC 1 20-Dec-94
4 Files, 5 Blocks
559 Free blocks

.DEL DT:TEST.MAC
Files deleted:
DT:TEST.MAC ? Y

.DIR DT:
20-Dec-94
MYMAC .SAV 2 20-Dec-94 MYMAC .OBJ 1 20-Dec-94
MYMAC .MAC 1 20-Dec-94
3 Files, 4 Blocks
560 Free blocks

Creating a Bootable DECTape

As a bonus problem, I figured out how to boot from DECTape.

Initialize a dectape:

.INIT DT:
DT0:/Initialize; Are you sure? Y

.DIR DT:
20-Dec-94

0 Files, 0 Blocks
564 Free blocks

copy system files

.COPY /SYSTEM *.SYS DT:
Files copied:
DK:SWAP.SYS to DT:SWAP.SYS
DK:RT11BL.SYS to DT:RT11BL.SYS
DK:RT11SJ.SYS to DT:RT11SJ.SYS
DK:RT11FB.SYS to DT:RT11FB.SYS
DK:TT.SYS to DT:TT.SYS
DK:DT.SYS to DT:DT.SYS
DK:DP.SYS to DT:DP.SYS
DK:DX.SYS to DT:DX.SYS
DK:DY.SYS to DT:DY.SYS
DK:RF.SYS to DT:RF.SYS
DK:RK.SYS to DT:RK.SYS
DK:DL.SYS to DT:DL.SYS
DK:DM.SYS to DT:DM.SYS
DK:DS.SYS to DT:DS.SYS
DK:DD.SYS to DT:DD.SYS
DK:MT.SYS to DT:MT.SYS
DK:MM.SYS to DT:MM.SYS
DK:MS.SYS to DT:MS.SYS
DK:LP.SYS to DT:LP.SYS
DK:LS.SYS to DT:LS.SYS
DK:CR.SYS to DT:CR.SYS
DK:NL.SYS to DT:NL.SYS
DK:PC.SYS to DT:PC.SYS
DK:PD.SYS to DT:PD.SYS
DK:CT.SYS to DT:CT.SYS
DK:BA.SYS to DT:BA.SYS
DK:MTHD.SYS to DT:MTHD.SYS
DK:MMHD.SYS to DT:MMHD.SYS
DK:MSHD.SYS to DT:MSHD.SYS

Copy other misc files necessary to get as far as booting. Note that “copy /boot DT:RJ11SJ.SYS DT” indicates that you will be booting the RT-11 Single Job monitor.

.COPY /BOOT DT:RT11SJ.SYS DT:
.COPY DIR.SAV DT:
Files copied:
DK:DIR.SAV to DT:DIR.SAV

.COPY STARTS.COM DT:
Files copied:
DK:STARTS.COM to DT:STARTS.COM

.COPY DUP.SAV DT:
Files copied:
DK:DUP.SAV to DT:DUP.SAV
.COPY PIP.SAV DT:
Files copied:
DK:PIP.SAV to DT:PIP.SAV
.COPY V4USER.TXT DT:
Files copied:
DK:V4USER.TXT to DT:V4USER.TXT

here are all the files I put on the dectape:

.DIR

SWAP  .SYS    25  01-Feb-82      RT11BL.SYS    65  01-Feb-82
RT11SJ.SYS    67  01-Feb-82      RT11FB.SYS    80  01-Feb-82
TT    .SYS     2  01-Feb-82      DT    .SYS     3  01-Feb-82
DP    .SYS     3  01-Feb-82      DX    .SYS     3  01-Feb-82
DY    .SYS     4  01-Feb-82      RF    .SYS     3  01-Feb-82
RK    .SYS     3  01-Feb-82      DL    .SYS     4  01-Feb-82
DM    .SYS     5  01-Feb-82      DS    .SYS     3  01-Feb-82
DD    .SYS     5  01-Feb-82      MT    .SYS     9  01-Feb-82
MM    .SYS     9  01-Feb-82      MS    .SYS    10  01-Feb-82
LP    .SYS     2  01-Feb-82      LS    .SYS     2  01-Feb-82
CR    .SYS     3  01-Feb-82      NL    .SYS     2  01-Feb-82
PC    .SYS     2  01-Feb-82      PD    .SYS     3  01-Feb-82
CT    .SYS     6  01-Feb-82      BA    .SYS     7  01-Feb-82
MTHD  .SYS     4  01-Feb-82      MMHD  .SYS     4  01-Feb-82
MSHD  .SYS     5  01-Feb-82      DIR   .SAV    17  01-Feb-82
STARTS.COM     1                 DUP   .SAV    41  01-Feb-82
PIP   .SAV    23  01-Feb-82      V4USER.TXT     1  15-Dec-94
 34 Files, 426 Blocks
 138 Free blocks

Boot from dectape:

.BOOT DT:

RT-11SJ V04.00C

Boot from hard disk:

.BOOT RK:

RT-11SJ V04.00C

At this point, I’ve got the PDP-11/PiDP-11 operations down well enough I’m ready to dig into learning some MACRO-11.

 

This entry was posted in c-retro and tagged , , . Bookmark the permalink.

4 Responses to Using Mass Storage Devices on Simh PDP-11/RT-11: Paper Tape, Diskette, Dectape

  1. Pingback: Using Mass Storage Devices on Simh PDP-11/RT-11: Paper Tape, Diskette, Dectape – TOP HACKER NEWS 👻

  2. Pingback: Using Mass Storage Devices on Simh PDP-11 #PDP11 #VintageComputing « Adafruit Industries – Makers, hackers, artists, designers and engineers!

  3. Pingback: Using Mass Storage Devices on Simh PDP-11 #PDP11 … – Adafruit Blog – Ceck an App Builder

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.