top | item 2464200

JavaScript PDP11 emulator running Unix V6

128 points| sedachv | 15 years ago |pdp11.aiju.de | reply

30 comments

order
[+] angusgr|15 years ago|reply
The source code is quite readable as well. pdp11.js has cases for stepping each instruction. 2Mb hard disk image loaded into an array via an ajax request (rk05.js)

Is it possible to benchmark this on a modern PC/browser, against a real PDP-11?

[+] enf|15 years ago|reply
Pretty amazing. My tips to anyone else trying this out:

* Remember that cd was spelled chdir in v6

* "stty -lcase" will make it stop putting everything in caps

[+] Maci|15 years ago|reply
chdir usr

chdir games

wump

edit: fixed.

[+] jws|15 years ago|reply
The question is, how do I mount my RL02 pack with the software I saved?

(That's a 14" removable platter drive that stored 5 million bytes! Amazing. A couple decades and the media is essentially unreadable. I suppose someone with a STM could work it out.)

[+] unwind|15 years ago|reply
I haven't looked at the physical interface at all, but if you have any interest whatsoever in electronics, that might be something you can whip up yourself with e.g. an Arduino for instance. Of course, that probably requires quite a lot of time invested. And be careful when you write your driver so you don't overwrite the tracks with bogus data, that would be ironic (or something).
[+] caf|15 years ago|reply
I'm sure you can find someone online with a working RL02 who'd be happy to create an image of your disk for you.
[+] st3fan|15 years ago|reply
Pretty awesome. I compiled HELLO.C. Took a minute, but it works.
[+] olegp|15 years ago|reply
Would be awesome to see someone try this on Node or Akshell (http://www.akshell.com/ide/) and see how it performs on server side V8. Could even add a real time, multi-user console to it.
[+] tectonic|15 years ago|reply
# date

Fri Oct 10 12:33:34 EDT 1975

[+] cygwin98|15 years ago|reply
# pwd

/usr/ken

# vi

vi: not found

Wow, it's like I was traveling in a time machine back to 70's and saw Ken Thompson hacking. One thing that has always taken for granted is that vi is the ubiquitous editor in Unix world, it's NOT true, :)

[+] mitchty|15 years ago|reply
I think this is when you learn that ed is truly the ubiquitous editor. None of these fancy visual editors like vi, also if the date is to be believed, this predates vi by a year (1976 is when Joy created it if I remember right).

Also, I just realized its been a long time since I had to use ed, but this is fun. Its like a more civilized age of unix, ls -l doesn't print groups. So much fun to be had here.

[+] brazzy|15 years ago|reply
ed is the standard text editor - used to say so in its manpage, too.

I own a Unix book in which the authors dismiss vi as too bloated to be usable ("you need a large PDP-11 for it to fit into memory and still have room for an actual text to edit") and having too many features for anyone to need.

[+] tectonic|15 years ago|reply
It sure isn't happy about `rm-rf /`
[+] silon|15 years ago|reply
Complete with non working backspace, just like in Linux early days.
[+] com|15 years ago|reply
Early days? Still happens for me with odd terminal apps here and there on things like Windows.
[+] exit|15 years ago|reply
i don't understand where the file system / hard disk content is store.
[+] angusgr|15 years ago|reply
Take a look at rk05.js. It makes a background AJAX request for a URL with the 2Mb hard disk image, then loads it into a plain javascript array and emulates the hard disk accesses to it.