English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 24 October 2016, 15:14   #1
MoRetro
Registered User

 
Join Date: Dec 2015
Location: Belgium
Posts: 59
Advise on FreePascal on Amiga & other Native Amiga Pascal versions

Hi Guys,

I want to start programming in Pascal for/on the Amiga.
I know that FreePascal can be used for that. Does anyone have experience with FreePascal and is willing to share how he did manage to set it up on PC (crosscompile) and Amiga?

Any other Pascal version that can be advised to me?

All the best,

Last edited by MoRetro; 30 October 2016 at 12:08.
MoRetro is offline  
AdSense AdSense  
Old 24 October 2016, 16:38   #2
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 43
Posts: 916
Send a message via Yahoo to Samurai_Crow
FreePascal is the newest version of the language and implements its own runtime library for cross platform compatibility once the library is fully ported. AROS 68k is better supported by FreePascal than AmigaOS 3, though.

PCQ is ancient as are all the rest for the Amiga but they will work on AmigaOS in a non-portable way.

Last edited by Samurai_Crow; 24 October 2016 at 16:46.
Samurai_Crow is offline  
Old 24 October 2016, 18:18   #3
MoRetro
Registered User

 
Join Date: Dec 2015
Location: Belgium
Posts: 59
Quote:
Originally Posted by Samurai_Crow View Post
FreePascal is the newest version of the language and implements its own runtime library for cross platform compatibility once the library is fully ported. AROS 68k is better supported by FreePascal than AmigaOS 3, though.

PCQ is ancient as are all the rest for the Amiga but they will work on AmigaOS in a non-portable way.
Thanks Samuarai Crow, have you experience with both of them or any other Pascal for Amiga?
Have you setup Freepascal voor Aros68K or Amiga?
Have you used PCQ? Is better than the other Amiga Pascal iterations ?

All the best,
MoRetro is offline  
Old 24 October 2016, 18:31   #4
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 43
Posts: 916
Send a message via Yahoo to Samurai_Crow
PCQ does not implement Pascal 80 fully while Free Pascal implements Object Pascal like Delphi. Both come with AROS Vision's development distribution.
Samurai_Crow is offline  
Old 24 October 2016, 21:42   #5
MoRetro
Registered User

 
Join Date: Dec 2015
Location: Belgium
Posts: 59
Thanks Samurai_Crow
I have usedDelphi in the past from version 1 upto 6. A couple of years back I started using FreePascal on the PC as an alternative to Delphi.

Have you any experience with FreePasacal or PCQ on the Amiga?

All the best,

Last edited by MoRetro; 24 October 2016 at 21:47.
MoRetro is offline  
Old 24 October 2016, 22:07   #6
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,282
I have used Pascal on the Amiga before, I just can't remember which compiler. Kinda feel it was FPC, but I am not sure. Can check this for you.
I didn't crossdev though, I compiled on the Amiga.

I had successfully converted my PC programs to Amiga from back when I was studying Pascal.
Akira is offline  
Old 24 October 2016, 22:49   #7
MoRetro
Registered User

 
Join Date: Dec 2015
Location: Belgium
Posts: 59
Thanks Akira, hope you can find it.
I've done some work in C, but i still prefer Object Pascal (Delphi, FreePascal)
Can't remember where i've read it somewhere, that FreePascal or FPC can be installed on a PC to cross compile.
And now there is an 68K version that can run the Amiga itself.
MoRetro is offline  
Old 25 October 2016, 01:57   #8
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,282
Yeah the way I went through this, was that I was using Borland Pascal on PC, and I had made a bunch of programs for my class, and then I took them to the Amiga and with little modification they basically worked.

They were simple text only programs though, so not much fanciness needed, but they worked pretty much right off the bat which I thought was pretty awesome.

Anyway, I checked, and it seems I used FPC 0.99.5c to compile those files.
http://aminet.net/package/dev/lang/fpc09905c

Seems there are newer versions though:
http://aminet.net/search?query=pascal+fpc

Given the date on my archives, I made this with a bog standard A600. What patience!

Have fun!
Akira is offline  
Old 25 October 2016, 03:57   #9
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,070
If you like Pascal, you might also like Modula-2, for which there are several competent compilers.
idrougge is offline  
Old 25 October 2016, 09:51   #10
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 43
Posts: 916
Send a message via Yahoo to Samurai_Crow
https://blog.alb42.de/2016/10/24/back-to-workbench-1-3/ has news about AmigaOS support for FreePascal's latest version! Also, FPC stands for FreePascal Compiler and is an early version of FreePascal.

I compiled some example programs with PCQ back in the day. It doesn't do forward declarations of pointers like normal Pascal requires so I didn't give it any more consideration. It doesn't satisfy the Pascal standard and doesn't support Object Pascal. Don't consider using PCQ for any new code at all.
Samurai_Crow is offline  
Old 25 October 2016, 12:54   #11
ALB42
Registered User

 
Join Date: Oct 2016
Location: Berlin
Posts: 15
Hi,

Amiga 68k support is available the in the latest FreePascal Version 3.0.0+ (Latest Development Version is 3.1.1)
Check out Latest development snapshots
That means all current FreePascal features are directly available on our beloved Amiga (Objects, classes, inheritance, templates, operator overloading, RTTI and and and... )

Personally, I use Cross-compiling from Linux, Check the
Virtual Lazarus for a ready to use Virtual machine, able to write and cross compile applications for all Amiga-style systems.

Freepascal can be used to write console programs, GUI programs with any type of GUI set available on Amiga (MUI, triton, gadtools) or even source compatible GUIs with Windows/Linux using LCL (Lazarus component library)

Please note, current implementation needs AmigaOS3 and a lot of RAM, the precompiled compiler and units need a 68020 processor.

The blog Entry about OS1.3 with 68000 is just a showcase, currently not possible to use.
ALB42 is offline  
Old 25 October 2016, 20:02   #12
MoRetro
Registered User

 
Join Date: Dec 2015
Location: Belgium
Posts: 59
Quote:
Originally Posted by idrougge View Post
If you like Pascal, you might also like Modula-2, for which there are several competent compilers.
Thanks idrougge,
I will first take Pascal path for now, once i've done that i can look further for Modula. I know that modula is the successor of Pascal and also made by Niklaus Wirth. But i never tried it, so in the future maybe

Quote:
Originally Posted by Samurai_Crow View Post
https://blog.alb42.de/2016/10/24/back-to-workbench-1-3/ has news about AmigaOS support for FreePascal's latest version! Also, FPC stands for FreePascal Compiler and is an early version of FreePascal.

I compiled some example programs with PCQ back in the day. It doesn't do forward declarations of pointers like normal Pascal requires so I didn't give it any more consideration. It doesn't satisfy the Pascal standard and doesn't support Object Pascal. Don't consider using PCQ for any new code at all.
Thanks for info Samurai_Crow and for pointing me to ALB42.
For know i will start with FreePascal and Lazarus because as you're mentioning that the other Amiga Pascal iterations like PCQ are not following the standard.

Quote:
Originally Posted by ALB42 View Post
Hi,

Amiga 68k support is available the in the latest FreePascal Version 3.0.0+ (Latest Development Version is 3.1.1)
Check out Latest development snapshots
That means all current FreePascal features are directly available on our beloved Amiga (Objects, classes, inheritance, templates, operator overloading, RTTI and and and... )

Personally, I use Cross-compiling from Linux, Check the
Virtual Lazarus for a ready to use Virtual machine, able to write and cross compile applications for all Amiga-style systems.

Freepascal can be used to write console programs, GUI programs with any type of GUI set available on Amiga (MUI, triton, gadtools) or even source compatible GUIs with Windows/Linux using LCL (Lazarus component library)

Please note, current implementation needs AmigaOS3 and a lot of RAM, the precompiled compiler and units need a 68020 processor.

The blog Entry about OS1.3 with 68000 is just a showcase, currently not possible to use.
Thank you ALB42 for the massive information on Freepascal and Lazarus.
I will certainly try your virtual Lazarus if it runs in Oracle VM VirtualBox.

Later on I will also try to install FreePascal 68k on the Amiga and see what it can. First in WinUAE and than on my A600 Vampire 2.



All the best,

Last edited by MoRetro; 05 March 2017 at 21:01.
MoRetro is offline  
Old 25 October 2016, 20:49   #13
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,052
just installed FCP 3.1.1 and compiled the windowtest.pas ( in example folder)
running here kick/wb 3.1 030/882 on rtg p96 screen.
look at the gui, first time i thought i started a dos emulator

*image removed to free some bytes*

Last edited by emufan; 12 December 2016 at 22:23.
emufan is offline  
Old 26 October 2016, 09:40   #14
ALB42
Registered User

 
Join Date: Oct 2016
Location: Berlin
Posts: 15
@MoRetro: I would be very interested in the results on the Vampire 2. I never tested on them, I always thought about to buy one to make some tests, but the delivery times are too long atm.
If you have some questions, do not hesitate to ask. ;-)

@emufan: Hehe, yes thats the FP-IDE which is made to look like Borland Pascal back in the DOS era. It's working rather nicely, especially if your are used to the key combinations (there are two different sets included). But nowadays I mostly use the shell fpc compiler ;-) to build my project, or as mentioned already the cross compiler.

Have fun ;-)
ALB42 is offline  
Old 26 October 2016, 11:18   #15
MoRetro
Registered User

 
Join Date: Dec 2015
Location: Belgium
Posts: 59
@emufan: Thanks for sharing your first FreePascal experience.
I hope I can try this also asap

@ALB42: Certainly I will share my findings when I've done the tests on the Vampire 2.
Thanks for offering assistance on the subject.

All the best,
MoRetro is offline  
Old 26 October 2016, 16:09   #16
MoRetro
Registered User

 
Join Date: Dec 2015
Location: Belgium
Posts: 59
Hi ALB42,

I'm trying to use your VMPlayer file in VirtualBox but i'm getting some problems.
Just After the GNU GRUB screen with 2 startup options:
- Trisquel GNU/Linux -> Reboots after a couple of sconds. See Webm screenrecording file in attachment.
- Advanced options for Trisquel GNU/Linux -> asks for a password.

What are the hardware settings of your VM:
- RAM?
- Is the Linux 32 or 64 bit?
- Graphic mem
- network

Thanks in advance,


All the best
Attached Files
File Type: 7z Lazurus 68K DEV-2016-10-26T12-57-37-499047700Z.7z (327.7 KB, 29 views)
MoRetro is offline  
Old 26 October 2016, 22:56   #17
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,052
@ALB42: i wasnt aware the gui can be pimped to look like this, somewhat unique

btw: i made those addition to my s:user-startup, after extracting fpc-3.1.1.m68k-amiga.20160410.lha to my SYS: partition:

Code:
;BEGIN FreePascal
Assign FreePascal: SYS:pp
Assign PP: SYS:pp

If Exists FreePascal:bin/m68k-amiga
  Path ADD FreePascal:bin/m68k-amiga
EndIf
;END FreePascal
i didnt tested the vmware based ide, so i cannot help here.
emufan is offline  
Old 27 October 2016, 23:28   #18
MoRetro
Registered User

 
Join Date: Dec 2015
Location: Belgium
Posts: 59
@emufan
Thanks, I used your User-Startup settings.
The windowstest file compile good.

@ALB42
I tried to compile the Mines.lpr but get a compile error: 'Can't find unit interface used by Mines.'
See attachment

All the best,
Attached Thumbnails
Click image for larger version

Name:	FP Compile error.png
Views:	65
Size:	55.7 KB
ID:	50639  

Last edited by MoRetro; 01 November 2016 at 13:23.
MoRetro is offline  
Old 28 October 2016, 06:05   #19
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,052
i now found Mines example and i have no clue what to do, i get the same error message

I have a similiar problem, with Snowflakes example.
it says it cannot find unit systemvartags.pas, so compile failes,
snoopdos lists, it actually found systemvartags.ppu.
in the same folder there is systemvartags.o too, but not systemvartags.pas.
any idea?

Last edited by emufan; 28 October 2016 at 15:50.
emufan is offline  
Old 28 October 2016, 10:36   #20
ALB42
Registered User

 
Join Date: Oct 2016
Location: Berlin
Posts: 15
uhh so many thngs going on here, sorry I'm not much around in this Forum so my answers are a little bit delayed.

@MoRetro
hmm no idea about VirtualBox. It's a 32Bit Machine, 1-2 GB Ram should be enough, network and so on I don't know.
Any particuallar reason to not use VMWare? I used VB before and found VMWare much more reliable and compatible, especially because I use Linux as host VirtualBox is REALLY Slow

About the missing "Interface" unit, that means that is a Lazarus/LCL application, not meant to be edited by the FP-Editor (Even possible of course). (That also means the Mines program can be compiled for Windows and Linux also, and look rather the same like: https://blog.alb42.de/2015/12/23/bring-it-together/ )
You need the path to the LCL units.
If you use the command line compiler it should work out of the Box

fpc Mines.lpr

if you also want to use the FP-Editor you have to add the path to LCL units to the searchpath of the Editor. Menu Options -> Directories Tab "Units"
add the two directories:

FreePascal:lcl
FreePascal:lcl/*

@emufan:
hmm that means it's a rather old source, systemvartags is obsolete and not needed anymore. (You could try to just comment it out, but I'm not sure if it will work then, many changes are made since this version)
ALB42 is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Eye of the Beholder 1 & 2 AGA Versions - An Amiga Forever install guide! Neil79 support.Amiga Forever 9 20 May 2016 04:57
[WANTED] Murders in Space Logbook and Knight Orc Novella & Playguide, Amiga versions. BarryB MarketPlace 0 22 June 2015 02:07
Amiga 500 and gvp 500 hd advise.. 0Danne0 support.Hardware 5 27 February 2014 13:15
Amiga native frame rates mark_k support.WinUAE 6 25 January 2013 15:56
Amiga CD32 Native Resolution? xazarus New to Emulation or Amiga scene 13 21 October 2008 00:54

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:07.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.43140 seconds with 15 queries