Author Topic: New PASCAL for the CPC?  (Read 2297 times)

0 Members and 1 Guest are viewing this topic.

Offline Ygdrazil

  • Global Moderator
  • 464 Plus
  • *****
  • Posts: 486
  • Country: dk
  • Liked: 47
  • Likes Given: 247
New PASCAL for the CPC?
« on: 18:37, 09 April 09 »
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

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.796
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1033
  • Likes Given: 1747
Re: New PASCAL for the CPC?
« Reply #1 on: 03:36, 04 October 10 »
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.  :-\
« Last Edit: 03:49, 04 October 10 by CP/M User »
* 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

Offline MiguelSky

  • 464 Plus
  • *****
  • Posts: 375
  • Country: es
    • CPCGamesCD
  • Liked: 210
  • Likes Given: 388
Re: New PASCAL for the CPC?
« Reply #2 on: 04:00, 04 October 10 »
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.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.796
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1033
  • Likes Given: 1747
Re: New PASCAL for the CPC?
« Reply #3 on: 09:55, 23 December 15 »

...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:


Code: [Select]

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


So declaring it like this:


Code: [Select]
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:


Code: [Select]
Procedure test;

Not


Code: [Select]
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.
« Last Edit: 09:58, 23 December 15 by AMSDOS »
* 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

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.796
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1033
  • Likes Given: 1747
Re: New PASCAL for the CPC?
« Reply #4 on: 01:58, 03 January 16 »
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