FST Environment

71 views
Skip to first unread message

Paul Richards

unread,
Jan 5, 2021, 6:53:43 PMJan 5
to
I'm new to Modula-2 and am trying to use the FST Modula-2 environment.

I have the compiler etc in C:\M2 with sub-folders \bin, \lib, \doc and
with the M2 and sub-folders on my PATH. I have set M2LIB = c:\m2\lib.

I tried to compile one of the sample programs in the \doc directory i.e.
sieve.mod expectng it to be found using PATH but I get a 'File not
found' error and get dumped into an empty Editor screen.

Can anyone provide some assistance here please? Also what is the 'work
module' in the compiler environment?

Thanks

Martin Brown

unread,
Jan 6, 2021, 3:37:56 AMJan 6
to
At a guess there are some other environment path variables need setting.

Will it compile if you explicitly give the full filename or put the
sourcecode in the root directory?

You might find the XDS compiler easier to get started with although it
too is a little picky about where you put things for it to work.

--
Regards,
Martin Brown

Paul Richards

unread,
Jan 6, 2021, 7:56:44 PMJan 6
to Martin Brown
Martin

Thanks for the reply. Had a look at the AUTOEXEC.BAT and there are
indeed extra environment variables some pointing to directories which
don't exist in my installation. I guess my installation is incorrect.

I also have TopSpeed Modula-2 on my PC. I have also set up a batch file
with paths to all the directories in my installation. Every time I try
and compile a simple program I get a 'File not found' message, the file
in question being TSMOD.DLL, which I know is in my c:\ts\sys directory.

As far as XDS is concerned I had that on my laptop many moons ago but no
longer. It seems it isn't possible to acquire binaries of the system any
longer.

Paul

Martin Brown

unread,
Jan 7, 2021, 4:35:58 AMJan 7
to
On 07/01/2021 00:56, Paul Richards wrote:
> On 6/01/2021 7:37 pm, Martin Brown wrote:
>> On 05/01/2021 23:53, Paul Richards wrote:
>>> I'm new to Modula-2 and am trying to use the FST Modula-2 environment.
>>>
>>> I have the compiler etc in C:\M2 with sub-folders \bin, \lib, \doc
>>> and with  the M2 and sub-folders on my PATH. I have set M2LIB =
>>> c:\m2\lib.
>>>
>>> I tried to compile one of the sample programs in the \doc directory
>>> i.e. sieve.mod expectng it to be found using PATH but I get a 'File
>>> not found' error and get dumped into an empty Editor screen.
>>>
>>> Can anyone provide some assistance here please? Also what is the
>>> 'work module' in the compiler environment?
>>
>> At a guess there are some other environment path variables need setting.
>>
>> Will it compile if you explicitly give the full filename or put the
>> sourcecode in the root directory?
>>
>> You might find the XDS compiler easier to get started with although it
>> too is a little picky about where you put things for it to work.
>>
> Martin
>
> Thanks for the reply. Had a look at the AUTOEXEC.BAT and there are
> indeed extra environment variables some pointing to directories which
> don't exist in my installation. I guess my installation is incorrect.

Try creating the missing directories and put some sourcecode in them.
>
> I also have TopSpeed Modula-2 on my PC. I have also set up a batch file
> with paths to all the directories in my installation. Every time I try
> and compile a simple program I get a 'File not found' message, the file
> in question being TSMOD.DLL, which I know is in my c:\ts\sys directory.

I have had just about every M2 compiler going at one time or another. I
presume you have the TS MSDOS version (rather than OS/2). There should
be a readme file somewhere telling you what env variables need to be
set. I no longer have a working TS DOS setup so I can't test it here.

Might be TS_LIB or TS_SYS env variables need setting too. It is nearly
two decades since I last used that compiler in anger. I continue to use
the older original JPI M2 for longer because it was cute and small but
sort of abandonned that too when Win7 came along and didn't like its
16bit code and peeky pokey way IO to long since deceased graphics card.

> As far as XDS is concerned I had that on my laptop many moons ago but no
> longer. It seems it isn't possible to acquire binaries of the system any
> longer.

That is a shame. It was a good compiler in its day and had some cute
innovations like compiling an attempt to use an uninitialised variable
to a hard trap by default and various other tricks. It was one of the
first commercial compilers to use dataflow analysis to spot logic errors
in code at compile time. They even had a TS compatibility pack which
sort of worked up to a point- though it was like threading the eye of a
needle for any project of a significant size. Of the available compilers
I think XDS was one of the nicest and in latter days it was free too.

You could try looking for it on the Wayback machine you might get lucky.

--
Regards,
Martin Brown

Paul Richards

unread,
Jan 7, 2021, 3:55:35 PMJan 7
to Martin Brown
Martin

Thanks for the replies. I have actually found a v.2.51 of XDS on a
Belgian university site and it's now installed on my laptop. I shall
persevere in my attempts to get the other compilers working.
Thanks again.

Paul

Chris Burrows

unread,
Jan 7, 2021, 4:08:03 PMJan 7
to
I have all of those compilers and the manuals for Topspeed M2 so can help you to get it going once you have decided which one you prefer.

What are you hoping to do with the system once you get it going? That will help me to recommend the most appropriate.

Also are you running actual MS-DOS on a PC or using an emulator like DOSBox?

If you are running under Windows you would be better off using a compiler designed for use on Windows. I would recommend ADW Modula-2 which is a rebadged StonyBrook compiler:

https://www.modula2.org/adwm2/

Chris



Brian Knoblauch

unread,
Jan 7, 2021, 5:19:45 PMJan 7
to
On Thursday, January 7, 2021 at 3:55:35 PM UTC-5, Paul Richards wrote:
> Thanks for the replies. I have actually found a v.2.51 of XDS on a
> Belgian university site and it's now installed on my laptop. I shall
> persevere in my attempts to get the other compilers working.
> Thanks again.

Also of note, the XDS Modula-2 GitHub repository at https://github.com/excelsior-oss/xds does contain binaries in the bin directory. Compiling from source is not required.

--Brian

Paul Richards

unread,
Jan 7, 2021, 9:19:12 PMJan 7
to Chris Burrows
Chris

I'm just following an interest in various languages. Having programmed
extensively in Borland Pascal I wanted to see what one of its
predecessors was like. I have FST and Topspeed installed under DOSBox-x.
The problems I'm having, as you will have noted, seem to be related to
the PATH and environment variables in that both compilers can't seem to
find certain files even if they are there.

I'll be trying to develop fairly simple programs at first but eventually
I want to look at random access files and their use.

Paul

Paul Richards

unread,
Jan 7, 2021, 9:20:11 PMJan 7
to Brian Knoblauch
Brian

OK, I didn't realise that, thanks.

Paul

Martin Brown

unread,
Jan 8, 2021, 4:39:14 AMJan 8
to
You have got me interested.

Is the compiler source for that actually available?


--
Regards,
Martin Brown

Brian Knoblauch

unread,
Jan 8, 2021, 6:56:57 AMJan 8
to
Appears to be complete as there are extensive source files in the repository and has instructions to build from source with NASM/MinGW/Visual Studio Community. However, I made only one quick (and unsuccessful) attempt at a source build before I realized the included binaries were complete and continued on with my actual project at the time. A quick travel through some of the directories and it seems it is primarily written in Oberon-2.

--Brian

Chris Burrows

unread,
Jan 8, 2021, 2:55:46 PMJan 8
to
On Friday, January 8, 2021 at 12:49:12 PM UTC+10:30, Paul Richards wrote:

>
> I'm just following an interest in various languages. Having programmed
> extensively in Borland Pascal I wanted to see what one of its
> predecessors was like. I have FST and Topspeed installed under DOSBox-x.
> The problems I'm having, as you will have noted, seem to be related to
> the PATH and environment variables in that both compilers can't seem to
> find certain files even if they are there.
>
> I'll be trying to develop fairly simple programs at first but eventually
> I want to look at random access files and their use.
>
> Paul

OK - I see. I assume you mean 'successors' rather than 'predecessors'? The chronology / timeline of this family of languages is:

... ALGOL60 -> Pascal -> Modula-2 -> Oberon

Modula-2 cleaned up most of the syntactic quirks of Pascal.

In the Modula-2 era software was accompanied by extensive printed documentation and very little online. e.g the TopSpeed system came with more than 1000 pages in the form of a User's Manual, Language Tutorial, User Reference, Techkit and Visual Debugger. Unfortunately, you would only be able to scratch the surface and not be able to get a full appreciation of the system without this. Personally, I wouldn't bother with FST except as a very simple introduction. It was very rudimentary. Another system to look out for is Logitech Modula-2, particularly version 3 if you want to run under MS-DOS. They were amongst the original and were the kings for many years. Their Visual Debugger was groundbreaking at the time. The full manuals are available online from BitSavers and the like.

Regards,
Chris Burrows
CFB Software
https://www.cfbsoftware.com/modula2





Paul Richards

unread,
Jan 8, 2021, 9:53:47 PMJan 8
to Chris Burrows
Chris

I didn't express myself very well - I meant that by the time Borland had
developed up to version 7 of their Pascal they had incorporated some of
Modula-2's features like separate compilation of what they called Units
as opposed to compiling monolithic programs.

OK, I've got rid of FST and installed Logitech Modula-2 - the compiler
kit and the toolkit, options 1 and 2. The installation program makes
reference to an option 3, the Development Environment. What does this
offer over 1 and 2?

Also got the documentation from a Bitsaver's mirror.

Thanks
Paul

Fruttenboel

unread,
Jan 9, 2021, 4:26:02 AMJan 9
to
For some reason I lost my privileges in this google group....

If looking for FST sources and how to go along, visit https://fruttenboel.verhoeven272.nl/modula-2/index.html


Fruttenboel

unread,
Jan 9, 2021, 4:30:25 AMJan 9
to
On Saturday, January 9, 2021 at 10:26:02 AM UTC+1, Fruttenboel wrote:
> For some reason I lost my privileges in this google group....
>
> If looking for FST sources and how to go along, visit https://fruttenboel.verhoeven272.nl/modula-2/index.html

I still have an FST running in a DOS box on my Linux machine. FSTis a VERY decent compiler. It even has a builtin assembler.

AFAIR you only need to make sure the compiler is in the search path. This evening I will look things up and post them here. Don't lower yourself to the level of Logitech.

Fruttenboel

unread,
Jan 9, 2021, 2:23:25 PMJan 9
to
Two lines in autoexec.bat ought to do the trick: one to set the path to the FST executables and one to set m2lib to your own private modules.

:DRDOSBEG
path C:\BAT;C:\DRDOS;C:\PCW;C:\SUPPORT;..;C:\LANG\PowerC;C:\LANG\MODULA2
set m2lib=c:\lang\modula\m2lib;c:\lang\modula\jvlib
:DRDOSEND

Paul Richards

unread,
Jan 10, 2021, 3:21:17 AMJan 10
to Chris Burrows
On 8/01/2021 8:08 am, Chris Burrows wrote:
Chris

Although I have successfully got the Logitech compiler working I would
still like try and use the Topspeed M2 system. Given that every time I
try and compile a program I get a "File not found" error (TSMOD.DLL) I
assume that I am missing the appropriate Environment variables (there
are certainly quite a number for Logitech.)

I've searched extensively on the web but that has not provided anything
so could you possibly have a look at the appropriate TS manual and maybe
let me know what Env variables I should set?

Thanks
Paul

Paul Attryde

unread,
Jan 10, 2021, 10:43:33 AMJan 10
to
On 2021-01-10 03:21, Paul Richards wrote:
> On 8/01/2021 8:08 am, Chris Burrows wrote:
>> I have all of those compilers and the manuals for Topspeed M2 so can
>> help you to get it going once you have decided which one you prefer.
>>
>> What are you hoping to do with the system once you get it going? That
>> will help me to recommend the most appropriate.
>>
>> Also are you running actual MS-DOS on a PC or using an emulator like
>> DOSBox?
>>
>> If you are running under Windows you would be better off using a
>> compiler designed for use on Windows. I would recommend ADW Modula-2
>> which is a rebadged StonyBrook compiler:
>>
>> https://www.modula2.org/adwm2/
>>
>> Chris
>>
>>
>>
>
> Chris
>
> Although I have successfully got the Logitech compiler working I would
> still like try and use the Topspeed M2 system. Given that every time I
> try and compile a program I get a "File not found" error (TSMOD.DLL) I
> assume that I am missing the appropriate Environment variables (there
> are certainly quite a number for Logitech.)
>

IIRC, and it's been 25+ years since I worked for JPI, all you need is
the PATH to be set correctly.
What directory is the compiler installed into, and what does your PATH
look like?

Paul

Martin Brown

unread,
Jan 10, 2021, 12:31:29 PMJan 10
to
As was their PMD facility to find out exactly where and how a program
failed assuming that you had a copy of the release version and linker
map. I preferred JPI/Topspeed to Logitech though. Logitech was a 4 pass
overlaid compiler but it was slow and as dumb as a rock for optimising
and any assembler code had to be entered in *HEX*.


--
Regards,
Martin Brown

Paul Richards

unread,
Jan 10, 2021, 3:18:53 PMJan 10
to Paul Attryde
Paul

It's in C:\TS and to launch it I run a batch file with the following
entries:

path=c:\ts\xtd_sys;c:\ts\sys;c:\ts\exp;c:\ts\include;c:\ts\examples;c:\ts\lib;c:\ts\pr;
cls
ts

I know TSMOD.DLL is in c:\ts\sys but I get the 'not found' error.

Paul

Chris Burrows

unread,
Jan 10, 2021, 3:38:35 PMJan 10
to
On Monday, January 11, 2021 at 4:01:29 AM UTC+10:30, Martin Brown wrote:
> As was their PMD facility to find out exactly where and how a program
> failed assuming that you had a copy of the release version and linker
> map. I preferred JPI/Topspeed to Logitech though. Logitech was a 4 pass
> overlaid compiler but it was slow and as dumb as a rock for optimising
> and any assembler code had to be entered in *HEX*.
>
>
> --
> Regards,
> Martin Brown

Agreed. When JPI/ Topspeed eventually came on the scene it knocked the socks off everything else in terms of speed. I recommended Logitech primarily because the documentation is available online. However, I don't really think speed is an issue now we have systems running faster than a 6 MHz 286 when it was first introduced ;-)

Chris Burrows

unread,
Jan 10, 2021, 3:54:31 PMJan 10
to
On Sunday, January 10, 2021 at 6:51:17 PM UTC+10:30, Paul Richards wrote:

> Although I have successfully got the Logitech compiler working I would
> still like try and use the Topspeed M2 system. Given that every time I
> try and compile a program I get a "File not found" error (TSMOD.DLL) I
> assume that I am missing the appropriate Environment variables (there
> are certainly quite a number for Logitech.)
>
> I've searched extensively on the web but that has not provided anything
> so could you possibly have a look at the appropriate TS manual and maybe
> let me know what Env variables I should set?
>
> Thanks
> Paul

The INSTALL program should set everything up for you. The manual says:

"9. INSTALL may display further instructions when you finish the installation. Carefully read this information. You may be told to edit your AUTOEXEC.BAT and / or other system files in order to correctly support TopSpeed. Modify the files as indicated."

TSMOD.DLL should be located in the same folder as TS.EXE. Maybe your path needs to include <current directory. (i.e. '.')?

TS does not use environment variables. There is a text file called TS.RED (for redirection) used to define search paths with one file type on each line e.g.

*.obj = c:\objs; c:\ts.objs

but this is not used to locate the executables

Chris Burrows

unread,
Jan 10, 2021, 5:21:18 PMJan 10
to
On Friday, January 8, 2021 at 12:49:12 PM UTC+10:30, Paul Richards wrote:
> predecessors was like. I have FST and Topspeed installed under DOSBox-x.
> The problems I'm having, as you will have noted, seem to be related to
> the PATH and environment variables in that both compilers can't seem to
> find certain files even if they are there.
>

I tried installing Toipspeed under DOSBox 0.74 but I can't even get past square one. When I run INSTALL it prompts me for a directory but everything I try (including the 'mounted' drives) results in an 'invalid target directory' error. Are you able to try it on a proper MSDOS system? I don't have on problems on mine.

Chris

Paul Richards

unread,
Jan 10, 2021, 8:01:35 PMJan 10
to Chris Burrows
I use DOSBox-x which opens on drive z:\. I have a directory structure
c:\vdos\ts and I mount c c:\vdos - this then shows as c:\ with a
directory structure beneath. I put all the INSTALL programs in a
temporary directory c:\tsinst, load DOSBox-x which opens at the c:\
prompt, cd to c:\tsinst and hit INSTALL.EXE. Topspeed installs into
c:\ts (the default).

I don't have a native MS-DOS system just emulators or VMs.

Paul

Chris Burrows

unread,
Jan 11, 2021, 5:27:03 AMJan 11
to
On Monday, January 11, 2021 at 11:31:35 AM UTC+10:30, Paul Richards wrote:

> >
> I use DOSBox-x which opens on drive z:\. I have a directory structure
> c:\vdos\ts and I mount c c:\vdos - this then shows as c:\ with a
> directory structure beneath. I put all the INSTALL programs in a
> temporary directory c:\tsinst, load DOSBox-x which opens at the c:\
> prompt, cd to c:\tsinst and hit INSTALL.EXE. Topspeed installs into
> c:\ts (the default).
>
> I don't have a native MS-DOS system just emulators or VMs.
>

OK - I did something similar to that and it now installs OK. I installed into C:\TS which is mapped to D:\vdos\TS and it compiles PROG1.MOD (Hello) OK.

I installed the 'real mode' version of the compiler. I don't have a PATH variable set. I change directory to TS\SYS before I run TS.exe.

I hope this helps,
Chris

Paul Attryde

unread,
Jan 11, 2021, 7:34:00 AMJan 11
to
Do you have an OS2_SYS directory?
In theory you only need c:\ts\xtd_sys, c:\ts\sys & c:\ts\os2_sys in the
path, I just can't remember the order.
But a new install from scratch should set them correctly.

As Chris says, for everything else you use the .red file, so you can
take all of the other folders out of the path since they won't be used.

Paul




Chris Burrows

unread,
Jan 11, 2021, 2:40:12 PMJan 11
to
I ran some more tests:

I'm using DOSBox 0.74 and the DOS Release 3.1 of TopSpeed Modula-2 from Clarion Software Corporation. I've now successfully run it from a batch file located in a different folder with just the following lines:

path=c:\ts\sys
ts

TSMOD.DLL should be put into the same directory as TS.EXE by INSTALL. I tried running INSTALL again with the default options and it didn't even install TS.EXE!

I then ran INSTALL again with a minimal number of changes to the options:

I set 'DOS Environment Files' to YES and OS2 Target System to NO.

It shows that v3.1 of the Modula-2 development system has been installed and didn't say anything about the AUTOEXEC.BAT file (that was in the manual!). I suggest you delete your TS directory and run INSTALL again with these two options set.

To compile the example I start TS and then select the file PROG1.MOD using Files > Pick File and navigate to the TS\EXAMPLES directory to locate it.

I then press F10 to get to the main menu, C for compile and voila! it compiles.

Chris

Paul Richards

unread,
Jan 11, 2021, 5:18:23 PMJan 11
to Chris Burrows
Chris

Well I modified my batch file to:

path=c:\ts\sys
ts

and, as you say, Voila, prog1.mod Compiles and Links correctly. The only
issue is that after loading the file from the c:\ts\examples directory
the Compile puts prog1.obj in the c:\ts directory. I had to copy
prog1.mod from c:\ts\examples to the c:\ts directory to get a successful
Link and subsequent Execute.

Many thanks for your efforts - I really appreciate them.

Paul

Paul Richards

unread,
Jan 11, 2021, 5:21:19 PMJan 11
to Paul Attryde
As you may have seen from my reply to Chris, following his instructions
I now have a successful compile/link.execute process :-)

Thanks for your suggestions.

Paul

Martin Brown

unread,
Jan 13, 2021, 9:15:03 AMJan 13
to
many thanks!

--
Regards,
Martin Brown

anti...@math.uni.wroc.pl

unread,
Feb 9, 2021, 4:30:08 PMFeb 9
to
Paul Richards <paulri...@iinet.net.au> wrote:
> On 9/01/2021 6:55 am, Chris Burrows wrote:
> > On Friday, January 8, 2021 at 12:49:12 PM UTC+10:30, Paul Richards wrote:
> >
> >>
> >> I'm just following an interest in various languages. Having programmed
> >> extensively in Borland Pascal I wanted to see what one of its
> >> predecessors was like.
> >
> > OK - I see. I assume you mean 'successors' rather than 'predecessors'? The chronology / timeline of this family of languages is:
> >
> > ... ALGOL60 -> Pascal -> Modula-2 -> Oberon
> >
> > Modula-2 cleaned up most of the syntactic quirks of Pascal.
> >
>
> I didn't express myself very well - I meant that by the time Borland had
> developed up to version 7 of their Pascal they had incorporated some of
> Modula-2's features like separate compilation of what they called Units
> as opposed to compiling monolithic programs.

Units are UCSD Pascal feature. AFAIK history here is:

-> UCSD Pascal -> Turbo Pascal
/
Mesa
\
-> Modula -> Modula 2

During stay in US Wirth learned about Mesa and modules, and
included them in Modula. This was parallel to developement
of UCSD Pascal. Modules appeared also in CLU, which seem to
be parallel to Mesa (but it seem that CLU compiler is lost).

BTW: IIRC units appeared in Turbo Pascal 3 (definitely much
earlier than version 7, I used them in Turbo Pascal 5).

--
Waldek Hebisch

Chris Burrows

unread,
Feb 9, 2021, 10:17:19 PMFeb 9
to
On Wednesday, February 10, 2021 at 8:00:08 AM UTC+10:30, anti...@math.uni.wroc.pl wrote:

>
> BTW: IIRC units appeared in Turbo Pascal 3 (definitely much
> earlier than version 7, I used them in Turbo Pascal 5).
>

Actually they first appeared in Turbo Pascal 4.at the end of 1987, more than three years after Modula-2 compilers started to become widely available.

--

oligun...@gmail.com

unread,
Feb 12, 2021, 8:08:06 AMFeb 12
to
Mesa influenced Modula-2, Modula predates Mesa. Modula influenced Mesa and the modules/units in CHILL and Ada. Actually according to the authors of CHILL (Philips), both Ada and CHILL are actually based on Modula and not on Pascal/LIS (Bull Language d'Implementation de Systèmes) as stated in most history articles and Wikipedia.
Reply all
Reply to author
Forward
0 new messages