Turbo-Pascal 4 compatible cross-compiler

By litwr

Resident (42)

Аватар пользователя litwr

21-05-2020, 20:08

I have made an interesting discovery recently. I have found Turbo Pascal 4.0 compatible compiler for the 8080 based CP/M! Its name is Express Pascal. I knew its author, we met in 1991 but he wanted to sell his product that time. This compiler is for a Russian computer https://en.wikipedia.org/wiki/Corvette_(computer) which has interesting graphic capabilities. It produces code compatible with CP/M. You only have to avoid using graphic functions. I tried to compile several programs on the Corvette and then successfully ran them on the Amstrad CPC 6128 and BBC Micro under CP/M 2.2 and on an MSX computer. However I can't run the code on the Amstrad CPC, PCW or Commodore 128 under CP/M+. This compiler has very detailed documentation in Russian but any documentation about Turbo Pascal 4 can be used instead. The compiler IDE uses English. You need to know only differences between Express Pascal 2.0 and Turbo Pascal 4.0. There are only a few of them:
1) no functions Freemem and Dispose, use only Release;
2) recursive functions can't have reference parameters (var-parameters);
3) no External or Interrupt procedures or functions. It is possible to write interrupt routine but it can be done by other means;
4) you can use constant expressions anywhere instead of just plain constants;
5) a function type can be a set type;
6) you can use a reference on a variable in Absolute and Inline constructs;
7) the for-loop can use a reference instead of a variable;
8) an identifier length is limited to 127 characters;
9) you can use any number of procedures and functions;
10) it is possible to stop an executing program;
11) no types Single, Double, Extended, Comp - use Real instead of them;
12) the Mem-array uses unsigned integer indices;
13) system calls are different, use functions Bios and Bdos to call them (a record type Registers is provided);
14) only the next compilers directives are supported: $A, $R, $I, $S, $V;
15) you can use Private keyword inside units.
So if anybody wants to work with Turbo Pascal for his CP/M he has to use a Corvette for the cross-development. It is quite easy because the Corvette has several good emulators. Most of them work only under Microsoft Windows. But there is an emulator for browsers in js, one for Android and at least two emulators for Linux. A multi-computer emulator for Microsoft Windows - http://bashkiria-2m.narod.ru/index/files/0-11 - file emu.rar
There are also several utilities to work with disk images. There is a package which supports a lot of retro-computer formats - http://era-cg.su/steinblume/#downloads - it is for Microsoft Windows only. There is also a small and fast utility which is available for Microsoft Windows and Linux - https://bitbucket.org/marinovsoft/mst/src/master/
I have attached an archive with a disk image with the compiler (just type EP to run it) and documentation.
As this compiler generates the pure 8080 code DDT can be used for debugging as well as ZSID.
I dare to add several more words about the Corvette. It was designed by several young men in Moscow State University who were very impressed by the Tandy TRS-80 in the early 80s. So they designed their own PC and their design was supported as a standard computer for schools of the Soviet Union! This story is similar one about Apple. :) The Corvette was made having also the MSX computers as a pattern. It has large video memory (48 or 192 KB) and 512x256 color accelerated graphics. Its unique detail is an independent text plain which allows to combine three graphic plains and the text plain.


Для того, чтобы оставить комментарий, необходимо регистрация или !login

By pgimeno

Master (171)

Аватар пользователя pgimeno

22-05-2020, 11:31

Pretty interesting, thanks!

Archived in the Wayback Machine: http://web.archive.org/web/20200522092529/https://stardot.or...

Clickable link for the Corvette: https://en.wikipedia.org/wiki/Corvette_(computer)