News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Ygdrazil

New PASCAL for the CPC?

Started by Ygdrazil, 16:37, 09 April 09

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Ygdrazil

Anyone knows about this project?

Seems to be in an advanced stage of development.

But my Spanish is a bit rusty ;D

Is it still active?

http://code.google.com/p/cpcpachi/

/Ygdrazil

AMSDOS

#1
Was following the thread to this particular compiler on ESP, unfortunately I'm not the best when it comes to Languages other than English (end even English sometimes drives me nuts!  ??? ), though I've been able to follow it - translating the websites certainly helps, though I feel I kind of picking up some of the Spanish words.

Until now I didn't realise this program was available. The only issue I have with all this is understanding how compilers are made.

There is another Pascal compiler called Z80-Pascal been made in the process - at the moment though it's also in early phases though and the person writing that seems to be really bogged down doing other things. It's not targeting the CPC machines as such, though the writer for this has mentioned the possibility of porting it to other Z80 systems, (no mention of the CPC, though if it's gonna be made for the Spectrum, then a CPC enthusiest may decide to port it). Like "Chi" it appears Z80-Pascal is being written using Free Pascal - so programs aren't being written on a CPC as such, Z80-Pascal is perhaps more limited at the moment than "Chi"  because it's only really doing Inline Assembly, but I guess these some possibility for someone with a good understanding of writing compilers to simply incorporate these programs together to make an alternative language that's a bit better than BASIC!  ;D

I've looked at the source code for Z80-Pascal & because it's written in Free Pascal, I guess I'll have to be involved in it someway! At the moment I think while someone is writing a Compiler it maybe better to simply follow it as development happens and be involved once more of the Pascal routines are established.  :-\
* 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

MiguelSky

Well, the development is stopped, but not abandoned. Nacho continues the project in summer holidays, but the last ones had only conceptual advances ;) It is far to be finished yet, but he wants continue the project.

AMSDOS

#3

...5 Years Later

I finally got around having a quick look at cpcpachi last weekend  :-[


Initially I was confused, because this piece of programming has been written in Free Pascal (2008), and then rewritten in c# (2010). I thought Nacho scrapped the idea of using Pascal in favour for c#, but no, it's still a Pascal Compiler  :-[   :D


So the last version 0.15 supports Strings, so you can write a 'Hello World!' program, this wasn't possible in earlier versions.


I've translated the spanish document and there's a few things this compiler won't do.


* Double Operators (e.g. <= , => , <>) are not allowed & I think this also includes using them with loops WHILE, REPEAT & FOR.


* There's only one data type (Byte). No Integer, Real, Boolean.


* Won't recognise Arithmetic expressions or Logical expressions


* Variables must be declared one by one, like this I guess:




var num1 : byte;
   num2 : byte;
   num3 : byte;



So declaring it like this:


var num1, num2, num3 : byte;


is unacceptable, though I noticed a later program doing this, so later versions support it.


* Needs to be linked into the Firmware, so Screen Handling, Graphics for example can be performed.


* No support for Arrays or Records, hasn't mentioned Type, I didn't see any examples using Type, so I presume no support for it. Const is allowed as well as Label.


* Functions are not supported, only simple Procedures are allowed:


Procedure test;


Not


Procedure test(num1 : byte);


Not sure what they mean by their second last point. Translated it states "The generated code is inflexible (always from the direction 30,000 variables at first,etc). This is the original spanish for it "El código generado es poco flexible (siempre a partir de la dirección 30.000, variables al principio, etc)."


* There's no editor and programs have to be compiled from the command-line. Resulting in BASIC M/C Loader program.
* 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

AMSDOS

Despite all the setbacks I listed above, I tried to write something for it, though as the name of the program suggests, it got shotdown.  :D


I also discovered Nacho abandoned development of this Pascal Compiler when CPC BASIC 3 was announced due to lack of time I think.
* 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

Powered by SMFPacks Menu Editor Mod