Compiler "Hello World" Files

Home >> Environment Monitoring Programs >> Compiler "Hello World" Files
Files that can be used as the first step to getting the Free Pascal compiler working on a new system.

New!  We hope to add C and Python examples to this page (similar to what is on this page).

New May 2016 - If you are using Windows you can easily try Linux using LevinUx.

Are you looking for a simple way to see the Free Pascal compiler work on your system? These files give you that opportunity without the need to download and install the entire compiler.

If you get the error message "util ld missing" when compiling on Linux (or "Error: Assembler as not found, switching to external assembling" when compiling on ARM Linux) then you should probably install the binutils package.


Intel i386 systems

Win32 - HelloWorld-fpc-2.4.2.i386-win32.zip 883 KB 13-Nov-2010
New!! Tutorial doc - PDF - web
Unzip the files into a new folder
Open a Command Prompt in the new folder
Compile the program: ppc386 hello
Run the hello program
Previous release - HelloWorld-fpc-2.2.2.i386-win32.zip 778 KB 9-Feb-2009

Win64 - HelloWorld-fpc-2.4.2.i386-win64.zip 847 KB 10-May-2011
Unzip the files into a new folder
Open a Command Prompt in the new folder
Compile the program: ppcrossx64 hello
Run the hello program

Win64 - 64bitShellExt-fpc-2.4.2.i386-win64.zip 3.34 MB 10-May-2011
This small zip can be used to compile a 64-bit DLL according to the Embarcadero CodeCentral item 27554, 64bit Windows Explorer shell extension library.
Unzip the files into a new folder
Open a Command Prompt in the new folder then make the FPC folder current
Compile the 64-bit DLLprogram: compile.bat
Install according to the readme in the CodeCentral file.

DOS - HelloWorld-fpc-2.4.2.i386-dos.zip 5.16 MB 18-Nov-2010
Unzip the files into a new folder
Make \bin\go32v2 the current directory
Compile the program: ppc386 hello
Run the hello program
Note: requires 32-bit extender (cwsdpmi.exe is in the same folder and will be automatically loaded if needed).
New! FPC 3.0 has support for a 16-bit real mode MS-DOS target, so hope to add that here upon final release.

Linux AMD64 - HelloWorld-fpc-2.6.0.x86_64-linux.zip 1.3 MB 8-Mar-2012
Unzip the files into a new folder
Open a terminal in the new folder
Set compiler as executable file: chmod 755 ppcx64
Compile the program: ./ppcx64 hello
Run the hello program: ./hello

Linux - HelloWorld-fpc-2.2.2.i386-linux.tar.gz 993 KB 11-Feb-2009
Untar the files into a new folder
Open a terminal in the new folder
Compile the program: ./ppc386 hello
Run the hello program: ./hello

Possible future additions: Linux kernel modules & Windows & ReactOS usermode applications und kernelmode device drivers


ARM systems

Linux EABI - HelloWorld-fpc-2.6.0.arm-linux-052412.zip 1.1 MB 25-May-2012
Unzip the files into a new folder
Open a terminal in the new folder
Set compiler as executable file: chmod 755 ppcarm
Compile the program: ./ppcarm hello
Run the hello program: ./hello
Previous release - (OABI) HelloWorld-fpc-2.2.2.arm-linux.tar.gz 922 KB 11-Feb-2009

Here is a program I wrote on my Android phone using PascalGUI (it includes Free Pascal 2.6.0 for ARM, on 30 Aug 2015 it has 3.1.1):
var s:string;
begin
writeln( 'Hello World!');
writeln(
'Compiler version: ', {$I %fpcversion%},
'  Target CPU: ', {$I %fpctarget%});
write( 'Enter a string: '); readln( s);
writeln( 'You entered: ', s);
end.

New! Hello World on ARM Android devices

WinCE - since many WinCE devices do not have a command prompt by default, we have released a GUI "hello world" program on the "Easy fpGUI" page.


Please share your ideas, comments and suggestions. Thanks!
-- Paul Breneman

TurboControl.com
Contact information on home page