Using ED as an editor for example. And this very basic BASH.
We where forced to work as root all the time because “sudo” was not existing. ( “SU” was of course)
I never used ED
but i wrote my first pascal programs with EDLIN ( rings a bell?)
When I was working on the old UNIX systems I used VI and use it up today.
Are there also guys on this mail list interested in the software ?
I am particular interested how to get files on and off the pidp11 for unix6 .
Any good way to do that ?
Can I open a serial port and do any kind of kermit? Is this available for unix6 ?
BTW
I use my Apple III with XModem software to log into the pidp11 unix6 .
My Apple II can also connect with Kermit and other protocols.
Of course i can also ssh from my PC/Mac over wifi :-( (not preferred)
On May 15, 2022, at 12:32 PM, Clem Cole <cl...@ccc.com> wrote:below...On Sun, May 15, 2022 at 12:32 PM Hecky Beckenbauer <heckybecke...@gmail.com> wrote:Using ED as an editor for example. And this very basic BASH.Ouch .. points off for historical rewriting .... Serious and no offense intended, your message shows that you seem to have missed some large parts of UNIX history and thus may have been led astray.The UNIX shell that Steve Bourne developed and released in UNIX/TS and Seventh Research Ediot (a.k.a. the Bourne shell or simple /bin/sh) and later Joy's cshell beget gnu bash. Fourth, Fifth, and Sixth edition has a /bin/sh but it is the Thompson shell and the only relation it has is the precursor to cshell was Joy's Berkeley in {1}BSD which he started hacking on i.e. he extended the Thompson shell to create the shell in BSD, then did more hacking and created the new cshell, which he released on the original 2BSD tape.The point is Bourne Shell, not Bash is root of things.
As we used to say in the old days ... Bourne to Program, Type with Joy.Note Steve wrote his shell on a Research v6 system that was in the process of becoming the new UNIX/TS kernel and what would get released as the kernel in the Research Seventh Edition. I have personally not tried backporting the V7 released version of the Bourne Shell to v6, but they do exist (IIR I recall Noel has one in his archives of the MIT UNIX systems). If you do try to backport, there are going to be at least two issues. The code itself is written in Steve's infamous 'BourneGOL' macros, and at the time of his writing it, Dennis' C compiler was in transition. That new compiler is usually referred to as 'Typesetter C,' as it was being developed for BWK's ditroff work. Steve may have used facilities from the new compiler. If so, you'll need to either find a copy of typesetter C (which is the version of C that is described in K&R and has its libS.a - i.e. v6 kernel), or ensure none of the newer language features are used. I frankly don't remember, Noel is the better keeper of PWB 1.0 history, than I; but I >>think<< John Mashey (one of PWB's main parents) released PWB 1.0 with the Typesetter compiler stream.
We where forced to work as root all the time because “sudo” was not existing. ( “SU” was of course)As did many of sudo's precursors, the 'priv' command was probably the most popular in those days. There is a copy on a mid-late 70s GA Tech tape and I think on a USENIX tape. FWIW: these days, I actually have an alias of priv to sudo since I have been using it for 45+ years. @. UCB we had other tricks that used cshell macros, which I'll not describe. The biggest feature sudo did over priv, was starting to keep a log of what way being typed, so you could know who blame when bad things happened.But the point is, it was well know in the early-modf 1970s that smart people working as a sys admin would never work as root for more than a command or two. That why ken wrote su(1). su for a command or two fix what you needed, drop back to being mortal. priv and sudo just make this a tad easier and started adding some protection as to who could run it and what could be done. But they are >>old<< commands.I never used ED
Ouch ... Please get a copy of Kernighan Pike's 'The Unix Programming Environment (TUPE) and start doing the exercises. Learning ed(1) (and *roff to be honest) is important - even today. You will not properly learn to use grep (the g-Global / r-Regular e=Expression / p-Print command from ed or sed, or a number of other tools including vi itself. Remember Vi is the VIsual command to UCB'ed extensions to V6's ed - called ex. The point is doing the exercises in TUPE will put you on a level footing for any and all UNIX versions. So much of the mystery and miss confusion we have is because people just never learned the details.I describe this a little like why we teach sentence structure to 1st and 2nd graders. No one will diagram a sentence in real life. But once they understand how the language is put together, they become better writers later.Bottom line it's not a waste of time to know how to use ed(1) and troff(1) -- you will be surprised what will started to be revealed as to why things work as they do.
... end sermon …
but i wrote my first pascal programs with EDLIN ( rings a bell?)EDLIN came from Microsoft for PC/MS-DOS. I'm a pretty long time (old) UNIX hacker, I know of no one that ever bothered to write a version of it for UNIX. I know a lot the UNIX editors's moved to DOS not the other way round. If you do, I'd be curious about it. I did once hear that FreeDOS folks cloned it in C but I have never seen the code nor have any idea if it will work anywhere other than FreeDOS..
When I was working on the old UNIX systems I used VI and use it up today.Actually versions of vi ran on everything from the Cray systems to a PC I had access to in those days. Very handy piece of SW. EMACS could not do that. Eventually when microprocessors had enough address space and memory EMACS moved.FWIW: If you grab the 2BSD distribution from archive TUHS.org, ex/vi might compile on v6. You might have to install the original BSD stuff first. Joy wrote the original on the Cory Hall V6 system and only upgraded it to V7 in late 1979 after V7 came to UCB. Same issues I mentioned WRT Bourne shell being developed on Sixth Edition.
You can also poke around anything that is PWB 1.0 based. I'm going to lie a little, but for these purposes its true enough, PWB 1.0 was (mostly) based on a V6 kernel and most things just recompile if not work binary to binary.FWIW: Webb Miller's vi 'clone' called s from his Software Tools Book, compiles and runs on everything from 8 bit CP/M machines to modern. It recompiled out of the box on Seventh edition, which is what is running on my own PiDP-11. Since it works on an 8-bit machine too with old and much similplier compilers, it might just compile on Fifth or Sixth edition without too much work. The issue is you must use it with a full ANSI based terminal (like XTERM or the PC/ANSI mode from DOS) - are know to work, but some DEC "VT-100" emulators are known to burp on this code. It works fine on H19 and Wyse60, but I no longer have access a real DEC terminal so I can not tell you if that will work i.e. YMMV ....
Are there also guys on this mail list interested in the software ?
I'm not sure what you mean by this…
I am particular interested how to get files on and off the pidp11 for unix6 .
Any good way to do that ?There are numerous solutions. IMO the easiest is to ensure you have all 8 RK05 disks configured on your copy of v6 and the proper mknod entries in /dev for each.Then either find a modern copy of tp(1) [not hard, but the tape image format has a number of limits], or put a binary copy of Ken's v6tar on your eumlated V6 so you can read and write tar images there. The original tp(1) program Ken wrote in PDP-11 assembler, but a number of replacement tp's came along in hte community -- with stp(1) from Harvard being the most used before Ken released tar with V7.So on my mac, I type: tar cvf some_file_for_output file1 ... dir1 .... etc..Then in the boot.ini, attach some_file_for_output as the 'disk' for the RK05 n [I tend to use 7 for transfers]then on you emulated V6 you can type: v6tar xvf /dev/rrk0X and you will see the files.Writing works in reverse...exercise for the reader ... how will you get v6tar over there in the first place - hint dd(1) if your friend.Obvious, The V6 tp programs works the same way, but you'll need a modern copy of tp(1) for your Mac to write the images for simh.
Can I open a serial port and do any kind of kermit? Is this available for unix6 ?Yes there are versions of kermit and other tools in the wild. I find them slow and awkward, and you add a level indirection/confusion WRT the terminal handlers that I have watched too many people get sucked down rat holes from numerous different places where misunderstanding can come - the RS-232 interface vs USB, different virtual UART vs local UART issues, tty handlers on both the host and emulator side. The point is that chasm is deep and there are a lot of strange beast at bottom, so the learning curve can be long.The shared disk scheme is pretty easy once you get used to how simh works from a mechanics standpoint (when the stop the simulation, switch virtual disks etcs). Just understand that virtual disk in simh is a linear array of 512 byte blocks. It will read or create data in that format. The simh driver will limit the size of the 'virtual file' to be the size of the disk. An RK05 gives you a whopping 4872 blocks (2494464 bytes) but for most transfers this is plenty since you don't have much storage on your virtual system disk anyway.BTW: simh of course supports emulated tapes. That will work also but you'll need to convert the files from bytes to the *.tap format described in the simh documentation. This of course removes the file size constraints, since virtual tapes can be of any size. Frankly, I think its an extra step and I don't have a problem reserving a virtual disk as my common I/O device..
BTW
I use my Apple III with XModem software to log into the pidp11 unix6 .
My Apple II can also connect with Kermit and other protocols.Issue will be the terminal handler/emulator. I have no idea how good the kermit terminal functions are. If they are full ansi, you should be fine.
Of course i can also ssh from my PC/Mac over wifi :-( (not preferred)Many of us use real 1G wired ethernet and then run a VNC server on the PC and VNC client on the Mac
It means you are getting a xterm and full cut/paste which is handy. The emulated system can be fairly stripped compared to today's system and you need fewer resources on it to support it. simh is doing most of the hard work on the emulated side.
From lurking for a while on this mail-list I got the impression most people are more interested in adding a case to the pidp11 and less of using the simulator . Just my first impression that’s why i was asking .
that is a good input, thanks.Something which points me into a working direction.I will look into that .
I am not insisting on Kermit , I know it from my days when I was using HP48 calculators which had a serial port and you could transfer programs to a PC/Mac with the kermit protocolVery basic but would work, thats why I was mention it .
Of course i can also ssh from my PC/Mac over wifi :-( (not preferred)Many of us use real 1G wired ethernet and then run a VNC server on the PC and VNC client on the Macwhat different does it make if I VNC via wifi or ethernet ?I can connect the Raspberry to my Ethernet network ,as all my Mac’s are 9Even my Apple II is on the etherent)
It means you are getting a xterm and full cut/paste which is handy. The emulated system can be fairly stripped compared to today's system and you need fewer resources on it to support it. simh is doing most of the hard work on the emulated side.I may misunderstand this but I still need a terminal window running the simH simulating the PDP11, right ?
See copy and paste is not working so smoothly when you have only ED as editor.
below... -- after editing...On Sun, May 15, 2022 at 9:01 PM Hecky Beckenbauer <heckybecke...@gmail.com> wrote:From lurking for a while on this mail-list I got the impression most people are more interested in adding a case to the pidp11 and less of using the simulator . Just my first impression that’s why i was asking .There are two other lists that more appropriate.simh itself and if you are interested in UNIX things TUHS.that is a good input, thanks.Something which points me into a working direction.I will look into that .If you can not find v6tar easily (binary can be found in both TUHS and Noel's archives - that later is probably quicker, let me know off list I;ll get you a copy of it.I am not insisting on Kermit , I know it from my days when I was using HP48 calculators which had a serial port and you could transfer programs to a PC/Mac with the kermit protocolVery basic but would work, thats why I was mention it .It's not Kermit and any tool -- you just have extra levels of emulation and lots of places to trip up. If you just want a reliable transfer, the disk is easier. On the mac, I often run a different simulator that has a shared virtual disk between the emulated system and the local system. With the PiDP-11 you don't have that option. Folks have talked of doing something like that for simh, but so far most folks have worked on enhancing in other places. Read -- opportunity awaits...
Of course i can also ssh from my PC/Mac over wifi :-( (not preferred)Many of us use real 1G wired ethernet and then run a VNC server on the PC and VNC client on the Macwhat different does it make if I VNC via wifi or ethernet ?I can connect the Raspberry to my Ethernet network ,as all my Mac’s are 9Even my Apple II is on the etherent)Unfortunately, WiFi != Hardwire Ethernet. When simh and the emulated system try to run, those differences are acute. I'll not go into the issues here [read the simh mailing archives if you want the details]. You can make it work, but ethernet wire is cheap and many/most RPi's have ethernet options. I run my PiDP-11 on an original Zero with a POE ethernet to power it all from my 48 port Cisco switch. Meaning to switch the PiDP-8 to that set up also, but so far have not.It means you are getting a xterm and full cut/paste which is handy. The emulated system can be fairly stripped compared to today's system and you need fewer resources on it to support it. simh is doing most of the hard work on the emulated side.I may misunderstand this but I still need a terminal window running the simH simulating the PDP11, right ?Well, you need at least a console and possibly a connection to a second DL-11 port. IIRC Ken's default V6 configure you may need to change a parameter, but frankly, I have forgotten.I have configured simh to set up the virtual serial ports on TCP connections. I can connect to them from the Mac or from an xterm on the PI using VNC.See copy and paste is not working so smoothly when you have only ED as editor.FYI - I do it all the time with both v6 and v7.I suspect your configuration is either somehow different than mine in some way or more probably your expectations maybe is a tad different.The way tty characters and how that is handled are independent of cut/paste. There are differences in the tty handlers between v6 and v7and the modes that ex/vi run compared to ed.Again I tend to mess with a V7 system with a few small tty mods to make more modern typing a tad more convenient - which we actually developed in the late 1970s. I believe Noel has similar hacks in his V6/PWB mashup from MIT. It all depends on what you want to do/what your expectations are. Even on V7 back in the day, we had glass TTYs like PE Foxes, Tek 4025, LSI ADM3As, H19s, and AAAs -- so even then we wanted proper backspace operation and preferred ^U to @ for line kill. Those changes are all very small and given we wrote them for V7 (on V7) years ago, I don't have a problem with using them today.Again it's how far to do want to go... if you want a UNIX closer to the most modern running a PiDP-11, then a version BSD 2.11 which will give you networking. The PiDP-11 runs it just fine -and will boot to it]. Frankly, given that will provide you networking to/from the emulated host, you might find that more comfortable.That's not mine. I desire to use the system pretty much as a way configured in those days to test things I have long forgotten, reexamination of things we did, often with some level of nostalgia - we did an awful lot with very little. I want a small level of comfort. I've meant to install a few things from the original 2BSD tape like I had at CMU and on the Teklab's machines in those days. Frankly, have not bothered. I have a couple of old tools and as I said, I run Webb's s on my v7 system instead of vi - which is good enough.YMMV ...ᐧ
--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/CAC20D2MC2Ojart0mQFw6tSKob0JeuOFVib4UYyD%2B1c2Bh7uVWg%40mail.gmail.com.
Are there also guys on this mail list interested in the software ?
I'm not sure what you mean by this…From lurking for a while on this mail-list I got the impression most people are more interested in adding a case to the pidp11 and less of using the simulator .
Just my first impression that’s why i was asking .
-- John H. Reinhardt
Warner,thanks for the reply.so just a tar and then mount as a tape drive ?
So I should declare a TP in simh first .
Sounds like a straight forward way. I will try to make it work.
SIMH Magtape Representation and Handling
Bob Supnik, 30 Aug 06
Magtape Representation
SIMH represents magnetic tapes as disk files. Each disk file contains a series of objects. Objects are either metadata markers, like tape mark or end of medium, or they are data records. Location 0 of the file is interpreted as beginning of tape; end of file is interpreted as end of medium. Pictorially:
Location 0:
+--------+
| data |
| record |
+--------+
| data |
| record |
+--------+
: +--------+
| tape |
| mark |
+--------+
| data |
| record |
+--------+
:
end of file:
Metadata markers are 4 bytes stored in little-endian order. The currently defined metadata markers are:
0xFFFFFFFF
0xFFFFFFFE
0xFF000000:0xFFFFFFFD
0x00000000
end of medium
erase gap
reserved
tape mark
Data records are consist of an initial 4 byte record length n, (n + 1) & ~1 bytes of data, and a trailing 4 byte record length n that must be the same as the initial record length:
bytes 0:3
bytes 4:n+3
+--------+ | record | | length | +--------+ |data| |:| |:|
+--------+
bytes n+4:n+7 | record |
| length |
+--------+
Note that the data is rounded to an even number of bytes. If the record length is odd, the extra byte is undefined but should be 0.
Record lengths are 4 bytes stored in little-endian order. The high order bit is flag, indicating that the record contains an error; the next 7b must be zero; the low 24 bits are the record length:
bit<31>
bits<30:24>
bits<23:0>
1 = record contains error
0 = record is error-free
must be zero
record length, must be non-zero
The leading and trailing record lengths allow a record to be accessed either forward or backward.
Magtape Operations
Magnetic tape drives can perform the following operations:
Read forward
Read backward
Write forward
Space forward record(s)
Space backward record(s)
Space forward file(s)
Space backward file(s)
Write tape mark
Security erase
Write erase gap
On a real magtape, all operations are implicitly sequential, that is, they start from the current position of the tape medium. SIMH implements this with the concept of the current tape position, kept in the pos field of the tape drive’s UNIT structure. SIMH starts all magtape operations at the current position and updates the current position to reflect the results of the operation:
• Read forward. Starting at the current position, read the next 4 bytes from the file, skipping any intervening gap. If those bytes are a valid record length, read the data record and position the tape past the trailing record length. If they are a tape mark, signal tape mark and position the tape past the tape
mark. If they are end of medium, or an end of file occurs, signal no more data
(‘long gap’ or ‘bad tape’) and do not change the tape position.
Read reverse. If the current position is beginning of tape, signal BOT.
Otherwise, starting at the current position, read the preceding 4 bytes from the file, skipping any intervening gap. If those bytes are a valid record length, read the data record and position the tape before the initial record length. If they are a tape mark, signal tape mark and position the tape before the tape mark. If they are end of medium, or an end of file occurs, signal no more data (‘long gap’ or ‘bad tape’) and position the tape before the end of medium marker.
Write. Starting at the current position, write the initial record length, followed by the data record, followed by the trailing record length. Position the tape after the trailing record length.
Space forward record(s). Starting at the current position, read the next 4 bytes from the file, skipping any intervening gap. If those bytes are a valid record length, position the tape past the trailing record length and continue until operation count exhausted or metadata encountered. If those bytes are a tape mark, signal tape mark and position the tape after the tape mark. If they are end of medium, or an end of file occurs, signal no more data (‘long gap’ or ‘bad tape’) and do not change the tape position.
Space reverse record(s). If the current position is beginning of tape, signal BOT. Otherwise, starting at the current position, read the preceding 4 bytes from the file, skipping any intervening gap. If those bytes are a valid record length, position the tape before the initial record length and continue until operation count exhausted, BOT, or metadata encountered. If they are a tape mark, signal tape mark and position the tape before the tape mark. If they are end of medium, or an end of file occurs, signal no more data (‘long gap’ or ‘bad tape’) and position the tape before the end of medium marker.
Space forward file(s). Starting at the current position, read the next 4 bytes from the file, skipping any intervening gap. If those bytes are a valid record length, position the tape past the trailing record length and continue. If those bytes are a tape mark, signal tape mark, position the tape after the tape mark, and continue until operation count exhausted. If they are end of medium, or an end of file occurs, signal no more data (‘long gap’ or ‘bad tape’) and do not change the tape position.
Space reverse file(s). If the current position is beginning of tape, signal BOT. Otherwise, starting at the current position, read the preceding 4 bytes from the file, skipping any intervening gap. If those bytes are a valid record length, position the tape before the initial record length and continue. If they are a tape mark, position the tape before the tape mark and continue until operation count exhausted or BOT. If they are end of medium, or an end of file occurs, signal no more data (‘long gap’ or ‘bad tape’) and position the tape before the end of medium marker.
Write tape mark. Starting at the current position, write a tape mark marker. Position the tape beyond the new tape mark.
Security erase. Starting at the current position, write an end of medium marker. Do not update the tape position.
Write erase gap. Starting at the current position, erase the amount of tape indicated by the specified length and bpi. If the end of the gap overwrites an existing record, shorten that record appropriately. Position the tape after the gap.
Magtape Emulation Library
--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/CAC20D2O09cxJmfgkWwqSxSKjBQMrzcZVe4YAeRbV2uL3MBu%3D5g%40mail.gmail.com.
Actually, there is a separate repo which contains the simtools things. This is located at https://github.com/simh/simtools
Meanwhile, current simh version tape supports simple attachment of tar files:
sim> ATTACH TS0 -f tar <tar-file>
- Mark
I don't think you need to convert anything, just use a raw disk drive of an appropriate size (yes, you will probably need to be root to extract files from such a "tar file"): attach the tar file as a disk drive unit in SimH (I'd suggest using the -r switch for read-only attachment), then use the corresponding device as an argument to the -f switch with tar in unix...