TRS-Xenix v01.03.05 Exploration: Difference between revisions

From Toxi's Wiki
Jump to navigationJump to search
Seal331 (talk | contribs)
mNo edit summary
Seal331 (talk | contribs)
m oops formatting
Line 43: Line 43:
In order to install software, you need to use the "install" command. Let's install the update from Disk 4 using this method. You can also install other Xenix software from the model2archive but make sure to read the README, some may be incompatible due to being for the Model 6000 running XENIX 3.x.
In order to install software, you need to use the "install" command. Let's install the update from Disk 4 using this method. You can also install other Xenix software from the model2archive but make sure to read the README, some may be incompatible due to being for the Model 6000 running XENIX 3.x.


1. Log in as root
1. Log in as root <br>
2. Type "install"
2. Type "install" <br>
3. Press 1
3. Press 1 <br>
4. Press Enter
4. Press Enter <br>


And we're done! This particular program wants us to reboot, so eject the floppy and restart the emulator.
And we're done! This particular program wants us to reboot, so eject the floppy and restart the emulator.

Revision as of 20:02, 1 April 2023

Obtaining Install Media

A really nice collection of TRS-80 stuff is available here. There's a fair bit of both non-Xenix and Xenix stuff, but for now we only need the Xenix stuff. What we need are all the IMDs (except XNX135FM.IMD) from here.

Setting up our VM

This version of Xenix is for TRS-80 model 16 computers only, thankfully I know an emulator that can run this. Let's set it up by downloading trs80gp.

At first, let's create a hard disk image by simply opening up trs80gp, going to the "Hard Drive" menu and clicking the "unformatted DREM" option in the 4: submenu.

Now, open up the command prompt as in order to run TRS-Xenix 1.x you need a special command line argument which you can't configure in the GUI. I use this command to run trs80gp provided the DREM config file autogenerated with the DREM disk image is stored as "xenix.cfg" and the Xenix install disk is XNX135D1.IMD:

trs80gp.exe -m16 -d0 XNX135D1.IMD -h xenix.cfg -x1hack

Setting up minimal Xenix

It's Xenix time!

The emulator startup command already inserts the boot floppy into the drive. Once you're starting up the emulator, it will attempt to boot from the blank hard drive which will leave you with a garbled screen. In order to boot off the floppy, during startup spam Ctrl+C in the emulator window. Once you're in the bootloader prompt, type "diskutil". It will ask you if you want to deal with the floppy disk or the hard disk - type "h" for hard disk. The unit number is 0. For the disk information, consult the CFG file created by the emulator for the disk image. For me, it generated 256 tracks, 4 sides and 17 sectors. When you're asked "how many heads", type the amount of sides. Once you've passed the formatting, reset the emulator. It will attempt to boot from the hard drive again and since we don't have anything useful there it'll fill the screen with random bootloader data and gibberish. Boot off the floppy the same way.

FIXME: is this amount of hd space actually enough for xenix & friends?

After that, just press Enter. When you're asked to "change the rootdisk" just press Enter again, that is not needed.

Now, let's actually install Xenix and not just partition the HD. Once you're asked to initialize the hard disk, answer with "y". Yes, your hard disk has been formatted with diskutil. Use the same way of finding how much space you have on the hard drive as when you were formatting the drive. It will format the hard drive and copy some basic utilities onto there. Wait until the "Normal System Shutdown" message and power down the emulator.

Setting up the rest of Xenix

After the boot floppy is done copying files, use the following command for running Xenix from here on:

trs80gp.exe -m16 -d0 - -h xenix.cfg -x1hack

At the bootloader prompt, press Enter. It will automatically load the second stage of installation. When you are asked "First floppy?" insert the second disk via Diskette -> :0 and press y. Do the same with the third floppy. This will install the base system. After that, type n. Once you get the message "installation complete", press Ctrl+D. Feel free to set the time if you want but it's probably not Y2K compatible. Log in as root, it has no password.

Adding a user is simple. Once in the root account, just type 'mkuser' to create a user. Home directories are in the /usr folder. If you created a user by the name 'test', then it would be at /usr/test.

Some Xenix manuals are available at this site. Look through the page for mentions of "xenix".

Installing additional software

In order to install software, you need to use the "install" command. Let's install the update from Disk 4 using this method. You can also install other Xenix software from the model2archive but make sure to read the README, some may be incompatible due to being for the Model 6000 running XENIX 3.x.

1. Log in as root
2. Type "install"
3. Press 1
4. Press Enter

And we're done! This particular program wants us to reboot, so eject the floppy and restart the emulator.

Tandy-specific pseudographical shell

To be written...

Developing software

For Xenix

WIP: this stuff is just copied from tox's ibm xenix 1.00 page as a placeholder
TRS NOTE: there's cobol in the default install? might be worth writing about

Compiling a small C application for Xenix, under Xenix

I created a file named 'hello.c' using the following command:

cat >> hello.c << EOF

This will output the contents of stdin into hello.c until you give it the literal string EOF.

And so, here is the source code of hello.c:

main() {
    printf("hello, world!\n");
}

Now, we compile it using

cc hello.c -o hello

And then, we simply run it! It gives out the message like we would've expected.

There is also like you might've expected, a linker, by the name of ld -- and a lot of other things, too. There is yacc and lex included, and adb. Although, yacc might not be included in the included SDK. You might have to use the specific SDS, which can be found on WinWorld.

Makefile

Interestingly, there is a make implementation in the SDK. For the "hello, world!" application under Xenix, you can write this extremely simple Makefile:

hello: hello.c
    cc hello.c -o hello

and save it as simply 'Makefile'. Oh yeah, by the way, make sure those 4 spaces in front of 'cc hello.c' is actually a tab when you enter it in.

And, for compiling the simple DOS "hello, world!":

all: doshello.exe copy

doshello.exe: doshello.c
    cc doshello.c -dos -o doshello.exe

copy: doshello.c
    doscp doshello.exe /dev/fd0:/doshello.exe

Interesting extra software

WIP