next up previous
Next: Development of programmes (remarks for Pascal users) Up: Astronomic and other programmes (written in Pascal) Previous: Introduction

Using computers with MS-DOS

To make a computer serve you well, you need to configure it properly. Start with the file AutoExec.bat in the root directory of MS-DOS1. I recommend you very much to define the beginning of ``environmental variable'' Path (list of directories, where executable files are sought) as
Path=C:\bat;C:\DOS;C:\s\exetpu;
-- the very beginning is the directory with batch files (programmes in the operating system language), which you use to start programmes contained in many different directories. There is no need to include these many directories into the Path variable.

For example, you can start the Windows system by win.bat or just w.bat, which read probably C:\Windows\win.com -- no other programmes in the \Windows directory are run by MS-DOS, and so it is dull to include that huge directory in the Path. (Why it is so common? MS-DOS makes no \bat directory during its installation, and so no programmes are relying on it during their own installation.)

Batch files enable to define starting values for various programmes. For example, I have a batch t.bat, which reads C:\s\t602\t602.exe /EGAm %1 %2, and by which I can easily open up to two files in that popular Czech editing program, and use a bit higher letters. Another batch you will surely need is tpc.bat, running a command-line compiler of Turbo Pascal (you can place a /m parameter there, which makes sure that changed units will be compiled as well, or parameter /l, to overcome insufficient free memory). The Borland system for developing programmes is started by a batch tp on my computers, Free Pascal Compiler by fp.

You would do well to copy the batch files contained in directories Astro and Util of the archive pas_jh into the \bat directory. From the root directory of the archive, copy two batch files there, tpc.bat and tpc_all.bat. The first one compiles one file, the other one compiles all files in a current directory by the fist one. Failing compilations are logged in fail_tra.lst.

The ExeTPU directory, as I call it, has to appear in the tpc.cfg file in the /E parameter -- there the compiled units and programmes should be placed, and there the compiler tries to find the units compiled before. The tpc.cfg file should reside in the same directory as the compiler tpc.exe itself (which I call by tpc.bat).

The Path variable should continue (or end) with a directory containing various viewing and packing programmes, in my case C:\s\nc. There I have the programmes for creating and expanding archives. To expand an archive, make a directory for it (it may have the same name), copy the archive there, and issue a command pkunzip -d name of archive (suffix .zip can be omitted)2. The -d switch ensures restoring the needed subdirectory structure. The archive file itself can be then deleted.

In case of archive BSC5_cd with a part of The Bright Stars Catalogue ([8]) there is a batch of the same name (i.e., BSC5_cd.bat), which makes that task, and then it runs a database programme which changes the files into a working form. To be able to run a database program, it needs a d.bat file with one parameter (in my case it reads C:\s\db3\dbaza.exe %1), which starts that program. If the programme is dBaseIII+, Append.exe (MS-DOS resident program) should run with a directory containing that program. In my case it is accomplished by ApdB.bat reading:
LH Append /e
Append c:\s\db3;c:\s\tp\bgi;

If your Autoexec.bat does not execute the above command, then (for programmes using a graphic mode) it should contain a line like
Set BGI=C:\s\tp\bgi
which informs the programmes where the graphic drivers (Borland Graphic Interface) reside. The same directory contains usually the Borland unit Graph.tpu, and so it is to be included in the /U parameter of tpc.cfg, as well as the directory with the source files of units (C:\s\Pas\Units in my case).

The above examples say, that I have most of software I use in the \S directory. It is hidden there, as I do not need to see it very often, and I do not want to be bored by its long list in the root directory C:\. When I am looking at the programmes at all, it's just into their source texts (I have them in the c:\s\PAS directory, where I get any time by Pas.bat).

If your computers access more than one disk, you should avoid starting file names by a disk letter in the batch files. Instead, make a line in Autoexec.bat reading like Set SWDir=C:\s and just then Set BGI=%SWDir%\tp\bgi. Similarly, explicit c:\s should be replaced by %swdir% in all batch files. If the software will then shift to a disk D (you will shift it, or the disk will have such letter when accessed from another computer), it is sufficient to change the letter in the definition of environmental variable SWDir, and the rest will work as previously. If the space for environmental variables does not suffice, you can enlarge it by a line in the Config.sys reading like Shell=c:\command.com /p /e:1024. Then, 1024 bytes of environmental space will be available instead of default 256 B.


next up previous
Next: Development of programmes (remarks for Pascal users) Up: Astronomic and other programmes (written in Pascal) Previous: Introduction
hollan@ped.muni.cz (english / česky, raději než ,,cesky``)