PDA

View Full Version : PL/M


Thrashbarg
April 9th, 2005, 10:32 AM
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
CALL SCAN
^
Reference to unimplemented intrinsic `SCAN' at (^) (assumed EXTERNAL)

and plm82.for
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
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

Thrashbarg
December 29th, 2005, 05:25 PM
This shell script seems to work, even with the compiler errors:

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 ;)

Terry Yager
December 29th, 2005, 05:40 PM
OK, you've lost me completely...

--T (way out of my league)

Thrashbarg
December 29th, 2005, 05:45 PM
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.

Terry Yager
December 29th, 2005, 06:55 PM
OK, I've played-around (briefly) with PL/M, but couldn't make any sense out of it. Mebbe if you have any Q's about 8080 AL?

--T

CP/M User
December 30th, 2005, 12:17 PM
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.

Thrashbarg
February 1st, 2007, 05:26 PM
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:

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