March 10, 2022

Silicon Graphics Multibus "IP2" board -- PALASM

These notes discuss my awkward experiences trying to get PALASM installed within DOSEMU running on my linux machine. This was made difficult by several things, the most unhappy of which was the fact that DOSEMU does not emulate floppy disks in anything resembling a sensible or even proper way.

---------------------------------------

First though, we will try to get PALASM running again. I used to have this in some version on my FreeDOS machine with my prom burner/reader, but that install of PALASM is no longer working.

It is possible to run PALASM on linux under DOSEMU. This would be far nicer that running it on my FreeDOS machine, so I am going to pursue that.

Dosemu

On my Fedora 34 system, I do this:
su
dnf install dosemu
exit
dosemu
Be aware that you use exitemu to exit the dosemu window.

DOSEMU seems to use FreeDOS. I tell it to set up a C: drive as /home/tom/.dosemu/drive_c It complains that it is missing: "z:\command.com /e:1024 /p"

However the second time I start it, there is no problem.

After some experience, I will warn you. DOSemu is pretty miserable software and the documentation is worse. This is a lot like how DOS itself worked, there were all kinds of undocumented tricks and behavior and you had to rely on other people with experience who had gone before you. The DOSemu project has replicated this culture and added their own new share of problems and weird issues.

PALASM

Someone provided a "rar" archive, which I dutifully expanded into a PALASM directory. It would indeed start PALASM, but it complained about a missing config file and I eventually abandoned that approach. (It might have worked if I had set the PALASM variable properly with a trailing slash.)

There are 3 install floppies. Of course nobody has actual floppy drives in this day and age. Here is what I did with my version of dosemu.

cd /home/tom/.dosemu
mkdir palasm
cd palasm
mkdir d1 d2 d2 floppy
cd d1
unzip /path/paldisk1.zip
cd d2
unzip /path/paldisk2.zip
cd d3
unzip /path/paldisk3.zip
cd ..
cp d1/* floppy
cd /home/tom/.dosemu/drives
ln -s /home/tom/.dosemu/palasm/floppy a

After this, dosemu ought to be able to find the first disk as A:. However, it doesn't work out this way. With the symbolic link for a, I get the dreaded error about being unable to find command.com

I try something else:

cd /home/tom/.dosemu/drive_c
mkdir zz
cd zz
Then I do as above and generate d1, d2, d3, and floppy inside of zz. Then I launch dosemu, cd zz/floppy, and type install.
I get an "error reading from drive a:, DOS area: sector not found"

As a side note, whatever you do, don't type "a:" to switch to the floppy drive, this leads to an unrecoverable error loop.

Going back to the issue of adding a link for the a: drive to the "drives: directory. Apparently what dosemu is doing is "finding a floppy in the drive" and trying to boot up from it. This is going to expect some kind of disk image formatted to look like it is a bootable DOS disk.

What about "lredir"? This has a syntax like "lredir a: linux/fs/xyz", though it is not documented or explained what the root of the path is. As always the thing to do is to experiment. The following seems to work:

lredir a: linux\fs/home/tom/.dosemu/palasm/floppy
The prefix "linux/fs" is some undocumented magic that places you at the root of your linux filesystem. I do this within dosemu and then type:
a:install
And I am running the palasm install program. I have to tell it that command.com is on drive z: I type F10 and away it goes. Now it asks for the second disk on drive A: and is waiting with a "type any key to continue" message.

Now, behind the scenes in a linux shell window, I do this:

cd .dosemu/palasm
rm floppy/*
cp d2/* floppy
Then I type return (any key) and it goes ahead.
I repeat this when it asks for disk 3 and now it tells me that PALASM software is correctly installed.

I have ignored various warnings from dosemu that it is unstable now and ought to be rebooted (whatever that is all about). But I do restart dosemu now.

I cannot just type "palasm" and start palasm. I look at the autoexec.bat file and no changes were performed, despite the fact that the palasm install program claimed it was going to do so. I will try to do it by hand using an editor on the linux side. I edit autoexec.bat and add c:\palasm\exe to the path. I also add this line:

set PALASM=c:\palasm\

Note! The trailing slash in the above is essential.

The install mentions changes to config.sys. None were needed in my case. The manual describes this and the only change that might be required would be to make sure FILES is set to at least 35. In my case, it was already set to 40.

It still doesn't work, and indeed, when I look inside the palasm directory there is no palasm.exe. There is a "dat" directory that contains a "setup.pal" file.

Try something else

This is all about trial and error with wretched software. The idea now is to combine all the files from d1, d2, d3 into one big directory. Who is to say what a "floppy" can contain these days?
So, I do this:
cd .dosemu/palasm
mkdir floppy
cp d1/* floppy
cp d2/* floppy
cp d3/* floppy
Then I launch dosemu and do this:
lredir a: linux\fs/home/tom/.dosemu/palasm/floppy
a:install
It does not ask me for disk 2 and 3, it just zooms on to the finish, but it yields the same result as before, i.e. PALASM cannot be started and is not present in the palasm/exe directory.

It is unfortunate that "INSTALL" is an EXE file, so we cannot study or modify (i.e. fix) it.

Look more deeply

Looking at the PALASM directory that the INSTALL program generated, I see an empty directory structure along with a small handful of files, all of which were on Disk 1. None of the files in the ZIP archives are present anywhere!! It is as though PKUNZIP simply did nothing. My guess is that PKUNZIP expected to find the ZIP archives in the current directory, but who knows.

We can use "unzip -l" to look at contents of various ZIP archives. Disks 2 and 3 are nothing but collections of ZIP archives. The name of the ZIP archive is a strong hint of which directory it should be unzipped into.

I ended up creating a Python script to unzip things into the directories I thought they ought to go into.

It runs and does the following:

cd ../drive_c/palasm/dat; unzip /home/tom/.dosemu/palasm/d1/DAT.ZIP
cd ../drive_c/palasm/doc; unzip /home/tom/.dosemu/palasm/d1/DOC.ZIP
cd ../drive_c/palasm/examples; unzip /home/tom/.dosemu/palasm/d1/EXAMPLES.ZIP
cd ../drive_c/palasm/doc/eref; unzip /home/tom/.dosemu/palasm/d1/EREF.ZIP
cd ../drive_c/palasm/doc/iref; unzip /home/tom/.dosemu/palasm/d1/IREF.ZIP
cd ../drive_c/palasm/doc/lref; unzip /home/tom/.dosemu/palasm/d1/LREF.ZIP
cd ../drive_c/palasm/exe; unzip /home/tom/.dosemu/palasm/d2/EXE-1.ZIP
cd ../drive_c/palasm/exe; unzip /home/tom/.dosemu/palasm/d2/EXE-2.ZIP
cd ../drive_c/palasm/exe; unzip /home/tom/.dosemu/palasm/d2/EXE-3.ZIP
cd ../drive_c/palasm/exe; unzip /home/tom/.dosemu/palasm/d2/EXE-4.ZIP
cd ../drive_c/palasm/exe; unzip /home/tom/.dosemu/palasm/d3/EXE-5.ZIP
cd ../drive_c/palasm/exe; unzip /home/tom/.dosemu/palasm/d3/EXE-6.ZIP
cd ../drive_c/palasm/exe; unzip /home/tom/.dosemu/palasm/d3/EXE-7.ZIP
cd ../drive_c/palasm/exe; unzip /home/tom/.dosemu/palasm/d3/EXT-0.ZIP

After getting it going

It needs an editor. I copied vi.exe into c:\local from a DOS system of mine, then edited setup.pal in the palasm/dat directory. Line number 7 is the ticket to change the editor, just put the path to your editor here.
Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]