Page 1 of 1

C1 Pascal

Posted: Fri Apr 13, 2018 4:42 pm
by dilwyn
Has anyone managed to use the Computer One Pascal from my website successfully on QPC2?

It seems to unzip OK, but someone has indicated that it might not run OK, in particular a problem with the file called "pfile". The symptons are that the main menu appears incomplete and cursor won't move.

I don't know anything about Pascal so I have to ask for help on this one.

Re: C1 Pascal

Posted: Fri Apr 13, 2018 5:48 pm
by tofro
Dilwyn,

C1 Pascal wants a 100% identical memory layout as that of an original QL - Otherwise, it won't run.

It is also not compatible with the pointer interface - It asks for input in the menu window but doesn't display a cursor, so you can't <CTRL>-C into it.

I once tried to patch it but decided it's not worth the hassle, as we have much better Pascal compilers freely available (e.g. Prospero) for the QL now - Even if it has a nice menu environment, something you could call the beginning of an IDE.

In case someone wants to patch it: It's not exactly an easy task, as it loads a main module (as a basic extension) and then dynamically loads the editor and compiler modules afterwards.

Tobias

Re: C1 Pascal

Posted: Fri Apr 13, 2018 5:57 pm
by Dave
Are C1 PASCAL and Metacomco Pascal (with the ROM dongle) comparable?

Re: C1 Pascal

Posted: Fri Apr 13, 2018 6:30 pm
by tofro
Dave wrote:Are C1 PASCAL and Metacomco Pascal (with the ROM dongle) comparable?


From a language view, yes - All tree implement a somewhat standard Pascal with similar language features, although the QL-specific implementations differ a bit.

The main difference is that C1 Pascal is not what I would call a true compiler - It compiles to intermediate code and uses a virtual machine implementation to run that intermediate code - Somewhat like what Java does nowadays. You can produce stand-alone programs, though, in this case, the compiler binds the runtime environment into your executable.

Another difference is that C1 Pascal comes with a menu-driven development environment. You can edit, compile and run Pascal programs from one single program, something you would first need to set up with the other compilers.

Opposed to that, both Metacomco and Prospero compilers produce real 68k machine code in Sinclair relocatable file format, so you can combine Pascal and assembler (or, whatever) code using the linkers. Even if both of the compilers came with a ROM originally, the main differences between Metacomco and Prospero is that M uses the ROM for copyright protection only (and has thus part of the compiler in there), while P has put the runtime library for both Pascal and Fortran into the ROM. P does, however, come with a distributable runtime library in a file - But the compiler wouldn't run with that.

Tobias

Re: C1 Pascal

Posted: Fri Apr 13, 2018 6:51 pm
by swensont
Dilwyn,

I've got C1 Pascal to run on Q-emulator. I don't think I've gotten it work on UQLX. C1 Pascal does have a nice front end for editing and compiling, but it is a bit limiting. For Pascal, I think I'd stick with Prospero ProPascal. IIRC I got it working with UQLX. I did some write ups on this in SMSQzine.

Tim

Re: C1 Pascal

Posted: Fri Apr 13, 2018 7:08 pm
by tofro
Here's another thread where I described how to create a Prospero Pascal programming environment for modern SMSQ/E computers using C68 make:

viewtopic.php?f=3&t=1838

Tobias