Sinclair Library

ProPascal

Programming: General · ZX-Spectrum 48K · 1 players · English

Prospero Software · 1988 · Pound sterling 57.50

MIA Missing in action. This is known to have existed, and no copy has ever been found. If you own one, the archives would like to hear from you.

Not rated yetSign in to rate it

Discussion

Nobody has started a thread about this yet.

Start a thread

Remarks

needs CP/M

Scores

In the magazines

  • Sinclair User #541986 · Overall5/5

In the magazines 4

Crash #54Jul 1988 · p.70

Crash

Simon N Goodwin

(Simon N Goodwin owns the copyright to this review. Please visit http://simon.mooli.org.uk to find original articles and updates, much new material and his contact details.) THREE PASCAL COMPILERS Simon N Goodwin reports on three +3 Pascal Compilers the 007 Disassembler, returns to the topics of the Tech Tape, ZipZap, and Multiface RAM upgrades, and exposes yet more bugs! +3 owners have a wide choice of alternative programming languages, which I intend to survey in future columns. This month I compare three impressive implementations of the Pascal Language. Pascal was invented in 1970 by Niklaus Wirth, an outspoken Swiss professor. It is designed to be efficient and expressive, while forcing the programmer to think out a clear design before coding starts. This makes it popular with academics and methodical people. and hated by hackers who like to make things up as they go along. You can learn a lot by writing large programs in Pascal; it's more of a science and less of an art than, say, BASIC or C. I looked at two compilers from Spectrum stalwarts HiSoft - Pascal +3, which runs on a standard +3, and Pascal 80, which runs under +3 CP/M. The third package is ProPasCal. from Prospero Software, which runs on all Amstrad CP/M systems, including the latest Spectrum. These are powerful compilers, rather than the cut-down subsets that often appear on micros. They support PEEK, POKE, IN and OUT, CASE ELSE/OTHERWISE, 16-bit integers, 32-bit single precision floating-point, CHARs, BOOLEANs, VAR and value parameters, arrays, records (including variants), files (including random access), sets, hex constants, pointers, enumerated and sub-range types - plus all the standard Pascal commands and functions, of course. The table summarises the differences between the compilers. Both HiSoft packages have an integrated editor so you can swap back and forth quickly between compiling and editing. They also work much faster than ProPascal, mainly because the HiSoft compiler is a one-pass 20K program, whereas Prospero's compiler scans three times through the source, using a total of 102K of code in three programs, plus another 16K for the linker! You really need a second disk drive to run ProPascal, although I did manage to run tests, rather laboriously, using an unexpended +3. If you're planning a very big program. ProPascal might turn out to be almost as fast as the HiSoft compilers, because you can compile files in sections and need only recompile the parts you've changed, before linking old and new parts with the linker. Compilation controls are much the same for all three compilers: you can turn break, overflow and subscript checks on or off, control listings, and include other source files. Prospero have a couple of extra options - one rejects everything except strict standard Pascal, while the other tries to produce condensed code, trading speed for size and typically reducing file sizes by about 10%. The manuals were clear and comprehensive: the ProPascal one was easiest to read, while the HiSoft manuals were the best looking. The HiSoll compilers came with laser-printed loose-leaf A5 manuals in ring binders. The ProPascal manual was spiral bound and daisywheel printed on expensive paper - it included an index and tutorial, both notably absent from the HiSoft manuals. HiSoft make up for this, to some extent, with five and seven page contents lists, and suggest that you buy a separate tutorial if you're new to Pascal. All the +3 compilers can handle programs larger than the maximum size for one file. The first file you compile with HiSoft's compilers can 'get' text from other files. ProPascal goes even further, by allowing that file to call up text in another, and the other to call - upon a fourth file, if necessary. ProPascal includes commands to rename, append, erase and check filenames inside your program. You can't do this in Pascal +3, but Pascal SO includes a general purpose routine that lets you call CP/M functions from inside a Pascal program. All three let you 'chain' execution from one compiled program to another. There was little to choose between the speed and size of generated code - all the compilers did a good job of writing Z80 code. They were rather vague about errors, as Pascal compilers tend to be - sometimes they produced rather a lot of spurious error messages after one silly error in a file. HiSoft give you the option to swap back to the editor and fix the problem as soon as one error is found. TRADE-OFFS These are all good Pascal compilers, with inevitable trade-offs. Pascal +3 is best suited to the 4 3. but programs compiled with it won't run on other machines and the editor is rather clumsy, reminiscent of an old-fashioned BASIC editor. The same editor is used in the £25 cassette version of HiSoft Pascal, for earlier Spectrums. The tape compiler is similar to Pascal 3 but won't compile such large programs and lacks refinements like file handling and variant records. If you've got CP/M Plus you can use the much better ED80 editor supplied with Pascal 80 and other HiSoft CP/M languages, at £29.95 separately. ED80 is easy to configure and use, and does everything a good program editor should. It handles large files very quickly, although scrolling is rather slow and unformatted disks can make it crash. HiSoft also include three useful new CP/M utility commands that improve on PIP, ERASE and DIR. Pascal 80 programs are portable to other machines, notably MSX, Tatung Einstein, and Amstrad CPC and PCW systems, but you lose access to Spectrum graphics and sound. ProPascal is the most expensive compiler, at £57.50, but the most comprehensive. Formerly Amstrad ProPascal sold for £300, and it was used to write the entire ProPascal and ProFortran system. ProPascal implements the full ISO standard, without quirks, and has lots of well thought-out extensions - none digit 32-bit integers, 16 digit 'double precision' maths, strings with dynamic lengths up to 255 characters, and error trapping. The snags are the lack of an editor and the need for a second disk drive. The first problem is minor; any ASCII editor will do. The second may be more crucial. I'd be very interested to hear from anyone who's connected a standard 3.5 or 5-25 inch drive to the port on the back of the +3. TECH TABLE: SPECTRUM +3 PASCAL COMPILERS COMPARED Product Name: Pascal +3 Publisher: HiSoft (0525 718181) Operating System: +3 DOS Price: £34.95 Manual Size: 92 Compilation Speed (Line/Min): 1360 Min Compilation Time (Seconds): 4 Compiler Size: 22K Max Object Size (Code & Data): 40K Max Source File Size: 32K Max Identifier Length: 8 Max Set Size: 256 Other Goodies: Turtle graphics; PLOT & DRAW; BEEP; 51 column display; Inline code; Integrated editor; Disassembler Main Snags: Crude editor Product Name: Pascal 80 Publisher: HiSoft (0525 718181) Operating System: CP/M Price: £49.95 Manual Size: 111 Compilation Speed (Line/Min): 1250 Min Compilation Time (Seconds): 8 Compiler Size: 20K Max Object Size (Code & Data): 61K Max Source File Size: 52K Max Identifier Length: 8 Max Set Size: 256 Other Goodies: Full screen editor; CP/M utility commands; Inline code, Disassembler; Integrated editor; Generalised CP/M call Main Snags: Product Name: ProPascal Publisher: Prospero (01 741 8531) Operating System: CP/M Price: £57.50 Manual Size: 182 (A5 pages) Compilation Speed (Line/Min): 560 Min Compilation Time (Seconds): 40 Compiler Size: 102K Max Object Size (Code & Data): 61K Max Source File Size: Depends on your editor Max Identifier Length: 255 Max Set Size: 2039 Other Goodies: String operators; PROC & FN parameters; Error traps; 32-bit & 16 digit maths; ISO standard; Extra file commands; Linker, Xref & librarian utilities Main Snags: No editor supplied; Need drive B

Sinclair User #54Sep 1986 · p.825/55/5

Sinclair User

Overall 5/5

John Gilbert 5/5

Publisher: Prospero Software, [redacted] Price: £99.95 Prospero, like its Shakesperian counterpart, still practices its art on the QL despite Amstrad's curse on the machine. The company's latest language compiler package, Pro Pascal, promises to be a stolid seller with no great surprises. Pro Pascal consists of a boot Rom, three microdrive cartridges and a massive manual. The cartridges contain the language linker, run-time library and configuration programs. They do not, however, contain an ASCII editor. You'll have to buy, or write, one before you create any Pascal source files. The two-pass compiler produces binary object code in a simple but time consuming process. Microdrive 1 takes the compiler cartridges while Microdrive 2 takes your source code. You then specify your compile options. You can dump error messages to a file, check the range of indexes, assignments and pointers, produce a source listing, and represent real constants in double precision. The compiler can also be set to accept only strict ISO standard Pascal. Source errors are listed on the screen, usually during the first compile-time pass, and can be output to a Microdrive file. Error messages comprise a source line number an error code and a listing of the fouled line. An additional error explanation appears if you invoke the text file Propas Err. Common errors include illegal variable declations, improper Pascal structures and insufficient memory on Ram of device. When the second pass is complete the compiler displays the name of the new binary file and the bytes used by code and data. The compiled object code - resident in Microdrive - is then linked into the Pascal program library from which several routines are added to it. The linker can also be used to collate several source-file modules into one program. Object code is position independent, re-entrant and can be burnt on to Rom. The full 24-bit address range of the 68000 processor is used for both code and data so that large programs can be developed and strung together using the linker. The package's Rom cartridge, or a copy of the Prospero Resident Library in Ram, must be operative before you can run your object code. The library contains machine-code routines which are required by all Pascal programs. If you accidentally power up the QL without the Rom plugged in the back you can invoke a copy of the library from Microdrive into Ram. Pro Pascal is a powerful language but pulls no punches over its only serious rival on the market, Metacomco's Pascal Development Kit. There is little to choose between the two packages although the Metacomco Pascal contains a ASCII source editor and does not involve so much cartridge swapping. Metacomco has the edge if you're looking for a beginners package but, after that, there's no way to separate the language programs - both are good.

A short piece of code, called a header, defines the variables which will be used in the program.

Pascal programs are often structured in procedures, each of which has a function.

ZX Computing #29Sep 1986 · p.80

ZX Computing

David Nowotnik

DAVID NOWOTNIK LOOKS AT THE LATEST LANGUAGE SOFTWARE FOR THE QL PRO-PASCAL Prospero Software £99.95 For QL programmers seeking to move on from SuperBASIC to an alternative high level language, one which is compiled rather than translated (for greater operating speed), then Pascal is an attractive choice. It could be said that SuperBASIC was the result of combining the structured principles of Pascal with earlier versions of BASIC Certainly, QL programmers will feel at home with Pascal's structured style, and many commands and syntax rules have some similarity with SuperBASIC. The appearance of Pro PASCAL is not the first opportunity given to QL owners to try Pascal, the price of the package, at £99.95 is certainly high when compared with other QL Pascal compilers. But this compiler, the latest offering for the QL from Prospero Software, has several attractive features, and certainly compares favourably with the other Pascal compilers currently available. PRO The full package of Pro Pascal is very similar to the first language from Prospero Software for the QL, Pro FORTRAN-77, which was reviewed in the July issue. The compiler is supplied with a 170 page A5 manual in a hard-backed ring binder, plus software on three cartridges, and a plug-in ROM. Version 1.34 of the ROM (known as PRL, 'Prospero Resident Library") was supplied for review; this ROM is essential for compilation. It also has the run-time routines for the compiled programs, although there is a separate software PRL on one of the cartridges if you wish to run compiled programs independent of the ROM. Like Pro FORTRAN-77, this Pascal compiler suffers from the unfortunate omission of a text editor, so users have to 'borrow' one from another software package to write their own source code. The manual does not attempt to teach Pascal to beginners to programming, but experts in SuperBASIC or FORTRAN should have no difficulty in learning the elements of Pascal from the manual. And there are nine sample source listings on one of the cartridges, to practice using the compiler, and help learn the rudiments of Pascal. COMPILES Compilation of source code is completed in three steps. The compiler itself works in two passes. Placing the first cartridge in mdv1__ and typing 'exec mdvi__pas' loads a control program which, in turn, loads the two compilation routines, and supplies the user with a list of compilation options. These options, nine in total, allow you to select various features of the compiler, such as creating report files, creating compact (but slower running) code, and tracking source names and line numbers in run time (to help de-bug run-time errors). A rather attractive option is one that accepts only strict Standard Pascal. Pro Pascal operates to ISO 7185 standard, but offers a range of QL specific commands in its standard library. If you are intending to use Pro Pascal source code on other micros, if is useful to be able to suppress the QL commands. The compiler contains a comprehensive list of error codes, with meaningful error messages loaded in from a separate file (if RAM space is available) only if compile time errors occur. Pass 2 of compilation requires replacing the first Pascal cartridge in mdvi with cartridge 2. The third step, linking to library routines requires a further cartridge change. Despite all these changes, compilation is reasonably fast. For the simple example program shown in fig.1. passes one and two were completed in two minutes, while the link step took two and a half minutes. Compilation time is limited by microdrive access speed; the whole process is much faster with discs, and more convenient, as all compilation and linking routines can be stored on a single disc. UTILITIES There are several utility programs on the cartridges, so it is possible for users to create their own command libraries. These libraries can use modules from Pascal, or from routines written in Pro FORTRAN-77, or assembler. With the linker, machine code programs can be created of mixtures of Pascal and FORTRAN-77 routines. The run time routines in PRL (both ROM and software versions) will run both Pro Pascal and Pro FORTRAN programs. The example Pascal program in fig.1. was written to compare operating speeds of the compiled program, with its SuperBASIC equivalent. With the ROM PRL installed, this program ran in six seconds, compared with 95 seconds for the BASIC version (in a standard QL). Interestingly, the Pascal program was slower (nine and a half seconds) using the software PRL And, for further comparison, the compiled BASIC program ran in eleven seconds. Pro Pascal provides compact code (the example program occupied six microdrive sectors), allowing very large programs to be compiled. In total, it is a very 'user-friendly' package, and ideal for both professional programmers and amateurs experienced in SuperBASIC.

Fig 1. Test programs in Pascal and Basic a) Pascal PROGRAM test_speed (input, output); (A simple test of operating speed) VAR a,c; INTEGER; b; REAL; BEGIN a := 0; b:= 0; c:=0; writeln('Start'); REPEAT a := a +1; b := b+(a/10); c := a DIV 2; UNTIL a = 8000; (Now print results) writeln (a:1); writeln (b:1); writeln (c:1); END. b) SuperBASIC 100 REMark PROGRAM Test_Speed 110 REMark 120 REMark A simple test of operating speed 130 REMark 140 a%=0; b=0; c%=0 150 PRINT "Start" 160 REPeat loop 170 a%=a%+1 180 b=b+(a%/10) 190 c%=a% DIV 2 200 IF a%=8000 THEN EXIT loop 210 END REPeat loop 220 REMark Now print the results 230 PRINT a% 240 PRINT b% 250 PRINT c% 260 STOP

Feature1

Reviews from people here

Sign in to write about this, or make an account. It takes a minute and lets you correct the catalogue too.

This entry78% complete

No credit, tag recorded.

Sign in to correct or add to this.

See what has changed about this entry

Share this entry

Hold the rights to this and want it taken down?