Apout on Windows

I read somewhere that kids these days are interested in games where you can modify how the game operates with sub programs written in their own languages etc.

Hello from Unix v7

Hello

So while this does sound interesting, it does remind me of that good old fashioned syscall emulation, where you emulate the CPU, load an executable, but any system calls that are made, are handled by the simulator, little if any hardware is actually emulated. Yes Basilisk II is an example of this, but so is Wine, WOW, NTVDM, i386 code on x64 platforms, and various others. The major advantage is that they typically can access your native file system so you don’t have to mess with virtual disks. Of course it all depends on the implementation.

I did remember this old simulator, Apout, which could run UNIX v6, 7 along with BSD 2.9 stuff on modern Unix. The emulation layer here being LIBC, and how pretty much the basics of how UNIX operates hasn’t changed since those ancient days in the 1970’s.

So I thought I’d try to see how much of this works on Win32 using Microsoft Visual C++ 5. And surprisingly I didn’t have to glue in that much, the biggest thing I had to do was trying to detect if a file about to be opened was ASCII or BINARY as the UNIX platform doesn’t distinguish these two but Win32 with it’s MS-DOS legacy does. As you can see I did get the banner program running, some of the games work ok, although I had to comment out the sgtty functions as there is no immediate equivalent on Windows, and I didn’t think there would be that much of a demand for such a thing anyways. I can even run the login program. Which brings me to the issue which is that it’ll spawn new programs fine, but when an exit is called Apout just exits. Even on Linux it’ll just do this. I tried doing something with setjmp/longjmp but it crashes shortly afterwards… No doubt some stack unwinding fun. As such trying to compile things just bomb out. I went ahead and took the source code to cc and made a native Win32 version that then calls apout for the various parts and that almost worked except I then found out that the assembler on the PDP-11 is a 2 pass assembler, written in assembly. And yes, when as calls as2, and unwinds all hell breaks loose. Which is another problem that UNIX likes to share file descriptors among itself and children, but children like to close things when they die. I guess the solution is to give each child it’s own descriptor table as everyone likes to close stdin/stdout/stderr and even #4, which the simulator uses for logging. it’s very annoying so I just prevented it from closing handles under 4.

But running each of the phases manually does get me an executable but it doesn’t seem to do anything, the only syscalls are closing all the file handles and exiting.

So close!

I don’t think anyone will care, but here is my source/binary along with Unix v7. It’s hard coded to dump stuff into c:\temp for temporary files, the Unix v7 must be in c:\v7 … ugh.

Hunt the wumpus on NT

Hunt the wumpus on NT

But yeah, you can play that thrilling game from 1979, hunt the wumpus!

As part of the retrochallenge 2012, there is a PDP-11 running 2.11 BSD out there!

No, really!

You can get an account, just sign up here!

Sander Reiche has setup a MicroPDP-11/83 with the following specs:

So far there are FOUR users.. which means you can get in on the action for sure!

For those of you who want a sandboxed version at home, you can download my install here, which of course I touched on a while back.

For those unfamiliar, here is what retrochallenge is all about!

  1. RetroChallenge commences July 1st, 2012 and runs until July 31st, 2012.
  2. In order to qualify, computer systems must by approximately 10 years old (or older!)… in general, this means 486 or below, 680×0 and pretty much everything with an 8-bit processor, but we’ll also let you in if you have an old Cray kicking about, and exceptions can always be made for exotica!
  3. Gaming consoles and PDAs qualify if they were made in the previous century.
  4. Where appropriate, replica hardware and emulators may be used.
  5. Entrants are responsible for adequately documenting their projects and submitting occasional updates during the contest.
  6. Projects may encompass any aspect of retro-computing that tickles the fancy of the individual entrant.
  7. Winners will be carefully selected and thoughtfully chosen prizes presented (hopefully before the next challenge commences).
  8. Have fun!

Sadly I don’t have anything physical around here that really qualifies.  A G5 mac is too new, and I recently picked up a Pentium 150 based IBM Aptiva, but its too new apparently….

Follow up on Dungeon (zork) for RT-11

I have documented the install steps back here, a long while back.  However recently I did get a request for a binary for this for someone to try to load up  on a physical PDP-11.  The steps sure are duanting and of course time consuming for a first time user, so while I was building dungeon again, I thought I should take this opertunity to package this up and make it more accesable for everyone.

This is the output of my ‘effort’ although the real thanks to this goes to Bob Supnik ,not only for writing SIMH making it possible, but also for porting Dungeon to Fortran way back then.

Extract the archive using 7zip, then run pdp11.exe and it should boot you up into RT-11.  Then just type in

RUN DUNGEON

And you should be teleported to the open field west of a big white house with a boarded front door…

Open Mailbox

RetroBSD!

2.11 BSD Unix for PIC32, build #826:
     Compiled 2011-08-07 by vak@Cobra.local:
     /Volumes/Users/vak/Project/retrobsd/trunk/sys/pic32/compile
phys mem  = 128 kbytes
user mem  = 96 kbytes
root dev  = (0,0)
root size = 16384 kbytes
swap size = 2048 kbytes
standard daemons: update.
Sun Aug  7 16:47:45 PST 2011

2.11 BSD UNIX (pic32) (console)

login: root
Password:
Welcome to RetroBSD!
# _

Wow isn’t that cool? Who needs a ‘basic stamp’ if you can have UNIX!  Not to mention it’s from Serge Vakulenko, of DEMOS fame!

From the main site:

RetroBSD is a port of 2.11BSD Unix intended for embedded systems with fixed memory mapping. The current target is Microchip PIC32microcontroller with 128 kbytes of RAM and 512 kbytes of Flash. PIC32 processor has MIPS M4K architecture, executable data memory and flexible RAM partitioning between user and kernel modes.

Main features:

  • Small resource requirements. RetroBSD requires only 128 kbytes of RAM to be up and running user applications.
  • Memory protection. Kernel memory is fully protected from user application using hardware mechanisms.
  • Open functionality. Usually, user application is fixed in Flash memory – but in case of RetroBSD, any number of applications could be placed into SD card, and run as required.
  • Real multitasking. Standard POSIX API is implemented (fork, exec, wait4 etc).
  • Development system on-board. It is possible to have C compiler in the system, and to recompile the user application (or the whole operating system) when needed.

DEMOS on the PDP-11 in SIMH

DEMOS 3 on SIMH's PDP-11 / on Windows 95 Russian

While looking around again for more DEMOS stuff (not to be confused with ‘demo’ argh!) I found Serge Vakulenko’s ready to run DEMOS 3.0 for the PDP-11/SIMH package! And I think this is the corresponding source code. More information can be found on what I think is Serge’s blog.

Now on to running it.

The good news is that I only needed msvcrt.dll from Visual C++ 4.0 to get it to run under Windows 95.. The ‘bad’ news well for me is that I couldn’t think of a good telnet to do Cyrillic/KOI8-R properly. I’ll admit it’s probably me not knowing how to do it correctly. At the same time, I figured the ‘easy’ way out is to just install some Russian version of Windows. Naturally there is the ‘dual keyboard’ layout thing in Windows, which if you can’t read the default language… well. it’s too intimidating. But with enough mousing around I pulled the Russian keyboard out and it seems to operate fine.

There is of course some information here, but the mechanical translation is rought.. The wiki page still talks of 68020 and VAX ports of Demos (among others) I wonder if they’ll ever surface?

Demos Team in Moscow

The DEMOS team.

I’ve even found comprehensive documentation for both Демос and Xenix of all things here.

And to round things off, here is a mechanical translation (thanks google!) of the readme….

1. SETTING THE OPERATING SYSTEM DEMOS
====================================

This section describes the procedures to be you-
satisfied, as when you first install the system, and in the case
“Complete destruction” of the root file system or replacement
hard disk is described by the root file system and non-
which directories.

The process of preparing the system for operation can be separated by
pour into the following stages:
– The primary installation (or recovery) system
distribution set to floppy disks (FDD);
– Loading system and checking its integrity;
– Set up the system files.
If “partial destruction of the” filesystems recom-
is to try to restore the integrity of the program fsck
(See Annex 2).

1.1. Initial installation of the system
===========================
For the initial installation of the system must:
– Tumbler “NETWORK” to include personal computers;
– Insert a floppy disk with the number 0 (the starting disk) in the
top device (null);
– Received an invitation to “@”, press (b), and then
in response to an invitation, “$” (dollar) to introduce “MY0” (or “MY” and
press (VC));
– After a while the screen will receive invitations
of “BOOT :…”; in response to it, you must press
(VC);
– The query “installing DEMOS requires erasing infor-
tion on the hard disk … “to answer” Y “(YES) and on-
press key (VC); cancel mistyped character (up to
pressing (VC)) may be using the (BZ);
– On request “Enter the time …” necessary to introduce 10
digits and press (VC); time is given as follows-
Thus:
ggmmddchchmm,
where he – the last two digits of the year (eg, 90);
mm – month number (from 01 to 12);
dd – day of the month;
hh – hour (00 to 23);
mm – minute (00 to 59);
– The query “capacity hard disk drive …”
must enter the number – the number of drive type and press
key (VC); type of drive is defined as follows:

1. 5 MB 153 cylinder / 0-152 / – Set Database RUBIN impossible
2. 10 MB 306 Cylinders / 0-305 / – Set the database RUBIN impossible
3. 10 MB 306 Cylinders / 0-305 / – Set the database RUBIN possible
4. 20 MB 612 Cylinders / 0-611 / – Set the database RUBIN possible

– More on request “format the hard drive?” necessary-
necessary to introduce a “Y”, if you want to reformat the drive or
enter “N”, if not required;
– After loading the mini systems on the hard drive would you-
given a message to her perevyzova from this disc;
after a while you will be prompted “@”;
– In response to this invitation must type “B”, and
then, in response to an invitation, “$” (dollar) to introduce “DW0” (or
“DW” and press (VC));
– After a while the screen will receive invitations
of “BOOT :…”; in response to it, you must press
(VC);
– After the system is triggered, it will ask for a floppy disk from the N1
basic set, it must be inserted into any drive
on floppy disks, enter the number of drive and press
key (VC);
– After reading the floppy disk system will ask the following;
necessary to remove the floppy disk with the number 1 from the drive
and insert a floppy disk with the number 2, then number 3 and
so on;
– After the floppy will be read by all base
set, the system will automatically reboot and check the File
lovuyu system on your hard drive (this can happen
Re-Boot);
– After rebooting the system will prompt “Name:”;
enter the name of the root user to perform
administrative functions in the DEMOS.

If you are logged on for the first time after the initially-
initial installation or complete restoration, it is necessary-
necessary to do the following:
– Set a password for the root user command
passwd;
– Duplicate the distribution set GMD.

To copy a floppy disk you can use cpfd
(See 4.6.2).
Before turning off the PC user must perform
command:
/ Etc / reboot-h (sure!)

Diskette distribution set should be pasted
markers of protection record. This is to ensure that due
equipment malfunction or careless use is not
destroy information on floppy disks.
During the boot from the floppy disk with the number 0, it
should be without a marker.

1.2. Download and check the integrity of the system
=======================================
To load the operating system must DEMOS:
– Turn the power on the PC;
– Received an invitation to “@”, press (b), and then
in response to an invitation, “$” (dollar) to introduce “DW0” (or “DW” and
press (VC));
– After a while the screen will receive invitations
of “BOOT :…”; in response to it, you must press
(VC);
– On request “Enter the time …” necessary to introduce 10
digits and press (VC);
– Further to the request “Check for file system?” need-
Dimo press (VC) (if you want to check file
system), or enter “N” and press (VC) (if not the friction
buetsya check file system);
– After checking the file systems will receive invitations
of “Name:”, enter the name under which the user
registered in the system after its processing realized
login.

Example Remark and e. When checking file systems
may happen to re-reboot.

If the answer to the query “Name:” enter “user”, a Loss-
zoydet login PRACTICE (system description PRACTICE
See Section 3 “Guidebook”).

After completion of the work in the system, on invitation of the
solution to enter commands to type “/ etc / reboot-h”; after
how the system responds “SYNCING DISKS … DONE”, can be switched off-
chit powered PC.

2. ADVANCED FEATURES DEMOS OS Version 3.0
===========================================
1.
Generating core demos contains the following items change
towards increased efficiency and optimality of the kernel:

a). A new, fastest, and very bright
in the hard disk drive such as “Winchester”, re-
presses of the program is configured rwset.

b). Adjusted and optimized driver floppy
disc.

c). A new superuniversalny printer driver
supporting the work of printers such as:
EPSON FX-800, EPSON LX-800, SM 6302, DZM-180, SM 6315,
SM 6900, ROBOTRON SM 6329, D100, D100M, etc.
full ob_eme their functionality
and taking into account the errors in the ROM EPSON FX-800. Modes of Operation
driver software is configured lpset.
For details, see READ_LP file in the root directory.

d). This version of the kernel supports the controller KTSGD
as with ROM KR18101RE2-181 on the board KTSGD and with ROM
KR18101RE2-182, operating in 8-bit character mode.
(Note that the kernel version 2.0 is not capable of work-
a thief with KTSGD on ROM KR18101RE2-182). However, the supplied
graphic protocol / etc / graf, is loaded into RAM KTSGD
and designed for ROM KR18101RE2-181 will not be over-
gruzhatsya in ROM KR18101RE2-182. Currently,
developed a new graphics protocol
latest ROM.

In order to save memory parameters changed
The kernel configuration:

e). Number of I / O buffer.

f). Number of processes in the system.

g). Number of concurrently executable programs.

h). Number of file descriptors.

i). Number of simultaneously open files.

j). “Trapped” statistics on I / O buffer, the sub-
pumping at boot time, for the teams.

k). Reduced the number of overlay core demos.

l). And other stuff …

2.
Fix bug in the loader boot, which allowed
work on different types of hard drives.

3.
Fix bug in intermediate loaders
rwuboot, fduboot.

4.
The new version 4.1 of multiscreen editor red
contains the following changes and additions:

a). (PF1) (i) (VC) set / reset insert mode.

b). (PF1) (b) (VC) set the 132 characters on the screen.

c). (PF1) (l) (VC) set the 80 characters on the screen.

d). (PF1) (g) (VC) set the drawing symbols
pseudographics. Press the (F4) (F5), (F6) (F8)
You can “draw” and “erase” vertical and horizontal
tal solid lines.

e). (PF1) (^ 0) set / reset mode drawing / erasing pseudographics.

f). (PF1) (n) (VC) Exit from the pseudo-graphic.

g). (F1) move the cursor on the word forward.

h). (PF4) move the cursor to end of line.

i). (F5) delete word to the right of the cursor.

j). (PF1) (2) (right arrow) move the cursor
in the right extreme position of the current window.

k). (PF1) (2) (left arrow) move the cursor
in the leftmost position of the current window.

l). (PF1) (2) (up arrow) move the cursor
the upper extreme position of the current window.

m). (PF1) (2) (Down Arrow) move the cursor
the lower extreme position of the current window.

n). (PF1) (octal) (2) (^ 0) input specials. characters
where the number has three digits.

o). Optimized output to the screen with
use shortcuts (F7) (PF1) (F7), (2) (F7) (PF1) (2) (F7)

p). Undo the (FI), as the tab back

5.
Corrected program graf (file etc / graf).
Graphics protocol can now be downloaded as
in compatibility mode (VT52), and in the extended
pulsed mode (VT100) displeya.V file etc / termcap include
Chen esc-sequence installation of roll band from 2
at 22 lines screen, which improves the visibility of pa-
Editor’s red boots, and other minor changes.

6.
Make a convenient initial installation of OS DEMOS on your hard drive
(See above point 1), taking into account their different types and database RUBIN.

7.
Minor changes to the index.html file etc / rc
(Associated with the programs of fsck, mount).

8.
Graphics library libgraph.a is
directory usr / lib and a functional analogue of graphite
cally Library Company “Borland International”. The file
READ_GRAF describes the graphics functions.

* * * * *

9.
Opint program determines the optimal interleaving of sec-
tori, surfaces, cylinders and formats vinchester.Kontrol-
Noe testing after formatting the hard drive with an optimal
interleaving shows that the efficiency of working with hard drive
increased on average by 25-30%. opint program should be run
from floppy disks (the OS is loaded at the same time as floppy disks of numbers under-
rum 0). opint program has the following items keys:

Usage: opint {-i [N] |-f [-q] [-bN] [-lN] [-sN] [-cN]} [-r]

-I [N] to calculate the optimal interleaving factor of
Sector / surfaces / and the cylinders. N-number
working cylinder, the cylinder is also used N-1
(Default N == 152)

-F format the hard drive

-R does not store information on your hard drive (in the informal
matted hard drive, this key is mandatory!)

-Q no questions asked

-BN set the start formatting with the N-cylinder
inclusive (the default cylinder N == 0);
this cylinder (and previous) is used in
as working to find the optimal Interlachen
Ving by a key-b0, or any absence
exists at all, then the worker becomes a 152 cylinder.

-LN set end of formatting to N-cylinder
inclusive (default to the cylinder N == 152)

-SN set interleaving factor N by sektoram/po-
surfaces, (default N == best)

-CN set interleaving factor N in the cylinders
(Default N == best)

10.
Rwset program is used to adjust operating modes
hard disk drive and has the keys:

Usage: rwset [-cN] [[-] w]
-CN – enable precompensation to the N-cylinder
w – include checking account
-W – disable checking account

11.
Lpset program is used to adjust operating modes
printer driver. All inforamatsiya Printing
contained in a file READ_LP.

* * * * * * *

3. OPERATING SYSTEM DEMOS/306
==============================

DEMOS/306 operating system designed for installation and
operation on a single hard disk drive (“HDD”, 20MB) with
operating system RT-11. Hard disk capacity of 20MB
between the two operating systems is as follows:

RT-11: from 0 to 305 cylinder (10Mb)
DEMOS: from 306 to 611 cylinders (10Mb)

Initially (power-on) are loaded OS RT-11,
and hard disk drive must be configured to work with
10 MB free disk space (the cylinder to 305 inclusive).
After downloading the RT-11 operating system called DEMOS/306 team DEMOS.

Initial OS installation DEMOS/306 from installing OS DEMOS different
only a single boot floppy N0; the other five disks
distribution N1-N5 are identical for both operating systems.

User tired of two-wheeled scooter RT-11
pressing five keys is transplanted into a strategic
Bomber DEMOS/306!

OS DEMOS/306 – THIS IS A BREAKTHROUGH IN THE FUTURE!
OS DEMOS/306 – just fantastic!

POSTCRYPTUM 1.
————– The directory / TEST contains kontolno-demonstration
tional tasks and tests that are run co-
executing / TEST / main.

POSTCRYPTUM 2.
————– In the supplied distribution into a directory bin /,
usr / bin /, etc / contains utilities and files
(In particular:

c7t10 nroff autoconfig termcap
chgrp pp clri timstat
chown pstat cron ttys
dump restor dostat utpm
dumpdir rline getty wall
edit rmail graf
egrep setcolor group
false smbl group.std
fgrep startcode init
gets starttext iostat
login su lp_daemon
lpf tfd0 mknod
lpset wermit psdatabase
lx accton savecore
mix admclean shutdown

and others …), which are not descriptions of documents
orientation, because description on the tools and files that need-
dimye system administrator or system programming
Misty and not directly related to the work of Paul
transducer outside the scope of this documentation, I have-
ing goal is to give the most relevant information for the user-
converter. Descriptions can be found in various literature
on UNIX operating systems as Most utilities and service
Files are generally accepted in the family of UNIX names.
On the other hand, not all utilities (in particular:

ardos from mkmf splineg
banner hier mm strings
blank hostname prmail sum
checkobj ident rab unifdef
ckdir indent rcs units
colcrt install rcsdiff uptime
ctags last rcsintro uucpc
cxref lastcomm rcsmerge uuxc
ddutok lex rev whoami
error lint rlog badsect
expand look script ncheck
fold merge spell

and others … ) Described in the documentation contained
in the distribution, because documents constitutes a
taking into account further developments.

POSTCRYPTUM 3.
————– The distribution is not included and are available
otdelno:

a). DBMS “RUBIN”. / With complete documentation /

b). Integrated envelope “Demos Commander” –
analogue of the “Norton Commander”.

POSTCRYPTUM 4.
————– On a version 3.0 OS DEMOS worked:

Yudin, KE
Sudakov AV
Ryzhonkov KS
Bragin, DN

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
Copyright 1991 by Research Institute “Scientific Centre”,
lab 462 / 2. All rights reserved.

PHONE: 536-56-42.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
Moscow, Zelenograd, Research Science Center (lab.462 / 2)

Phone: 536-56-42.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~

2.11 BSD

Well over on the HECNet mailing list, there has been quite a bit of excitement over the opencores project, that is a PDP11/70 system on a chip.

It’ll run on two FPGA eval boards, and can even boot up 2.11 BSD!

So I figured I’d get into some of the spirit, and see how far I could get with SIMH. Following the great instructions on vak.ru to get a 2.11 BSD tape installed into SIMH. I then spent some time trying to work out a working Ethernet configuration to at least be able to telnet into the VM… It seems the de driver under the PDP-11 suffers the same problem the VAX 11/780 had regarding something being flagged somewhere with errors. I didn’t ‘fix’ the simulator I took the shortcut, and fixed the driver to ignore all errors on the interface, and now I can telnet into it!

I’ve also modified the boot program, and init to auto-boot the kernel, and bring the system up into multi-user automatically.

So I just slapped together a zip file, and placed it on my sourceforge page here for downloading. I didn’t do an installer program this time, as I wanted to build some programs to make it more fun, but it seems that the PDP-11 is limited to 64k data/ 64k instructions for executables, so although I’ve compiled ircII, it will not link. I can verify that you can telnet into the VM (localhost 42323), and the pdp11 executable I’ve enclosed includes my SLiRP patches.

And.. it runs Zork!

I guess for the more adventitious, you could extract out the rest of the source, and apply the some 400+ patches to 2.11 BSD and have a current system. But if anyone knows how to build something like IRC on 2.11 BSD give me a shout.

Oh, and much to my surprise, this version includes zork, and it’s the same RT-11/LSI-11 binary that the VAX loaded up in some RT-11 syscall emulator.

More FORTRAN/PDP11/Dungeon/Zork fun

Thanks to the countless comments on the SIMH list, and the final missing step from Peter Schorn One of the source copies of Dungeon now builds.

If you want to follow along, you’ll need the pdp11 emulator from SIMH, and the following disk images (local mirror):

Then create an ini file like this:

set cpu 256k
set rq0 rx50
set rq1 rx50
set rq2 rx50
set rq3 rx50

att rk0 rtv4_rk.dsk
att rk1 dunsrc.dsk

boot rk0

Then go ahead and run it:

PDP-11 simulator V3.8-1
Disabling CR

RT-11SJ V04.00C

.D 56=5015

.TYPE V4USER.TXT
Welcome to RT-11 Version 4. RT-11 V04 provides new hardware support
and some major enhancements over Version 3B.

Please use the HELP command; it describes the new options in many
of the utilities.

If you are using a terminal that requires fill characters,
modify location 56 with a Deposit command before proceeding with
system installation. LA36 DECwriter II and VT52 DECscope terminals
do NOT require such modification.

.D 56=0

.

Hit Control+E and “insert” the first Fortran disk

Simulation stopped, PC: 156070 (MOV (SP)+,R2)
sim> att rx0 fortran-iv-v021-compiler-files.img
RX: buffering file in memory
sim> c

Then we are going to do the following:

.ASSIGN RK0: OUP

.ASSIGN DX0 INP

.R PIP
*SY:*.*=INP:FORTRA.HLP,DEMO.FOR
*^C

.RUN INP:FORGEN
Answer questions with:
“?” or carriage return (<CR>) for information,
YES(Y) for affirmation, anything else for NO.

A maximum of 56 lines are allowed per listing page.
Is this acceptable? Y
A maximum of 136 characters are allowed in a formatted
(ASCII) record. Is this acceptable? Y
A maximum of 6 channels may be open at a given time.
Is this acceptable? Y
The FORTRAN compiler can compile system-specific OPEN and CLOSE
statement keywords for RT-11, RSX-11, and RSTS/E systems. These
statements are currently compiled for the following system: RT-11
Is this acceptable? Y
FORTRAN can produce inline code for EAE, EIS or FIS hardware,
or it can produce threaded (THR) code which is hardware independent.
Should the compiler produce EAE code? N
Should the compiler produce EIS code? N
Should the compiler produce FIS code? N
Should the compiler produce THR code? Y
The inline compiler can optimize for SPEED or for SIZE. These
optimizations are mutually exclusive. Do you want
the optimization to be for SPEED? N
Do you wish a threaded only compiler? Y
Compiler options selection complete.

.@INP:F4LTHR

.R LINK
*OUP:FORTRA=INP:FROOT///S
*INP:F0,INLINE,OUP:DEFLTS/O:1
*INP:F1/O:1
*INP:F2/O:1
*INP:F3/O:1
*INP:F4/O:1
*INP:F5/O:1
*INP:F6/O:1
*INP:F7/O:1
*INP:F8/O:1
*INP:F9/O:1
*INP:F10/O:1
*INP:LOOP/O:1
*INP:F11/O:1
*INP:F12/O:1
*INP:F13/O:1
*INP:F14/O:1
*INP:F15/O:1
*INP:F16/O:1
*INP:F17/O:1
*INP:CDUMP/O:1//
*^C

.

Ok, now the compiler should be created. We next need to interrupt the emulator again (control+e) and insert the objecttime diskette. We will now build our Fortran library.

Simulation stopped, PC: 151412 (ASL R3)
sim> att rx0 fortran-iv-v021-objecttime-system.img
RX: writing buffer to file
RX: buffering file in memory
sim> c


.R LIBR

*OUP:FORLIB=INP:NHD,OTSCOM,NOVIR,V2NS/G
Global? $ERRS
Global? $ERRTB
Global? $VRINT
Global?
*^C

Now with that out of the way, we build a test program to make sure our compiler & library are working.

.COMPILE DEMO.FOR
.MAIN.

.LINK DEMO,FORLIB

.RUN DEMO
***** RT11 FORTRAN IV V2 DEMONSTRATION TEST *****

INSTALLATION SUCCESSFUL IF NO ERROR MESSAGES
WERE PRINTED ABOVE.

**** FORTRAN DEMONSTRATION TEST COMPLETE *****

Ok everything looks fine! Now onward to Dungeon! First we copy everything to the RK0 disk…

.COPY RK1:*.* *.*
Files copied:
RK1:ACTORS.FTN to DK:ACTORS.FTN
RK1:CLOCKR.FTN to DK:CLOCKR.FTN
RK1:DEMONS.FTN to DK:DEMONS.FTN
RK1:DGAME.FTN to DK:DGAME.FTN
RK1:DINIT.FTN to DK:DINIT.FTN
RK1:DMAIN.FTN to DK:DMAIN.FTN
RK1:DSUB.FTN to DK:DSUB.FTN
RK1:DUNGEO.DOC to DK:DUNGEO.DOC
RK1:DVERB1.FTN to DK:DVERB1.FTN
RK1:DVERB2.FTN to DK:DVERB2.FTN
RK1:GDT.FTN to DK:GDT.FTN
RK1:OBJCTS.FTN to DK:OBJCTS.FTN
RK1:RRND.MAC to DK:RRND.MAC
RK1:RSXTIM.MAC to DK:RSXTIM.MAC
RK1:SVERBS.FTN to DK:SVERBS.FTN
RK1:VERBS.FTN to DK:VERBS.FTN
RK1:VMSRND.MAC to DK:VMSRND.MAC
RK1:BALLOP.FOR to DK:BALLOP.FOR
RK1:DINDX.DAT to DK:DINDX.DAT
RK1:DSO1.FOR to DK:DSO1.FOR
RK1:DSO2.FOR to DK:DSO2.FOR
RK1:DSO3.FOR to DK:DSO3.FOR
RK1:DSO4.FOR to DK:DSO4.FOR
RK1:DSO5.FOR to DK:DSO5.FOR
RK1:DSO6.FOR to DK:DSO6.FOR
RK1:DSO7.FOR to DK:DSO7.FOR
RK1:LIGHTP.FOR to DK:LIGHTP.FOR
RK1:NOBJS.FOR to DK:NOBJS.FOR
RK1:NP.FOR to DK:NP.FOR
RK1:NP1.FOR to DK:NP1.FOR
RK1:NP2.FOR to DK:NP2.FOR
RK1:NP3.FOR to DK:NP3.FOR
RK1:NROOMS.FOR to DK:NROOMS.FOR
RK1:ROOMS.FOR to DK:ROOMS.FOR
RK1:RTTIM.FOR to DK:RTTIM.FOR
RK1:SOBJS.FOR to DK:SOBJS.FOR
RK1:VILLNS.FOR to DK:VILLNS.FOR
RK1:VMSTIM.FOR to DK:VMSTIM.FOR
RK1:D.ODL to DK:D.ODL
RK1:DTEXT.DAT to DK:DTEXT.DAT
RK1:RSTSCB.CTL to DK:RSTSCB.CTL
RK1:RSXBLD.CMD to DK:RSXBLD.CMD
RK1:RSXCMP.CMD to DK:RSXCMP.CMD
RK1:RTBLD.COM to DK:RTBLD.COM
RK1:RTCMP.COM to DK:RTCMP.COM
RK1:VMSBLD.COM to DK:VMSBLD.COM
RK1:VMSCMP.COM to DK:VMSCMP.COM

Then we need to make some space…

.DELETE *.DAT
Files deleted:
DK:DINDX.DAT ? Y
DK:DTEXT.DAT ? Y

Now we can compile the fortran

.@RTCMP

.COM/NOLINE DMAIN.FTN,DGAME.FTN,DSUB.FTN
DUNGEO
GAME
XENDMV
XVEHIC
RSPEAK
RSPSUB
RSPSB2
OBJACT
BUG
NEWSTA
QHERE
QEMPTY
JIGSUP
?FORTRAN-I-[JIGSUP] Errors: 0, Warnings: 4
OACTOR
PROB
RMDESC
RAPPLI

.COM/NOLINE DINIT.FTN
INIT
PROTCT

.COM/NOLINE NP,NP1,NP2,NP3
RDLINE
PARSE
ORPHAN
LEX
SPARSE
?FORTRAN-I-[SPARSE] Errors: 0, Warnings: 1
GETOBJ
?FORTRAN-I-[GETOBJ] Errors: 0, Warnings: 1
SCHLST
?FORTRAN-I-[SCHLST] Errors: 0, Warnings: 2
THISIT
SYNMCH
UNPACK
SYNEQL
TAKEIT
GWIM

.COM/NOLINE/NOVEC GDT.FTN
GDT

.COM/NOLINE VERBS.FTN,OBJCTS.FTN
VAPPLI
?FORTRAN-I-[VAPPLI] Errors: 0, Warnings: 1
CLOCKD
OAPPLI

.COM/NOLINE SVERBS.FTN,DVERB1.FTN,DVERB2.FTN,ACTORS.FTN,DEMONS.FTN,CLOCKR.FTN
SVERBS
TAKE
DROP
PUT
VALUAC
SAVEGM
RSTRGM
WALK
CXAPPL
AAPPLI
THIEFD
?FORTRAN-I-[THIEFD] Errors: 0, Warnings: 3
FIGHTD
BLOW
SWORDD
?FORTRAN-I-[SWORDD] Errors: 0, Warnings: 1
INFEST
CEVAPP
?FORTRAN-I-[CEVAPP] Errors: 0, Warnings: 4
LITINT

.COM/NOLINE ROOMS.FOR,NROOMS.FOR
RAPPL1
?FORTRAN-I-[RAPPL1] Errors: 0, Warnings: 2
RAPPL2
?FORTRAN-I-[RAPPL2] Errors: 0, Warnings: 1
LOOKTO
EWTELL

.COM/NOLINE SOBJS.FOR,NOBJS.FOR,BALLOP.FOR,LIGHTP.FOR,VILLNS.FOR
SOBJS
?FORTRAN-I-[SOBJS ] Errors: 0, Warnings: 1
NOBJS
?FORTRAN-I-[NOBJS ] Errors: 0, Warnings: 2
MIRPAN
BALLOP
LIGHTP
TROLLP
CYCLOP
THIEFP
?FORTRAN-I-[THIEFP] Errors: 0, Warnings: 2

.COM/NOLINE DSO1.FOR,DSO2.FOR,DSO3.FOR,DSO4.FOR,DSO5.FOR,DSO6.FOR,DSO7.FOR
PRINCR
?FORTRAN-I-[PRINCR] Errors: 0, Warnings: 2
INVENT
?FORTRAN-I-[INVENT] Errors: 0, Warnings: 1
PRINCO
MOVETO
SCORE
SCRUPD
FINDXT
FWIM
YESNO
ROBADV
?FORTRAN-I-[ROBADV] Errors: 0, Warnings: 1
ROBRM
?FORTRAN-I-[ROBRM ] Errors: 0, Warnings: 1
WINNIN
FIGHTS
VILSTR
GTTIME
OPNCLS
LIT
?FORTRAN-I-[LIT ] Errors: 0, Warnings: 1
WEIGHT
?FORTRAN-I-[WEIGHT] Errors: 0, Warnings: 1
GHERE
MRHERE
ENCRYP
CPGOTO
?FORTRAN-I-[CPGOTO] Errors: 0, Warnings: 1
CPINFO

.COM/NOLINE RTTIM.FOR
ITIME

.COM RRND.MAC
ERRORS DETECTED: 0

So far so good. Now we can delete the source from our primary disk, take note that we don’t delete the demo program:

.DELETE *.FOR
Files deleted:
DK:DEMO.FOR ? N
DK:BALLOP.FOR ? Y
DK:RTTIM.FOR ? Y
DK:VMSTIM.FOR ? Y
DK:DEMOF1.FOR ? Y
DK:DSO3.FOR ? Y
DK:TEST55.FOR ? Y
DK:GETSTR.FOR ? Y
DK:PUTSTR.FOR ? Y
DK:DSO1.FOR ? Y
DK:DSO2.FOR ? Y
DK:DSO4.FOR ? Y
DK:DSO5.FOR ? Y
DK:DSO6.FOR ? Y
DK:DSO7.FOR ? Y
DK:LIGHTP.FOR ? Y
DK:NOBJS.FOR ? Y
DK:NP.FOR ? Y
DK:NP1.FOR ? Y
DK:NP2.FOR ? Y
DK:NP3.FOR ? Y
DK:NROOMS.FOR ? Y
DK:ROOMS.FOR ? Y
DK:SOBJS.FOR ? Y
DK:VILLNS.FOR ? Y

Next we need to remove the ftn files:

.DEL *.FTN
Files deleted:
DK:ACTORS.FTN ? Y
DK:CLOCKR.FTN ? Y
DK:DEMONS.FTN ? Y
DK:DGAME.FTN ? Y
DK:DINIT.FTN ? Y
DK:DMAIN.FTN ? Y
DK:DSUB.FTN ? Y
DK:DVERB1.FTN ? Y
DK:DVERB2.FTN ? Y
DK:GDT.FTN ? Y
DK:OBJCTS.FTN ? Y
DK:SVERBS.FTN ? Y
DK:VERBS.FTN ? Y

Now we are going to link our executable dungeo.sav . However the default link procedures will not work for us, it’s just easier to paste this entire thing into the console.

.LINK/INCLU/PRO/MAP:NL:/BOT:1200/EXE:DUNGEO DMAIN,DGAME,DSUB,RRND,RTTIM
*DINIT,GDT/O:1
*NP,NP1,NP2,NP3/O:1
*VERBS,OBJCTS/O:1
*SVERBS/O:2
*DVERB1/O:2
*DVERB2/O:2
*ACTORS/O:2
*DEMONS/O:2
*CLOCKR/O:2
*ROOMS/O:3
*NROOMS/O:3
*SOBJS/O:3
*NOBJS/O:3
*BALLOP,LIGHTP,VILLNS/O:3
*DSO1/O:4
*DSO2/O:4
*DSO3/O:4
*DSO4/O:4
*DSO5/O:4
*DSO6/O:4
*DSO7/O:4
*SY:FORLIB//
Library search? $SHORT
Library search?

Now we don’t need the object files anymore they can be deleted. However we are NOT going to delete the system objects so this isn’t a wholesale deletion.

.DEL *.OBJ
Files deleted:
DK:SYSLIB.OBJ ? N
DK:ODT.OBJ ? N
DK:VDT.OBJ ? N
DK:VTHDLR.OBJ ? N
DK:PLOT55.OBJ ? N
DK:DEFLTS.OBJ ? N
DK:FORLIB.OBJ ? N
DK:DEMO.OBJ ? Y
DK:DMAIN.OBJ ? Y
DK:DGAME.OBJ ? Y
DK:DSUB.OBJ ? Y
DK:DINIT.OBJ ? Y
DK:NP.OBJ ? Y
DK:NP1.OBJ ? Y
DK:NP2.OBJ ? Y
DK:NP3.OBJ ? Y
DK:GDT.OBJ ? Y
DK:VERBS.OBJ ? Y
DK:OBJCTS.OBJ ? Y
DK:SVERBS.OBJ ? Y
DK:DVERB1.OBJ ? Y
DK:DVERB2.OBJ ? Y
DK:ACTORS.OBJ ? Y
DK:DEMONS.OBJ ? Y
DK:CLOCKR.OBJ ? Y
DK:ROOMS.OBJ ? Y
DK:NROOMS.OBJ ? Y
DK:SOBJS.OBJ ? Y
DK:NOBJS.OBJ ? Y
DK:BALLOP.OBJ ? Y
DK:LIGHTP.OBJ ? Y
DK:VILLNS.OBJ ? Y
DK:DSO1.OBJ ? Y
DK:DSO2.OBJ ? Y
DK:DSO3.OBJ ? Y
DK:DSO4.OBJ ? Y
DK:DSO5.OBJ ? Y
DK:DSO6.OBJ ? Y
DK:DSO7.OBJ ? Y
DK:RTTIM.OBJ ? Y
DK:RRND.OBJ ? Y

Now with enough disk space free’d we can copy back the database files needed

.COPY RK1:*.DAT *.*
Files copied:
RK1:DINDX.DAT to DK:DINDX.DAT
RK1:DTEXT.DAT to DK:DTEXT.DAT

And now we can run dungeon!

.R DUNGEO
Welcome to Dungeon. This version created 18-JUL-80.
You are in an open field west of a big white house with a boarded
front door.
There is a small mailbox here.
>HISTORY
Revision history:

18-JUL-80 Transportable data base file (V2.5A).
28-FEB-80 Compressed text file (V2.4A).
15-NOV-79 Bug fixes (V2.3A).
18-JAN-79 Revised DECUS version (V2.2A).
10-OCT-78 Puzzle Room (V2.1A).
10-SEP-78 Endgame (V2.0A).
10-AUG-78 DECUS version (V1.1B).
14-JUN-78 Public version with parser (V1.1A).
4-MAR-78 Debugging version (V1.0A).
>QUIT
Your score would be 0 [total of 585 points], in 2 moves.
This gives you the rank of Beginner.
Do you wish to leave the game?
Y

.

You can always hit control+e to exit SIMH.

Well there you have it, the Fortran installation, compilation, linking & execution of the oldest source version I can find at the moment of Dungeon/Zork. Who knows, maybe someday this may help someone revive other old programs.

Fun links

Well today it’s raining, and I was trying to get my Verizon DSL working… To no avail, they just keep closing tickets saying it works fine, but my modem just blinks… No connection.

Apparently terminating an analog port is beyond them. I’ll have to cancel the thing on Monday as it’s become a complete waste of time.

Anyways I came across this link, of an incredible PDP-11 collection. This guys got quite a set, and even snuck an 11/750 in there. Sadly he’s running VMS on it… Anyways it’s a great source for some pictures!

And this one is not exactly safe for work, so here is the NSFW tag.. lol but anyways this guy seems to be having way too much fun with his PDP-11.

On that note, I got BOCHS to compile, now I just need to rip apart it’s ethernet code and see if I can inject some SLiRP into it…

Unix v7 for the x86!

Ok so this isn’t exactly emulation, since you can already run Unix v7 via simh’s PDP11 emulator, however you cannot overlook the coolness factor of this. They have ported v7 to the i486 cpu.

http://www.nordier.com/v7x86/index.html

In other news I’ve done a very preliminary port of the SLiRP stack from Qemu to SIMH. What is cool about this, is that it allows user mode networking so that you do not have to configure any drivers on the host. Currently I have 4.3BSD-Reno running under the MicroVAX II simulator. I’m going to add some extra utilities (gzip/gcc/gnumake/ircii-4/lynx?/wget?/apache?), convert the SMM into PDF’s, and make it into an install package, much like the 4.2BSD on sourceforge.

If anyone want’s to alpha test it, let me know, otherwise the next post will most likely be the release of 4.3BSD-RENO with NAT!

Happy Thanksgiving!