UniCOMAL on X-windows under Linux


Health warnings
DOS Emulation
Installing UniCOMAL
Conclusions

The magazine "PC Plus", Issue 151, May 1999 comes with two free CDs. One of them contains the single-CD release of Red Hat Linux Version 5.2 for the PC. This makes this issue of the magazine extremely good value a only £4.99, because the second CD contains Linux Kernel 2.2.2, Netscape 4.5 and WordPerfect 8 Personal Edition for Linux as well. There's lots of Windows stuff too, but that doesn't concern us here.

So, having some space on a 200MHz AMD K6-based PC at headquarters, and having long had a notion for Linux but never had the courage to install it, we took the plunge. The magazine says "Linux in 30 minutes", but that's only if you don't muck it up too often. We mucked it up frequently, so it was around 8 hours before we managed to put it all together and get a computer which would boot into Linux or Windows at will.

HEALTH WARNINGS

  • We had to repartition the hard drive on the PC, because all its space was used up by MS-Windows, and we wanted to keep MS-Windows. So we had to reinstall Windows into its new, smaller partition as well as install Linux into its partition.
  • The LILO boot manager, which allows you to choose either Linux or Windows when the PC boots, has to go into the Master Boot Record so that the system can boot properly.
  • Linux, and to a lesser extent X-Windows, are very very different from what MS-Windows users are used to. There's a lot of brain-twisting to be done to get your head around the way Linux works. Be patient!
  • Linux command-line statements are CASE-SENSITIVE. So, for example, dos -k -X has to be typed exactly.
  • DOS Emulation

    Along with the Red Hat distribution of Linux comes XFree86, a good version of X-windows, and, tucked away in a corner of the CD, a freeware DOS emulator called DOSEMU, version 0.98.1.0. We proceeded to try to make a DOS box to install UniCOMAL into ....

    Why is it that all the Linux-related documentation is so wordy? It seemed to take forever just to find the README files. It helped when we found out how to run NetScape Communicator (which is installed along with Linux):

    Start - Programs - Networking - Netscape Communicator
    It's much easier to navigate a Linux file system using a web browser than using, say XFM (the X file manager). Eventually, we found out roughly how to get a simple DOS system running and bootable from inside an X-Windows window. Here's a step-by-step of what we did:

  • Logged in to Linux as ROOT.
  • Ran X-windows using startx
  • Put a bootable DOS floppy in the A: drive
  • In NXTERM, typed in dos -A
  • DOS booted from drive A, we got an A> prompt.
  • Typed in SYS C: to copy the DOS system files to the hard drive file.
  • Took the floppy out of the drive.
  • Typed C: to log to drive C.
  • Typed EXITEMU to go back to NXTERM.

    We now had a small, bootable hard drive file with MS-DOS 6.22 on it, but none of the DOS files because they would have taken up too much room. It was possible to boot this copy of DOS into an X-windows windows by typing:

  • dos -k -X -g

    Command Switches: DOSEMU has many command line switches, and it can be very confusing to use. The ones given above are: -k to use a DOS console keyboard, -g to enable graphics, and -X (note, capital X) to run the emulation in an X-window instead of a terminal like NXTERM.

    This time the emulator booted smoothly from its hard drive image file and set itself up in an X-window, giving a C> prompt as expected.

    Installing UniCOMAL

    Now we had a machine which looked and behaved like a DOS PC, installing UniCOMAL was straightforward. There isn't enough space on the default hard drive image file for a full installation of UniCOMAL V3.11 Developers', so we installed only the UniCOMAL system files and the Graphics module. The installation program looked a bit strange because we hadn't bothered to change the ASCII code page in the DOS startup files, so we got lots of German-language characters with umlauts where we should have got the box-drawing characters instead. But that didn't prevent a smooth installation.

    Once installed, UniCOMAL ran as usual. Text mode programs ran as expected, although we haven't yet tried out the system module, from which we expect some problems. The graphics module worked and switched to graphicsscreen(7) without complaint. Some commands, notably pencolor and fill gave strange results which will need further investigation. Performance was very good, with programs running extremely quickly as expected.

    Conclusions

    It is now known to be possible to run UniCOMAL V3.11 in a DOS box on a Linux system using X-windows. This should also be true of UNIX implementations in general.


    Last updated 25-4-99