SourceForge logo
SourceForge logo

pascal p5c Files

fast, portable Pascal compiler using gnu c as intermediate code

Brought to you by: trevorbl

The interactive file manager requires Javascript. Please enable it or use sftp or scp.
You may still browse the files here.

Download Latest Version pascal-p5c-code-r76.zip (3.9 MB)
Email in envelope

Get an email when there's a new version of pascal p5c

Home
Name Modified Size InfoDownloads / Week
p5x 2021年04月01日
pascal-p5c-code-r76.zip 2023年06月13日 3.9 MB
pascal-p5c-code-r67.zip 2023年06月13日 3.6 MB
0
p5c-good.c 2023年06月13日 641.7 kB
0
pcom.pas 2023年06月13日 511.6 kB
0
tp5c.pas 2023年06月13日 294.0 kB
0
iso7185pat.pas 2023年06月13日 131.2 kB
0
changes.txt 2023年06月13日 8.6 kB
0
README 2023年06月13日 5.2 kB
0
patCheck.awk 2021年04月01日 8.1 kB
0
sys.inc.pas 2021年04月01日 910 Bytes
0
r 2021年04月01日 6.3 kB
0
p5c.h 2021年04月01日 3.0 kB
0
guide.txt 2021年04月01日 134.3 kB
0
clib.inc.pas 2021年04月01日 3.3 kB
0
pascal-p5c-code-r51.zip 2019年02月12日 3.6 MB
0
pascal-p5c-code-41.zip 2018年05月11日 2.6 MB
Totals: 17 Items 15.5 MB 6
Pascal p5c release 1.3.1
This is a version of p5 pascal that is
 - easily portable
 - full iso standard (level 1) and
 - generates fast programs.
It can achieve this because it generates gnu c code instead of p code.
It's portable because you need only gnu c to get it running on your system.
gnu c is very widely supported and distributed, so is available just about
everywhere.
It is fast not only because it generates executable code, but it uses gcc
which is known for producing highly optimised code.
It's got arbitrary set limits and is fully standard, so it's got conformant
 arrays, function paramaters and all that.
p5c is derived from pascal p5, which is a freely available, well documented
and fully standard pascal compiler.
See guide.txt for more.
This version has faster compile speed, better error handling, more tests,
bug fixes and many minor improvements. see changes.txt for details
getting started
===============
step 1: get gcc
 gcc is widely supported and distributed.
 To get gcc for windows, search for mingw, cygwin or delorie.
 Linux and other unix type systems likely have gcc already installed.
step 2: compile p5c.c
 make sure p5c.h is in the current directory or where gcc can find it
 use something like this command in the gnu bash shell:
 gcc -I . -o p5c p5c.c -lm
 Other systems should have similar commands.
step 3: compile your pascal program
 for p5c, compiling is a 2 stage process, the first is to compile the pascal
 into c, the second is to compile the c code into an executable.
 eg, for the obligatory hello world:
 p5c hello.pas hello.c > hello.lst
 gcc -lm -I . -o hello hello.c
step 4: run the program
 ./hello
status
======
p5c is now complete and should compile all programs that conform to level 1
of the ISO 7185:1990 pascal standard. It also rejects nearly all
nonconforming programs, either at compile time or run time
See the file changes.txt for a description of changes since the previous
version of p5c.
Version:
========
This is derived from the latest version of p5, taken from the git repository
As stated above, p5c is based on pascal p5, which is a freely available,
well documented and fully standard pascal compiler.
You can get it from sourceforge.net/projects/pascalp5
The following excellent descrption of p5 is taken from a dos version of p5.
Author:
=====
 This was original Pascal-P4 from ETH Zurich in the '70s, a subset
Pascal bytecode compiler and interpreter widely distributed as help in
porting Pascal to other architectures. There were various ETH Zurich
people involved (as listed in sources). Later, Steven Pemberton wrote
a book documenting it, which is also online nowadays. In recent years
(circa 2008-10), it was brought up to full "classic" (ISO 7185) Pascal
by Scott Moore (of IP Pascal).
License:
=====
 According to Steven Pemberton, Niklaus Wirth told him way back when
that it was "public domain". Scott Moore has also put his improvements
into the public domain. Scott is also pretty diligent about getting
permission for docs (and has tons more of it on his website).
[Similarly, all additions for p5c are in the public domain.]
Dialect:
=====
 This is not Turbo/Borland/Delphi compatible at all. All of the
(biased) complaints from Kernighan (BWK) still apply, more or less:
no dynamic arrays (or strings), no default (else) in case statements,
no getting or writing to raw addresses or untyped pointer variables,
no units or modules or include files, no named files, etc. This is 99%
the exact same language as originally defined by Wirth (and later
slightly clarified in the ISO 7185 standard circa 1982). It is
probably most accurate to say this language was designed for efficient
compilation, strong typing, structured programming, and especially
teaching algorithms and dynamic data structures (as per the book of
similar name by Wirth). However, there is an additional implementation
limitation here of only reading from a "prd" and writing to "prr"
external files (in order to self compile). This is somewhat annoying
but may be lifted if P6 is ever begun. You can work around it (barely)
if direly needed by inserting the input after the bytecode (see
pintm). There were intentionally no language extensions added to this
compiler.
[Edit:
There is no such restriction in p5c, it can easily read and write external
files.
See tfile.pas & notes in guide.txt
]
Legacy:
=====
 There are not a lot of truly conforming ISO 7185 compilers left in
the world. Pascal is over 40 years old by now, but what is left of it
in popular use is usually some heavily-modified derivative (e.g.
FreePascal). Even Wirth himself would probably suggest instead using
one of his later languages (e.g. Oberon-07). The newsgroup
news://comp.lang.pascal.ansi-iso is a ghost town, but if really
curious, feel free to read up on stuff there. Personally, I'd suggest
just reading Scott Moore's website, Wirth's A+D=P book, Doug Cooper's
books, Pemberton's book, or similar. So this is probably most
interesting to those with a deep historical bent or those who are
curious to see how it all began.
Source: README, updated 2023年06月13日
You Might Also Like
The All-in-One Commerce Platform for Businesses - Shopify Icon
The All-in-One Commerce Platform for Businesses - Shopify

Shopify offers plans for anyone that wants to sell products online and build an ecommerce store, small to mid-sized businesses as well as enterprise

Shopify is a leading all-in-one commerce platform that enables businesses to start, build, and grow their online and physical stores. It offers tools to create customized websites, manage inventory, process payments, and sell across multiple channels including online, in-person, wholesale, and global markets. The platform includes integrated marketing tools, analytics, and customer engagement features to help merchants reach and retain customers. Shopify supports thousands of third-party apps and offers developer-friendly APIs for custom solutions. With world-class checkout technology, Shopify powers over 150 million high-intent shoppers worldwide. Its reliable, scalable infrastructure ensures fast performance and seamless operations at any business size.
Learn More
The Secure And Reliable File Transfer Solution That You Control. Icon
The Secure And Reliable File Transfer Solution That You Control.

Helping IT professionals responsibly secure the world's data

Cerberus offers a variety of secure file transfer solutions to fit businesses of any size or business sector, including finance, technology, education, publishing, law offices, local, state, and federal government agencies, hospitals and many more.
Learn More
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X

Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /