<s>
IP	B-Language
Pascal	I-Language
is	O
an	O
implementation	O
of	O
the	O
Pascal	B-Application
programming	I-Application
language	I-Application
using	O
the	O
IP	O
portability	O
platform	O
,	O
a	O
multiple	O
machine	O
,	O
operating	O
system	O
and	O
language	O
implementation	O
system	O
.	O
</s>
<s>
It	O
implements	O
the	O
language	O
"	O
Pascaline	O
"	O
(	O
named	O
after	O
Blaise	O
Pascal	B-Application
's	O
calculator	O
)	O
,	O
and	O
has	O
passed	O
the	O
Pascal	B-Application
Validation	O
Suite	O
.	O
</s>
<s>
IP	B-Language
Pascal	I-Language
implements	O
the	O
language	O
"	O
Pascaline	O
"	O
(	O
named	O
after	O
Blaise	O
Pascal	B-Application
's	O
calculator	O
)	O
,	O
which	O
is	O
a	O
highly	O
extended	O
superset	O
of	O
ISO	B-Application
7185	I-Application
Pascal	B-Application
.	O
</s>
<s>
It	O
adds	O
modularity	B-Architecture
with	O
namespace	O
control	O
,	O
including	O
the	O
parallel	O
tasking	O
monitor	O
concept	O
,	O
dynamic	B-Data_Structure
arrays	I-Data_Structure
,	O
overloads	B-Application
and	O
overrides	O
,	O
objects	O
,	O
and	O
a	O
host	O
of	O
other	O
minor	O
extensions	O
to	O
the	O
language	O
.	O
</s>
<s>
IP	O
implements	O
a	O
porting	O
platform	O
,	O
including	O
a	O
widget	B-Library
toolkit	I-Library
,	O
TCP/IP	B-Protocol
library	O
,	O
MIDI	O
and	O
sound	O
library	O
and	O
other	O
functions	O
,	O
that	O
allows	O
both	O
programs	O
written	O
under	O
IP	B-Language
Pascal	I-Language
,	O
and	O
IP	B-Language
Pascal	I-Language
itself	O
,	O
to	O
move	O
to	O
multiple	O
operating	O
systems	O
and	O
machines	O
.	O
</s>
<s>
IP	B-Language
Pascal	I-Language
is	O
one	O
of	O
the	O
only	O
Pascal	B-Application
implementations	O
that	O
still	O
exist	O
that	O
has	O
passed	O
the	O
Pascal	B-Application
Validation	O
Suite	O
,	O
a	O
large	O
suite	O
of	O
tests	O
created	O
to	O
verify	O
compliance	O
with	O
ISO	B-Application
7185	I-Application
Pascal	B-Application
.	O
</s>
<s>
Although	O
Pascaline	O
extends	O
ISO	B-Application
7185	I-Application
Pascal	B-Application
,	O
it	O
does	O
not	O
reduce	O
the	O
type	O
safety	O
of	O
Pascal	B-Application
(	O
as	O
many	O
other	O
dialects	O
of	O
Pascal	B-Application
have	O
by	O
including	O
so	O
called	O
"	O
type	O
escapes	O
"	O
)	O
.	O
</s>
<s>
The	O
functionality	O
of	O
the	O
language	O
is	O
similar	O
to	O
that	O
of	O
C#	B-Application
(	O
which	O
implements	O
a	O
C++	O
like	O
language	O
but	O
with	O
the	O
type	O
insecurities	O
removed	O
)	O
,	O
and	O
Pascaline	O
can	O
be	O
used	O
anywhere	O
that	O
managed	O
programs	O
can	O
be	O
used	O
(	O
even	O
though	O
it	O
is	O
based	O
on	O
a	O
language	O
30	O
years	O
older	O
than	O
C#	B-Application
)	O
.	O
</s>
<s>
IP	B-Language
Pascal	I-Language
is	O
sold	O
as	O
an	O
implementation	O
of	O
Pascaline	O
,	O
but	O
the	O
language	O
itself	O
can	O
and	O
should	O
be	O
open	O
,	O
and	O
should	O
have	O
quality	O
implementations	O
.	O
</s>
<s>
To	O
that	O
end	O
,	O
the	O
full	O
specification	O
for	O
Pascaline	O
will	O
be	O
published	O
online	O
,	O
and	O
the	O
long-term	O
intention	O
is	O
to	O
create	O
a	O
version	O
of	O
the	O
open	O
source	O
P5	O
compiler-interpreter	O
(	O
an	O
ISO	B-Application
7185	I-Application
version	O
of	O
Wirth	O
's	O
P4	O
compiler-interpreter	O
)	O
which	O
implements	O
Pascaline	O
compliance	O
.	O
</s>
<s>
The	O
value	O
of	O
IP	B-Language
Pascal	I-Language
as	O
a	O
commercial	O
product	O
will	O
be	O
based	O
on	O
the	O
IDE	O
and	O
compiler-encoder	O
resources	O
of	O
that	O
system	O
.	O
</s>
<s>
A	O
newer	O
version	O
of	O
Pascaline	O
exists	O
as	O
Pascal-P6	O
,	O
part	O
of	O
the	O
Pascal-P	O
series	O
.	O
</s>
<s>
IP	B-Language
Pascal	I-Language
starts	O
with	O
ISO	B-Application
7185	I-Application
Pascal	B-Application
(	O
which	O
standardized	O
Niklaus	O
Wirth	O
's	O
original	O
language	O
)	O
,	O
and	O
adds	O
:	O
</s>
<s>
module	B-Architecture
mymod(input, output )	O
;	O
</s>
<s>
Modules	B-Architecture
have	O
entry	O
and	O
exit	O
sections	O
.	O
</s>
<s>
Declarations	O
in	O
modules	B-Architecture
form	O
their	O
own	O
interface	O
specifications	O
,	O
and	O
it	O
is	O
not	O
necessary	O
to	O
have	O
both	O
interface	O
and	O
implementation	O
sections	O
.	O
</s>
<s>
If	O
a	O
separate	O
interface	O
declaration	O
file	O
is	O
needed	O
,	O
it	O
is	O
created	O
by	O
stripping	O
the	O
code	O
out	O
of	O
a	O
module	B-Architecture
and	O
creating	O
a	O
"	O
skeleton	O
"	O
of	O
the	O
module	B-Architecture
.	O
</s>
<s>
This	O
is	O
typically	O
done	O
only	O
if	O
the	O
object	O
for	O
a	O
module	B-Architecture
is	O
to	O
be	O
sent	O
out	O
without	O
the	O
source	O
.	O
</s>
<s>
Modules	B-Architecture
must	O
occupy	O
a	O
single	O
file	O
,	O
and	O
modules	B-Architecture
reference	O
other	O
modules	B-Architecture
via	O
a	O
uses	O
or	O
joins	O
statement	O
.	O
</s>
<s>
To	O
allow	O
this	O
,	O
a	O
module	B-Architecture
must	O
bear	O
the	O
same	O
name	O
as	O
its	O
file	O
name	O
.	O
</s>
<s>
The	O
uses	O
statement	O
indicates	O
that	O
the	O
referenced	O
module	B-Architecture
will	O
have	O
its	O
global	O
declarations	O
merged	O
with	O
the	O
referencing	O
module	B-Architecture
,	O
and	O
any	O
name	O
conflicts	O
that	O
result	O
will	O
cause	O
an	O
error	O
.	O
</s>
<s>
The	O
joins	O
statement	O
will	O
cause	O
the	O
referenced	O
module	B-Architecture
to	O
be	O
accessible	O
via	O
the	O
referencing	O
module	B-Architecture
,	O
but	O
does	O
not	O
merge	O
the	O
name	O
spaces	O
of	O
the	O
two	O
modules	B-Architecture
.	O
</s>
<s>
Instead	O
,	O
the	O
referencing	O
module	B-Architecture
must	O
use	O
a	O
so-called	O
"	O
qualified	O
identifier	O
"	O
:	O
</s>
<s>
A	O
program	O
from	O
ISO	B-Application
7185	I-Application
Pascal	B-Application
is	O
directly	O
analogous	O
to	O
a	O
module	B-Architecture
,	O
and	O
is	O
effectively	O
a	O
module	B-Architecture
without	O
an	O
exit	O
section	O
.	O
</s>
<s>
Because	O
all	O
modules	B-Architecture
in	O
the	O
system	O
are	O
"	O
daisy	O
chained	O
"	O
such	O
that	O
each	O
are	O
executed	O
in	O
order	O
,	O
a	O
program	O
assumes	O
"	O
command	O
"	O
of	O
the	O
program	O
simply	O
because	O
it	O
does	O
not	O
exit	O
its	O
initialization	O
until	O
its	O
full	O
function	O
is	O
complete	O
,	O
unlike	O
a	O
module	B-Architecture
which	O
does	O
.	O
</s>
<s>
A	O
process	O
module	B-Architecture
,	O
like	O
a	O
program	O
module	B-Architecture
,	O
has	O
only	O
an	O
initialization	O
section	O
,	O
and	O
runs	O
its	O
start	O
,	O
full	O
function	O
and	O
completion	O
in	O
that	O
section	O
.	O
</s>
<s>
However	O
,	O
it	O
gets	O
its	O
own	O
thread	O
for	O
execution	O
aside	O
from	O
the	O
main	O
thread	O
that	O
runs	O
program	O
modules	B-Architecture
.	O
</s>
<s>
As	O
such	O
,	O
it	O
can	O
only	O
call	O
monitor	O
and	O
share	O
modules	B-Architecture
.	O
</s>
<s>
A	O
monitor	O
is	O
a	O
module	B-Architecture
that	O
includes	O
task	O
locking	B-Operating_System
on	O
each	O
call	O
to	O
an	O
externally	O
accessible	O
procedure	O
or	O
function	O
,	O
and	O
implements	O
communication	O
between	O
tasks	O
by	O
semaphores	O
.	O
</s>
<s>
A	O
share	O
module	B-Architecture
,	O
because	O
it	O
has	O
no	O
global	O
data	O
at	O
all	O
,	O
can	O
be	O
used	O
by	O
any	O
other	O
module	B-Architecture
in	O
the	O
system	O
,	O
and	O
is	O
used	O
to	O
place	O
library	O
code	O
in	O
.	O
</s>
<s>
Because	O
the	O
module	B-Architecture
system	I-Architecture
directly	O
implements	O
multitasking/multithreading	O
using	O
the	O
Monitor	O
concept	O
,	O
it	O
solves	O
the	O
majority	O
of	O
multithreading	O
access	O
problems	O
.	O
</s>
<s>
Data	O
for	O
a	O
module	B-Architecture
is	O
bound	O
to	O
the	O
code	O
with	O
mutexes	B-Operating_System
or	O
Mutually	B-Operating_System
Exclusive	I-Operating_System
Sections	I-Operating_System
.	O
</s>
<s>
Subtasks/subthreads	O
are	O
started	O
transparently	O
with	O
the	O
process	O
module	B-Architecture
.	O
</s>
<s>
Multiple	O
subtasks/subthreads	O
can	O
access	O
monitors	O
or	O
share	O
modules	B-Architecture
.	O
</s>
<s>
A	O
share	O
module	B-Architecture
is	O
a	O
module	B-Architecture
without	O
data	O
,	O
which	O
does	O
not	O
need	O
the	O
locking	B-Operating_System
mechanisms	O
of	O
a	O
monitor	O
.	O
</s>
<s>
In	O
IP	B-Language
Pascal	I-Language
,	O
dynamics	O
are	O
considered	O
"	O
containers	O
"	O
for	O
static	O
arrays	B-Data_Structure
.	O
</s>
<s>
The	O
result	O
is	O
that	O
IP	B-Language
Pascal	I-Language
is	O
perhaps	O
the	O
only	O
Pascal	B-Application
where	O
dynamic	B-Data_Structure
arrays	I-Data_Structure
are	O
fully	O
compatible	O
with	O
the	O
ISO	B-Application
7185	I-Application
static	O
arrays	B-Data_Structure
from	O
the	O
original	O
language	O
.	O
</s>
<s>
Such	O
"	O
container	O
"	O
arrays	B-Data_Structure
can	O
be	O
any	O
number	O
of	O
dimensions	O
.	O
</s>
<s>
module	B-Architecture
test1	O
;	O
</s>
<s>
Overriding	O
a	O
procedure	O
or	O
function	O
in	O
another	O
module	B-Architecture
effectively	O
"	O
hooks	O
"	O
that	O
routine	O
,	O
replacing	O
the	O
definition	O
for	O
all	O
callers	O
of	O
it	O
,	O
but	O
makes	O
the	O
original	O
definition	O
available	O
to	O
the	O
hooking	O
module	B-Architecture
.	O
</s>
<s>
This	O
allows	O
the	O
overriding	O
module	B-Architecture
to	O
add	O
new	O
functionality	O
to	O
the	O
old	O
procedure	O
or	O
function	O
.	O
</s>
<s>
Unlike	O
other	O
languages	O
that	O
implement	O
the	O
concept	O
,	O
Pascaline	O
will	O
not	O
accept	O
overloads	B-Application
as	O
belonging	O
to	O
the	O
same	O
group	O
unless	O
they	O
are	O
not	O
ambiguous	O
with	O
each	O
other	O
.	O
</s>
<s>
This	O
means	O
that	O
there	O
is	O
no	O
"	O
priority	O
"	O
of	O
overloads	B-Application
,	O
nor	O
any	O
question	O
as	O
to	O
which	O
routine	O
of	O
an	O
overload	O
group	O
will	O
be	O
executed	O
for	O
any	O
given	O
actual	O
reference	O
.	O
</s>
<s>
In	O
Pascaline	O
,	O
classes	O
are	O
a	O
dynamic	O
instance	O
of	O
a	O
module	B-Architecture
(	O
and	O
modules	B-Architecture
are	O
a	O
static	O
instance	O
of	O
a	O
class	O
)	O
.	O
</s>
<s>
Classes	O
are	O
a	O
code	O
construct	O
(	O
not	O
a	O
type	O
)	O
that	O
exists	O
between	O
modules	B-Architecture
and	O
procedures	O
and	O
functions	O
.	O
</s>
<s>
Because	O
a	O
class	O
is	O
a	O
module	B-Architecture
,	O
it	O
can	O
define	O
any	O
code	O
construct	O
,	O
such	O
as	O
constants	O
,	O
types	O
,	O
variables	O
,	O
fixed	O
,	O
procedures	O
and	O
functions	O
(	O
which	O
become	O
"	O
methods	O
"	O
)	O
,	O
and	O
make	O
them	O
public	O
to	O
clients	O
of	O
the	O
class	O
,	O
or	O
hide	O
them	O
with	O
the	O
"	O
private	O
"	O
keyword	O
.	O
</s>
<s>
Since	O
a	O
class	O
is	O
a	O
module	B-Architecture
,	O
it	O
can	O
be	O
accessed	O
via	O
a	O
qualified	O
identifier	O
.	O
</s>
<s>
Classes	O
as	O
modules	B-Architecture
have	O
automatic	O
access	O
to	O
their	O
namespace	O
as	O
found	O
in	O
C#	B-Application
and	O
C++	O
in	O
that	O
they	O
do	O
not	O
require	O
any	O
qualification	O
.	O
</s>
<s>
Both	O
overloads	B-Application
and	O
overrides	O
are	O
provided	O
for	O
and	O
object	O
's	O
methods	O
.	O
</s>
<s>
IP	B-Language
Pascal	I-Language
can	O
generate	O
either	O
ISO	O
8859-1	O
mode	O
programs	O
(	O
8-bit	O
characters	O
)	O
or	O
Unicode	O
mode	O
programs	O
by	O
a	O
simple	O
switch	O
at	O
compile	O
time	O
(	O
unlike	O
many	O
other	O
languages	O
,	O
there	O
is	O
no	O
source	O
difference	O
between	O
Unicode	O
and	O
non-Unicode	O
programs	O
)	O
.	O
</s>
<s>
IP	B-Language
Pascal	I-Language
uses	O
a	O
unique	O
stacking	O
concept	O
for	O
modules	B-Architecture
.	O
</s>
<s>
Each	O
module	B-Architecture
is	O
stacked	O
one	O
atop	O
the	O
other	O
in	O
memory	O
,	O
and	O
executed	O
at	O
the	O
bottom	O
.	O
</s>
<s>
The	O
bottom	O
module	B-Architecture
calls	O
the	O
next	O
module	B-Architecture
up	O
,	O
and	O
that	O
module	B-Architecture
calls	O
the	O
next	O
module	B-Architecture
,	O
and	O
so	O
on	O
.	O
</s>
<s>
The	O
cap	O
module	B-Architecture
(	O
sometimes	O
called	O
a	O
"	O
cell	O
"	O
in	O
IP	B-Language
Pascal	I-Language
terminology	O
,	O
after	O
a	O
concept	O
in	O
integrated	O
circuit	O
design	O
)	O
terminates	O
the	O
stack	O
,	O
and	O
begins	O
a	O
return	O
process	O
that	O
ripples	O
back	O
down	O
until	O
the	O
program	O
terminates	O
.	O
</s>
<s>
Each	O
module	B-Architecture
has	O
its	O
startup	O
or	O
entry	O
section	O
performed	O
on	O
the	O
way	O
up	O
the	O
stack	O
,	O
and	O
its	O
finalization	O
or	O
exit	O
section	O
performed	O
on	O
the	O
way	O
back	O
down	O
.	O
</s>
<s>
The	O
most	O
primitive	O
modules	B-Architecture
,	O
such	O
as	O
the	O
basic	O
I/O	O
support	O
in	O
"	O
serlib	O
"	O
,	O
perform	O
their	O
initialization	O
first	O
,	O
and	O
their	O
finalization	O
last	O
,	O
before	O
and	O
after	O
the	O
higher	O
level	O
modules	B-Architecture
in	O
the	O
stack	O
.	O
</s>
<s>
IP	B-Language
Pascal	I-Language
has	O
a	O
series	O
of	O
modules	B-Architecture
(	O
or	O
"	O
libraries	O
"	O
)	O
that	O
form	O
a	O
"	O
porting	O
platform	O
"	O
.	O
</s>
<s>
These	O
libraries	O
present	O
an	O
idealized	O
API	B-General_Concept
for	O
each	O
function	O
that	O
applies	O
,	O
such	O
as	O
files	O
and	O
extended	O
operating	O
system	O
functions	O
,	O
graphics	O
,	O
midi	O
and	O
sound	O
,	O
etc	O
.	O
</s>
<s>
The	O
whole	O
collection	O
forms	O
the	O
basis	O
for	O
an	O
implementation	O
on	O
each	O
operating	O
system	O
and	O
machine	O
that	O
IP	B-Language
Pascal	I-Language
appears	O
on	O
.	O
</s>
<s>
The	O
two	O
important	O
differences	O
between	O
IP	B-Language
Pascal	I-Language
and	O
many	O
other	O
languages	O
that	O
have	O
simply	O
been	O
mated	O
with	O
portable	O
graphics	O
libraries	O
are	O
that	O
:	O
</s>
<s>
IP	B-Language
Pascal	I-Language
uses	O
its	O
own	O
porting	O
platform	O
for	O
its	O
own	O
low	O
level	O
code	O
,	O
so	O
that	O
once	O
the	O
platform	O
is	O
created	O
for	O
a	O
particular	O
operating	O
system	O
and	O
machine	O
,	O
both	O
the	O
IP	O
system	O
and	O
the	O
programs	O
it	O
compiles	O
can	O
run	O
on	O
that	O
.	O
</s>
<s>
This	O
is	O
similar	O
to	O
the	O
way	O
Java	B-Language
and	O
the	O
UCSD	B-Language
Pascal	I-Language
systems	O
work	O
,	O
but	O
with	O
true	O
high	O
optimization	O
compiled	O
code	O
,	O
not	O
interpreted	O
code	O
or	O
"	O
just	O
in	O
time	O
"	O
compiled	O
code	O
.	O
</s>
<s>
Since	O
modules	B-Architecture
can	O
override	O
lower	O
level	O
functions	O
such	O
as	O
Pascal	B-Application
's	O
"	O
write	O
"	O
statement	O
,	O
normal	O
,	O
unmodified	O
ISO	B-Application
7185	I-Application
Pascal	B-Application
programs	O
can	O
also	O
use	O
advanced	O
aspects	O
of	O
the	O
porting	O
platform	O
.	O
</s>
<s>
This	O
is	O
unlike	O
many	O
or	O
most	O
portable	O
graphics	O
libraries	O
that	O
force	O
the	O
user	O
to	O
use	O
a	O
completely	O
different	O
I/O	O
methodology	O
to	O
access	O
a	O
windowed	O
graphics	O
system	O
,	O
for	O
example	O
C	O
,	O
other	O
Pascals	B-Application
,	O
and	O
Visual	B-Language
Basic	I-Language
.	O
</s>
<s>
IP	O
modules	B-Architecture
can	O
also	O
be	O
created	O
that	O
are	O
system	O
independent	O
,	O
and	O
rely	O
only	O
on	O
the	O
porting	O
platform	O
modules	B-Architecture
.	O
</s>
<s>
The	O
result	O
is	O
that	O
IP	B-Language
Pascal	I-Language
is	O
very	O
highly	O
portable	O
.	O
</s>
<s>
Because	O
IP	B-Language
Pascal	I-Language
modules	B-Architecture
can	O
"	O
override	O
"	O
each	O
other	O
,	O
a	O
graphical	O
extension	O
module	B-Architecture
(	O
or	O
any	O
other	O
type	O
of	O
module	B-Architecture
)	O
can	O
override	O
the	O
standard	O
I/O	O
calls	O
implemented	O
in	O
a	O
module	B-Architecture
below	O
it	O
.	O
</s>
<s>
Thus	O
,	O
paslib	O
implements	O
standard	O
Pascal	B-Application
statements	O
such	O
as	O
read	O
,	O
write	O
,	O
and	O
other	O
support	O
services	O
.	O
</s>
<s>
overrides	O
these	O
services	O
and	O
redirects	O
all	O
standard	O
Pascal	B-Application
I/O	O
to	O
graphical	O
windows	O
.	O
</s>
<s>
Another	O
important	O
difference	O
with	O
IP	B-Language
Pascal	I-Language
is	O
that	O
it	O
uses	O
procedural	O
language	O
methods	O
to	O
access	O
the	O
Windowed	O
graphics	O
library	O
.	O
</s>
<s>
Most	O
graphics	O
toolkits	O
force	O
the	O
use	O
of	O
object-oriented	B-Language
programming	I-Language
methods	O
to	O
the	O
toolkit	O
.	O
</s>
<s>
One	O
reason	O
for	O
this	O
is	O
because	O
Object	B-Language
orientation	I-Language
is	O
a	O
good	O
match	O
for	O
graphics	O
,	O
but	O
it	O
also	O
occurs	O
because	O
common	O
systems	O
such	O
as	O
Windows	O
force	O
the	O
application	O
program	O
to	O
appear	O
as	O
a	O
service	O
program	O
to	O
the	O
operating	O
system	O
,	O
appearing	O
as	O
a	O
collection	O
of	O
functions	O
called	O
by	O
the	O
operating	O
system	O
,	O
instead	O
of	O
having	O
the	O
program	O
control	O
its	O
own	O
execution	O
and	O
call	O
the	O
operating	O
system	O
.	O
</s>
<s>
Object-oriented	B-Language
code	I-Language
often	O
works	O
better	O
with	O
callbacks	O
because	O
it	O
permits	O
an	O
object	O
's	O
methods	O
to	O
be	O
called	O
as	O
callbacks	O
,	O
instead	O
of	O
a	O
programmer	O
having	O
to	O
register	O
several	O
pointers	O
to	O
functions	O
to	O
event	O
handling	O
code	O
,	O
each	O
of	O
which	O
would	O
be	O
an	O
individual	O
callback	O
.	O
</s>
<s>
Object-orientation	O
is	O
a	O
good	O
programming	O
method	O
,	O
but	O
IP	B-Language
Pascal	I-Language
makes	O
it	O
an	O
optional	O
,	O
not	O
a	O
required	O
,	O
methodology	O
to	O
write	O
programs	O
.	O
</s>
<s>
IP	B-Language
Pascal	I-Language
's	O
ability	O
to	O
use	O
procedural	O
methods	O
to	O
access	O
all	O
graphics	O
functions	O
means	O
that	O
there	O
is	O
no	O
"	O
cliff	O
effect	O
"	O
for	O
older	O
programs	O
.	O
</s>
<s>
The	O
compiler	O
started	O
out	O
in	O
1980	O
on	O
Micropolis	O
Disk	O
Operating	O
System	O
,	O
but	O
was	O
moved	O
rapidly	O
to	O
CP/M	B-Application
running	O
on	O
the	O
Z80	B-General_Concept
.	O
</s>
<s>
The	O
original	O
system	O
was	O
coded	O
in	O
Z80	B-General_Concept
assembly	O
language	O
,	O
and	O
output	O
direct	O
machine	O
code	O
for	O
the	O
Z80	B-General_Concept
.	O
</s>
<s>
It	O
was	O
a	O
single-pass	B-Language
compiler	I-Language
without	O
a	O
linker	O
,	O
it	O
included	O
its	O
system	O
support	O
library	O
within	O
the	O
compiler	O
,	O
and	O
relocated	O
and	O
output	O
that	O
into	O
the	O
generated	O
code	O
into	O
the	O
runnable	O
disk	O
file	O
.	O
</s>
<s>
After	O
the	O
compiler	O
was	O
operational	O
,	O
almost	O
exactly	O
at	O
the	O
new	O
year	O
of	O
1980	O
,	O
a	O
companion	O
assembler	O
for	O
the	O
compiler	O
was	O
written	O
,	O
in	O
Pascal	B-Application
,	O
followed	O
by	O
a	O
linker	O
,	O
in	O
Z80	B-General_Concept
assembly	O
language	O
.	O
</s>
<s>
This	O
odd	O
combination	O
was	O
due	O
to	O
a	O
calculation	O
that	O
showed	O
the	O
linker	O
tables	O
would	O
be	O
a	O
problem	O
in	O
the	O
64kb	O
limited	O
Z80	B-General_Concept
,	O
so	O
the	O
linker	O
needed	O
to	O
be	O
as	O
small	O
as	O
possible	O
.	O
</s>
<s>
This	O
was	O
then	O
used	O
to	O
move	O
the	O
compiler	O
and	O
linker	O
Z80	B-General_Concept
source	O
code	O
off	O
the	O
Micropolis	O
assembler	O
(	O
which	O
was	O
a	O
linkerless	O
assembler	O
that	O
created	O
a	O
single	O
output	O
binary	O
)	O
to	O
the	O
new	O
assembler	O
linker	O
system	O
.	O
</s>
<s>
This	O
created	O
a	O
Pascal	B-Application
implementation	O
that	O
benchmarked	O
better	O
than	O
any	O
existing	O
Z80	B-General_Concept
compilers	O
,	O
as	O
well	O
as	O
most	O
8086	O
compilers	O
.	O
</s>
<s>
Unfortunately	O
,	O
at	O
46kb	O
,	O
it	O
also	O
was	O
difficult	O
to	O
use	O
,	O
being	O
able	O
to	O
compile	O
only	O
a	O
few	O
pages	O
of	O
source	O
code	O
before	O
overflowing	O
its	O
tables	O
(	O
this	O
was	O
a	O
common	O
problem	O
with	O
most	O
Pascal	B-Application
implementations	O
on	O
small	O
address	O
processors	O
)	O
.	O
</s>
<s>
Despite	O
this	O
,	O
the	O
original	O
IP	B-Language
Pascal	I-Language
implementation	O
ran	O
until	O
1987	O
as	O
a	O
general	O
purpose	O
compiler	O
.	O
</s>
<s>
In	O
this	O
phase	O
,	O
IP	B-Language
Pascal	I-Language
was	O
C	O
like	O
in	O
its	O
modular	B-Architecture
layout	O
.	O
</s>
<s>
Each	O
source	O
file	O
was	O
a	O
unit	O
,	O
and	O
consisted	O
of	O
some	O
combination	O
of	O
a	O
'	O
program	O
 '	O
module	B-Architecture
,	O
types	O
,	O
constants	O
,	O
variables	O
,	O
procedures	O
or	O
functions	O
.	O
</s>
<s>
As	O
part	O
of	O
the	O
original	O
compiler	O
,	O
a	O
device	O
independent	O
terminal	O
I/O	O
module	B-Architecture
was	O
created	O
to	O
allow	O
use	O
of	O
any	O
serial	O
terminal	O
(	O
similar	O
to	O
Turbo	B-Application
Pascal	I-Application
's	O
CRT	O
unit	O
)	O
,	O
which	O
remains	O
to	O
this	O
day	O
.	O
</s>
<s>
In	O
1985	O
,	O
an	O
effort	O
was	O
begun	O
to	O
rewrite	O
the	O
compiler	O
in	O
Pascal	B-Application
.	O
</s>
<s>
in	O
1987	O
,	O
the	O
Z80	B-General_Concept
system	O
used	O
for	O
IP	O
was	O
exchanged	O
for	O
an	O
80386	O
IBM-PC	O
,	O
and	O
work	O
on	O
it	O
stopped	O
.	O
</s>
<s>
From	O
that	O
time	O
several	O
other	O
,	O
ISO	B-Application
7185	I-Application
standard	O
compilers	O
were	O
used	O
,	O
ending	O
with	O
the	O
SVS	O
Pascal	B-Application
compiler	O
,	O
a	O
32	O
bit	O
DPMI	O
extender	O
based	O
implementation	O
.	O
</s>
<s>
By	O
1993	O
,	O
ISO	B-Application
7185	I-Application
compatible	O
compilers	O
that	O
delivered	O
high	O
quality	O
32	O
bit	O
code	O
were	O
dying	O
off	O
.	O
</s>
<s>
At	O
this	O
point	O
,	O
the	O
choice	O
was	O
to	O
stop	O
using	O
Pascal	B-Application
,	O
or	O
to	O
revive	O
the	O
former	O
IP	B-Language
Pascal	I-Language
project	O
and	O
modernize	O
it	O
as	O
an	O
80386	O
compiler	O
.	O
</s>
<s>
At	O
this	O
point	O
,	O
a	O
Pascal	B-Application
parser	O
,	O
and	O
assembler	O
(	O
for	O
Z80	B-General_Concept
)	O
were	O
all	O
that	O
existed	O
which	O
were	O
usable	O
on	O
the	O
IBM-PC	O
.	O
</s>
<s>
From	O
1993	O
to	O
1994	O
,	O
the	O
assembler	O
was	O
made	O
modular	B-Architecture
to	O
target	O
multiple	O
CPUs	O
including	O
the	O
80386	O
,	O
a	O
linker	O
to	O
replace	O
the	O
Z80	B-General_Concept
assembly	O
language	O
linker	O
was	O
created	O
,	O
and	O
a	O
Pascal	B-Application
compiler	O
front	O
end	O
was	O
finished	O
to	O
output	O
to	O
intermediate	O
code	O
.	O
</s>
<s>
Finally	O
,	O
an	O
intermediate	O
code	O
simulator	O
was	O
constructed	O
,	O
in	O
Pascal	B-Application
,	O
to	O
prove	O
the	O
system	O
out	O
.	O
</s>
<s>
In	O
1994	O
,	O
the	O
simulator	O
was	O
used	O
to	O
extend	O
the	O
ISO	B-Application
7185	I-Application
IP	B-Language
Pascal	I-Language
"	O
core	O
"	O
language	O
to	O
include	O
features	O
such	O
as	O
dynamic	B-Data_Structure
arrays	I-Data_Structure
.	O
</s>
<s>
The	O
system	O
support	O
library	O
was	O
created	O
for	O
IP	B-Language
Pascal	I-Language
,	O
itself	O
in	O
IP	B-Language
Pascal	I-Language
.	O
</s>
<s>
This	O
was	O
an	O
unusual	O
step	O
taken	O
to	O
prevent	O
having	O
to	O
later	O
recode	O
the	O
library	O
from	O
assembly	O
or	O
another	O
Pascal	B-Application
to	O
IP	B-Language
Pascal	I-Language
,	O
but	O
with	O
the	O
problem	O
that	O
both	O
the	O
80386	O
code	O
generator	O
and	O
the	O
library	O
would	O
have	O
to	O
be	O
debugged	O
together	O
.	O
</s>
<s>
At	O
the	O
beginning	O
of	O
1996	O
,	O
the	O
original	O
target	O
of	O
Windows	O
NT	O
was	O
switched	O
to	O
Windows	O
95	O
,	O
and	O
IP	B-Language
Pascal	I-Language
became	O
fully	O
operational	O
as	O
an	O
80386	O
compiler	O
under	O
Windows	O
.	O
</s>
<s>
The	O
system	O
bootstrapped	O
itself	O
,	O
and	O
the	O
remaining	O
Pascal	B-Application
code	O
was	O
ported	O
from	O
SVS	O
Pascal	B-Application
to	O
IP	B-Language
Pascal	I-Language
to	O
complete	O
the	O
bootstrap	O
.	O
</s>
<s>
This	O
process	O
was	O
aided	O
considerably	O
by	O
the	O
ability	O
of	O
the	O
DPMI	O
based	O
SVS	O
Pascal	B-Application
to	O
run	O
under	O
Windows	O
95	O
,	O
which	O
meant	O
that	O
the	O
need	O
to	O
boot	O
back	O
and	O
forth	O
between	O
DOS	O
and	O
Windows	O
95	O
was	O
eliminated	O
.	O
</s>
<s>
In	O
2000	O
,	O
a	O
Linux	B-Application
(	O
Red	O
Hat	O
)	O
version	O
was	O
created	O
for	O
text	O
mode	O
only	O
.	O
</s>
<s>
This	O
implementation	O
directly	O
uses	O
the	O
system	O
calls	O
and	O
avoids	O
the	O
use	O
of	O
glibc	B-Language
,	O
and	O
thus	O
creates	O
thinner	O
binaries	O
than	O
if	O
the	O
full	O
support	O
system	O
needed	O
for	O
C	O
were	O
used	O
,	O
at	O
the	O
cost	O
of	O
binary	O
portability	O
.	O
</s>
<s>
In	O
1997	O
,	O
a	O
version	O
of	O
the	O
terminal	O
library	O
from	O
the	O
original	O
1980	O
IP	B-Language
Pascal	I-Language
was	O
ported	O
to	O
windows	O
,	O
and	O
a	O
final	O
encoder	O
started	O
for	O
the	O
80386	O
.	O
</s>
<s>
In	O
2001	O
,	O
a	O
companion	O
program	O
to	O
IP	B-Language
Pascal	I-Language
was	O
created	O
to	O
translate	O
C	O
header	O
files	O
to	O
Pascal	B-Application
header	O
files	O
.	O
</s>
<s>
This	O
was	O
meant	O
to	O
replace	O
the	O
manual	O
method	O
of	O
creating	O
operating	O
system	O
interfaces	O
for	O
IP	B-Language
Pascal	I-Language
.	O
</s>
<s>
In	O
2003	O
,	O
a	O
fully	O
graphical	O
,	O
operating	O
system	O
independent	O
module	B-Architecture
was	O
created	O
for	O
IP	B-Language
Pascal	I-Language
.	O
</s>
<s>
In	O
retrospect	O
,	O
the	O
biggest	O
error	O
in	O
the	O
Z80	B-General_Concept
version	O
was	O
its	O
single-pass	O
structure	O
.	O
</s>
<s>
The	O
only	O
argument	O
for	O
it	O
was	O
that	O
single-pass	B-Language
compilation	I-Language
was	O
supposed	O
to	O
be	O
faster	O
.	O
</s>
<s>
Further	O
,	O
the	O
single	O
pass	O
aspect	O
slowed	O
or	O
prevented	O
getting	O
the	O
compiler	O
bootstrapped	O
out	O
of	O
Z80	B-General_Concept
assembly	O
language	O
and	O
onto	O
Pascal	B-Application
itself	O
.	O
</s>
<s>
Since	O
the	O
compiler	O
was	O
monolithic	O
,	O
the	O
conversion	O
to	O
Pascal	B-Application
could	O
not	O
be	O
done	O
one	O
section	O
at	O
a	O
time	O
,	O
but	O
had	O
to	O
proceed	O
as	O
a	O
wholesale	O
replacement	O
.	O
</s>
<s>
Another	O
lesson	O
from	O
the	O
Z80	B-General_Concept
days	O
,	O
which	O
was	O
corrected	O
on	O
the	O
80386	O
compiler	O
,	O
was	O
to	O
write	O
as	O
much	O
of	O
the	O
code	O
as	O
possible	O
into	O
Pascal	B-Application
itself	O
,	O
even	O
the	O
support	O
library	O
.	O
</s>
<s>
Having	O
the	O
80386	O
support	O
code	O
all	O
written	O
in	O
Pascal	B-Application
has	O
made	O
it	O
so	O
modular	B-Architecture
and	O
portable	O
that	O
most	O
of	O
it	O
was	O
moved	O
out	O
of	O
the	O
operating	O
system	O
specific	O
area	O
and	O
into	O
the	O
"	O
common	O
code	O
"	O
library	O
section	O
,	O
a	O
section	O
reserved	O
for	O
code	O
that	O
never	O
changes	O
for	O
each	O
machine	O
and	O
operating	O
system	O
.	O
</s>
<s>
At	O
the	O
time	O
,	O
better	O
optimized	O
code	O
was	O
seen	O
to	O
be	O
an	O
enabler	O
to	O
bootstrapping	O
the	O
code	O
in	O
Pascal	B-Application
.	O
</s>
