Compile anywhere! lazarus / 6-IDE-CodeTools ---------------------------------------------------------------------- arximidis · 2009-03-01 18:02 Hello!!! I'm programming with pascal since I learned about computers. Even if I know C/C++, I prefer pascal (I like the structure) and I am trying to find pascal compilers over the internet for anything you can imagine. For Linux, Windows and... (Well my post has to do with the "and..." of the previous sentence). Nowadays I am programming using mostly Delphi, but I have already written a program with Lazarus (and it did work fine, under Windows and Linux). I initially wrote the program with Delphi, but it was extremely easy to go to Lazarus (only some modifications for the serial port because the component was different). I am hoping that I will gradually go to Lazarus only, because of the benefits (for starters it’s free) Ok, enough of that. Lazarus project is a multiplatform programming language. It can compile programs for Linux, Windows, MacOS and even for ARM processors (e.g. GameBoy Advance). Now, my suggestion has to do with this: Why not for microcontrollers (e.g. AVR or PIC) or even Z80? I know that this is not easy and this is only a simple suggestion But can you imagine that... It would be great  Thank you and keep the great work (pascal rocks  ) P.S. I have already find pascal compilers for microcontrollers but it would be easier if you were using one programming environment and not forced to learn all the little differences for the one compiler to the other. P.S.2 Excuse me for my bad English ---------------------------------------------------------------------- Marc · 2009-03-01 22:04 fpc runs only on 32bits+ CPUs (so not on a z80 ) ---------------------------------------------------------------------- arximidis · 2009-03-01 22:52 Yes Marc, you have a point there. This is a bad limitation. Even so you can find, for example, 32bit PIC microcontrollers from Microchip (That would be amazing to see   ) I already have find freeware 8bit pascal compilers and I am looking for opensource compilers. I also know the effort for the 16bit AVR http://wiki.freepascal.org/AVR ---------------------------------------------------------------------- Marc · 2009-03-02 10:54 It's not a bad limitation, it's reality. As soon as someone provides patches for a certain processor and is willing to maintain it, it will be added to fpc. ---------------------------------------------------------------------- Ñuño_Martínez · 2009-03-02 18:16 Quote from: arximidis on March 01, 2009, 07:02:36 pmNow, my suggestion has to do with this: Why not for microcontrollers (e.g. AVR or PIC) or even Z80? Current 32bit microprocessors are much different than old 8bit ones and also than 16bit ones. It should be hard to create a single compiler that can create binaries for both architectures. I'm working on a Z80 Pascal compiler. Currently doesn't have something to show because I just started. I have just a BNF description. ---------------------------------------------------------------------- Troodon · 2009-03-08 21:48 Quote from: Ñuño_Martínez on March 02, 2009, 07:16:05 pmI'm working on a Z80 Pascal compiler. How about HiSoft Pascal for ZX Spectrum? (http://www.hisoft.co.uk) ---------------------------------------------------------------------- Marc · 2009-03-09 11:26 Quote from: Troodon on March 08, 2009, 10:48:12 pmHow about HiSoft Pascal for ZX Spectrum? (http://www.hisoft.co.uk) That was my first pascal compiler ---------------------------------------------------------------------- Troodon · 2009-03-09 14:24 Quote from: Marc on March 09, 2009, 12:26:15 pm That was my first pascal compiler Mine too! ---------------------------------------------------------------------- Ñuño_Martínez · 2009-03-16 12:24 Quote from: Troodon on March 08, 2009, 10:48:12 pmQuote from: Ñuño_Martínez on March 02, 2009, 07:16:05 pmI'm working on a Z80 Pascal compiler. How about HiSoft Pascal for ZX Spectrum? (http://www.hisoft.co.uk) You said it: i'ts a ZX Spectrum compiler and I want an MSX one. (And the site seems to be empty ) Also I want to make a compiler so... ---------------------------------------------------------------------- Troodon · 2009-03-16 13:33 Quote from: Ñuño_Martínez on March 16, 2009, 01:24:52 pmi'ts a ZX Spectrum compiler and I want an MSX one Here you go: Hisoft MSX Pascal V1.0. Quote from: Ñuño_Martínez on March 16, 2009, 01:24:52 pmAnd the site seems to be empty I guess you mean HiSoft Pascal is unavailable for download at the HiSoft Systems web site, which is not surprising. But Google is your friend. Also, search Wikipedia for HiSoft and you'll find the World of Spectrum HiSoft archive. ---------------------------------------------------------------------- Ñuño_Martínez · 2009-03-17 10:45 Quote from: Troodon on March 16, 2009, 02:33:17 pmQuote from: Ñuño_Martínez on March 16, 2009, 01:24:52 pmi'ts a ZX Spectrum compiler and I want an MSX one Here you go: Hisoft MSX Pascal V1.0. Quote from: Ñuño_Martínez on March 16, 2009, 01:24:52 pmAnd the site seems to be empty I guess you mean HiSoft Pascal is unavailable for download at the HiSoft Systems web site, which is not surprising. But Google is your friend. Also, search Wikipedia for HiSoft and you'll find the World of Spectrum HiSoft archive. Thanks for the links. Anyway, pay 18'95€ for a dead computer system? I think I can wait 'till my compiler becomes usable. ---------------------------------------------------------------------- Zaher · 2009-03-17 14:49 My ask why you still have program for this old computers? [Off topic] I have old experience with ZX Spectrum+ , and i still have it in the original box, and have emulator on my I-Mate mobile PocketClive just because it is my first love ---------------------------------------------------------------------- Ñuño_Martínez · 2009-03-17 15:19 Quote from: Zaher on March 17, 2009, 03:49:02 pmMy ask why you still have program for this old computers? Touché ---------------------------------------------------------------------- arximidis · 2009-03-19 10:28 Quote from: Ñuño_Martínez on March 02, 2009, 07:16:05 pmQuote from: arximidis on March 01, 2009, 07:02:36 pmNow, my suggestion has to do with this: Why not for microcontrollers (e.g. AVR or PIC) or even Z80? Current 32bit microprocessors are much different than old 8bit ones and also than 16bit ones. It should be hard to create a single compiler that can create binaries for both architectures. I'm working on a Z80 Pascal compiler. Currently doesn't have something to show because I just started. I have just a BNF description. Hey, this is nice! I already have a Z80 CPU and I am thinking of building a simple system with it. Maybe your compiler is the answer to my problems (I know how to program Z80 with assembly but I am avoiding it) Question: Gameboy advance has a 32bit ARM processor. Can I use freepascal (Lazarus) to program it? ---------------------------------------------------------------------- arximidis · 2009-03-19 11:19 How do I write programs with your compiler ? When I am writing the code program test;  begin  end. and compile it I get NO ERROR messages and the asm file is created! But when I am writing program test;    var i:integer;  begin  end. or program test;  begin    var i:integer;  end. I get a syntax error message ---------------------------------------------------------------------- Zaher · 2009-03-19 12:39 program test;  begin    var i:integer;  end. That is error in turbo pascal or delphi. ---------------------------------------------------------------------- arximidis · 2009-03-19 17:32 Quote from: Zaher on March 19, 2009, 01:39:55 pm program test;  begin    var i:integer;  end. That is error in turbo pascal or delphi. Yes I know, that is why I wrote first the correct one! I was experimenting… edit: I get the following error 'BEGIN' expected but 'VAR' found even when I am writing the code program test;   var i:integer; begin   i:=0; end. I get the same error ---------------------------------------------------------------------- Ñuño_Martínez · 2009-03-22 11:48 Quote from: arximidis on March 19, 2009, 12:19:42 pmHow do I write programs with your compiler ? Did you read the documentation? My compiler is in a very early stage of development. It only compiles programs with the form: Code: [Select]PROGRAM example; BEGIN   ASM       END; END. Everything else will return a syntax error. Now I'm busy but when I have some free time I'm working in the next step (procedure calling without parameters or return values). You can get the latest version from the Z80-Pascal's Subversion page at the SourceForge's servers. ---------------------------------------------------------------------- Ñuño_Martínez · 2009-03-22 11:59 Quote from: arximidis on March 19, 2009, 11:28:41 amQuestion: Gameboy advance has a 32bit ARM processor. Can I use freepascal (Lazarus) to program it? Yes, you can use FreePascal to create Gameboy's executables. A programmer named Francesco did a great work with it. Visit this page to see it. You can also join the Pascal Game Development forum to look for more information and ask your questions. ---------------------------------------------------------------------- arximidis · 2009-03-22 12:03 Thank you for your respond Ñuño_Martínez Unfortunately the documentation is in a format I can't read (due to lack of the software) I read only the html files and I didn't find how the syntax should be So, as far I can see, you only support programs written in assembly language. I hope you continue your project, because I am thinking of using your compiler to a simple Z80 machine I am designing. All other pascal compilers I found until now are not free ---------------------------------------------------------------------- arximidis · 2009-03-22 12:06 Quote from: Ñuño_Martínez on March 22, 2009, 12:59:22 pmQuote from: arximidis on March 19, 2009, 11:28:41 amQuestion: Gameboy advance has a 32bit ARM processor. Can I use freepascal (Lazarus) to program it? Yes, you can use FreePascal to create Gameboy's executables. A programmer named Francesco did a great work with it. Visit this page to see it. You can also join the Pascal Game Development forum to look for more information and ask your questions. Great, Thanks!