Author Topic: Turbo Pascal 4 compatible cross-compiler  (Read 123 times)

0 Members and 1 Guest are viewing this topic.

Offline litwr

  • CPC6128
  • ****
  • Posts: 150
  • Country: ru
    • lidovski's www page
  • Liked: 126
  • Likes Given: 127
Turbo Pascal 4 compatible cross-compiler
« on: 20:48, 21 May 20 »
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.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.795
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1033
  • Likes Given: 1747
Re: Turbo Pascal 4 compatible cross-compiler
« Reply #1 on: Yesterday at 13:29 »
Peter Dassow would be interested in this, he can be reached through his website -> http://www.z80.eu/index.html
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3