[Simh] transferring files to and from v6 unix running in pdp11 emulator

Will Senn will.senn at gmail.com
Fri Nov 20 11:35:06 EST 2015


Hi,

I have searched and searched and have not found a satisfactory answer to 
this question:

How can I efficiently copy files from my host system to unix version 6 
running in the pdp11 emulator and from unix 6 to my host system?

Most answers are shallow (copy/paste in terminal), or oriented toward 
RTS or another environment than unix. So, I thought I would articulate 
some of the ideas that I have tried and then ask some relevant questions 
in the hopes that the someone will shed some light on the problem, if 
not provide the answers.

My system is one of:
Debian 8 running on Intel Core 2 Quad Processor
FreeBSD 10.2 running on same
Macbook Pro running on Intel i7
Various Linuxes running in Virtualbox 5.x

Here are the methods I have found that work, sort of...

Unix on PDP11 SimH to Host:
1. cat file and copy and paste from terminal
This only works for pure text files and is not ideal

2. setup lpt in simh attached to printer.txt and cat file > /dev/lp0
This only works for textual output, but includes form feed characters 
and has formatting applied on its way to printer.txt

3. attach a blank tape tm0 to simh and dd if=myfile of=/dev/rmt0, then 
on the host deblock the tape and dd if=tapefile of=myfile
This seems to work, but I'm not sure it's ok to do this. It doesn't 
appear to work as well in the other direction.

Host to Unix v6 on PDP11 SimH:
1. copy a file into the copy buffer on the host and in the unix terminal 
window, paste the text.
Wow, this is tricky. It seems like you can only paste a few lines at a 
time. It does strange things if your text contains special characters 
like #, @, (, and so forth, which makes it pretty annoying as 
practically every file of interest is c source or something. However, 
with patience this does sort of work, but it's just for text files.

2. use Wolfgang's enblock - enblock < myfile > myfile.enb and then 
attach to tm0 in simh and dd if=/dev/rmt0 of=myfile
This is problematic, resulting in read errors and when diff'ed against 
files on the simh unix instance, produces errors about incomplete 
lines.  I am fairly sure that there is a good reason why it sort of 
works, but not fully. i.e. The resulting file is 99% ok.

Ideally, I would be able to tar up some files and convert the tar to a 
storage format that unix v6 could then access and untar. One problem is 
that v6 doesn't have tar. So, maybe ar could be used, or tp, or whatever 
other command is available on v6. Regardless, the underlying issue is 
that a file needs to be converted to a storage format that unix v6 can 
handle. This leads to the questions.

* I don't have a deep knowledge of storage formats, so it may be that 
what I'm asking isn't feasible, if someone could share the why along 
with the how or how not, that would be great.

1. Is there a simple, known, way to convert a single file, or multiple 
files at once, on a *nix host to a tape image that can be read by simh 
and unix v6? Perhaps something along the lines of - on the host, 
convert_util myfile tape.simh; in simh, attach tm0 tape.simh; on unix, 
dd if=/dev/mt0 of=myfile

2. Is it appropriate to read directly from a simulated tape device using 
dd, or is dd going to read the tape marks (whatever those are) as part 
of the file data?

3. Is the tape device the best to use for something like this, or would 
another device be more straightforward?

Grateful for any assistance,

Will



More information about the Simh mailing list