Showing posts with label netbook. Show all posts
Showing posts with label netbook. Show all posts

Sunday, May 17, 2020

Open Source FORTRAN for DOS

As a physicist of trade, I mainly worked with FORTRAN during my science days. One of the most important factors for me in selecting an OS is therefore the availability of a FORTRAN compiler.
With DOS, or FreeDOS, we got lucky. The Waterloo Compilers are now available as Open Source under the Open Watcom Project.
On the download page, you will find that a C/C++ compiler, an ASSEMBLER and a FORTRAN compiler are now available as open source.
The FreeDOS project included the C/C++ compiler in the distribution. I figure, the ASSEMBLE is included too. However, the FORTRAN compiler is not. I got in contact with Jim Hall asking him to include Watcom FORTRAN in the next distribution of FreeDOS.
In the meanwhile, I installed Watcom FORTRAN to the same tree as Watcom C/C++ in FreeDOS.

Here is how to do it:
Download open-watcom-f77-dos-1.9.exe as provided by the Open Watcom webpage.
Run the installer and select "\DEVEL\OW\" as install directory. This will install the FORTRAN compiler into the same environment as the C/C++ compiler provided in the FreeDOS distribution.

To use the compiler, first run the BATCH-scrip "\DEVEL\OW\OWSETENC.BAT", which will set the correct PATH and LIBRARY variables. This script is part of the FreeDOS installation.
In order to compile a simple FORTRAN program, call "wfl".

When I was taught FORTRAN in University, a system called WATFOR-77 was used in the classroom. This was an integrated system having an editor and a compiler. Same origin as Open Watcom, however, WATFOR-77 is not available as open source by today. If the authors are reading, it would be great if you would turn the DOS version of WATFOR-77 including the editor into open source!

Saturday, May 16, 2020

FreeDOS - Linux-MINT dual boot

Transferring data from FreeDOS to the cloud is something I need, but not able to achieve over WiFi, mind you, my FreeDOS computer is a netbook.
So, I believe the easiest way would be to install a Linux distribution alongside FreeDOS. The 30GB HDD offers enough space for doing so.
With a Linux on the machine, it will be easy to boot into Linux when data-transfer is needed. Reading and writing from a DOS partition is something that Linux is able to do since a very long time.

I went for Linux MINT Tara i386, just because I had a USB thumb-drive with that particular distribution readily in my drawer.

Concerning the installation, nothing special to report. I decided to use 14GB for Linux and left 16GB for FreeDOS, plenty for both operation systems.

After installation, FreeDOS did not boot from GRUB. It turns out that one needs to boot FreeDOS from a thumb-drive and re-write the system files using the "sys" command.

What FreeDOS is concerned, that's it.

The native screen resolution of netbooks can be a low for your GUI on Linux.
However, resolution scaling works beautifully, should you need more real-estate on the screen.
Here are two tiny scripts I use to toggle scaling:

$ cat nb_scale1
#!/bin/bash
xrandr --output LVDS1 --scale 1x1 --panning 1024x600
 

$ cat nb_scale1_5
#!/bin/bash
xrandr --output LVDS1 --scale 1.5x1.5 --panning 1536x900


Enjoy toying with DOS and Linux on a small netbook.