• Please review our updated Terms and Rules here

PL/M

Thrashbarg

Experienced Member
Joined
Apr 7, 2005
Messages
168
Location
Adelaide
I found a copy of the Intel PL/M-80 Programming Manual, now I want to have a play around with this language.

I got a copy of the PL/M source (In Fortran 77!) from http://www.cpm.z80.de/source.html . As you would probably expect I'm having some problems using it, this is made even worse because I have no idea what I'm doing :roll: .

I can get executables out of the two source files (compiled on Linux with GNU F77), but I've had no luck actually getting them to compile a PL/M source file.

While compiling I get a few warnings. These seem to be limited to only one type of command. Perhaps I need to include a library? I have no idea.

plm81.for gives this warning on a few lines
Code:
         CALL SCAN
              ^
Reference to unimplemented intrinsic `SCAN' at (^) (assumed EXTERNAL)

and plm82.for
Code:
plm82.for:407: warning:
         COMMON /CODE/CODLOC,ALTER,CBITS
                 1
plm82.for:4266: (continued):
         COMMON /CODE/CODLOC,ALTER,CBITS
                 2
Common block `code' is 180 bytes in length at (1) but 96 bytes at (2)

The documents say pass 1 and 2 are seperate executables.

Executing the plm81 binary gives
Code:
fmt: end of file
apparent state: unit 2 named fort.2
last format: (80A1)
lately reading sequential formatted external IO
Aborted
with any arguments.

I have no experience at all with Fortran so I'm stuck. Any suggestions please?


- Thrashbarg
 
This shell script seems to work, even with the compiler errors:

Code:
rm -f fort.1 fort.2 fort.4 fort.7 fort.11 fort.12 fort.16 fort.17

if [ x$1 = 'x' ]; then
        echo 'Please specify an input file!'
        exit 0
fi

#### PASS1 ####
echo > fort.1
cp $1 fort.2 
./plm81

#### PASS2 ####
cp fort.16 fort.4
cp fort.17 fort.7
./plm82
cp fort.12 List
cp fort.17 Output

Some of you might recognize it from the OS/2 version ;)
 
lol

I posted the question ages ago but I found the answer today. I posted it because I've often googled for things and found forum posts asking the same question's but not giving any answers. This is for anyone who want's to use the PL/M compiler from the CP/M sites.
 
Yeah sorry, I'm unable to help either. I tried looking in Google Directory under the programming section - typing PLM which pulled up a couple of Websites - though nothing which looks helpful. I found one site which had source for a PLM compiler - written in Fortran 66. Didn't really find much in google groups either - people seem to want a PL/M to C Converter which is annoying.

CP/M User.
 
Just for reference for anyone who may find this through Google (I've gotten a few emails about PL/M).

I've tried recompiling this on NetBSD with a newer version of GCC. PLM82 fails to run. The solution is to put more than one byte into fort.1, I use a line feed.

I use this shell script to compile PL/M sources now:

Code:
rm -f fort.1 fort.2 fort.4 fort.7 fort.11 fort.12 fort.16 fort.17

if [ x$1 = 'x' ]; then
        echo 'Please specify an input file!'
        exit 0
fi

#### PASS1 ####
cp "$1".plm fort.2
./plm81
if [ $? != 0 ]; then
        echo "Pass 1 failed"
        rm -f fort.1 fort.2 fort.4 fort.7 fort.11 fort.12 fort.16 fort.17
        exit 1
fi

#### PASS2 ####
echo << EOF > fort.1

EOF
cp fort.16 fort.4
cp fort.17 fort.7
./plm82
if [ $? != 0 ]; then
        echo "Pass 2 failed"
        rm -f fort.1 fort.2 fort.4 fort.7 fort.11 fort.12 fort.16 fort.17
        exit 1
fi
cp fort.12 "$1".lst
#cp fort.17 "$1".hex
mv output.hex "$1".hex


rm -f fort.1 fort.2 fort.4 fort.7 fort.11 fort.12 fort.16 fort.17

Hope this helps someone
 
Back
Top