"norayr" wrote in message:
> hello there
> I have to ay that deal with pascal 3.0 only few days ago.
> I have searched a compiler, that will make as much as
> possible small code.
You should be trying assembly, if you want small code!
> So, I tried HiSoft Pascal for ZX Spectrum, Free Pascal,
> all versions of Turbo Pascal for DOS and even Microsoft
> Quick pascal.
> So, I compile my program with Pascal 5.5 - the only
> compiler that build simple 'hello, world' program in
> about 1,5 kb of size.
The problem associated with Turbo Pascal 3.x,
is that when compiling COM files all the routines
which are build in with TP 3 are included, hence
larger files. My simple Hello world programs are
worst in Turbo Pascal 3 for PC-DOS as that has
the most additional features, where's the CP/M-80,
CP/M-86 & MS-DOS versions have smaller COM
files (or in case of CP/M-86 they are CMD files).
Because TP 5.5 can produce smaller files, it's due
to the fact that most of the code is included from
library files & at which TP 5.5 selects the approrate
code which needs to be used, which is one of the
biggest limits in TP 3, because it will just add
whatever you're not using.
> Pascal 3.0 built as far as I remember 3 kb binary
> (com file), so I didn't use it. By the way com files
> made with pascal 3.0 are slower than exe files made
> by pascal 5.5 (I didn't counted it, but runned both
> programs on a very loaded with calculatings (render)
> machine, and noticed thatcom file (pascal 3.0) are
> slower than exe file made with pascal 5.5)
Turbo Pascal 3 has much bigger files around 8,9 or 10
depending on the version you're using.
You're not explaining yourself clearly in terms of what's
faster, the actual compiling of the files or the actual
speed at which the code runs (in those produced COMs).
I would assume the later, because of the extra overlay
which has been included, it takes more time to actually
run (due to the size). However, if you're talking about
more complicated programs where mathathical
problems exist, then TP 5.5 has an edge (as does some
other interpreted languages as I'll discuss further down).
What I found with TP 5.5 is with the inclusion of additional
features such as 'INC(count)' programs much faster than
using the standard 'count:=count+1', so while they do the
same thing, one works faster than the other. I have also
discovered that in the 8bit version of TP 3, to calculate the
COS & SIN of something actually takes more time than to
actually setup an array with the values already in it,
unfortunately the downside to that array is actually going
through the process, particularly when it's a huge one.
My studies into this has shown that when calculating the
COS & SIN in Turbo Pascal 3, it has been seriously slower
than using the interpreted BASIC equivalant on the same
computer. Further research into why it was like this was
because of the BASICs ability to automatically convert
a decimal number into an integer, where's Turbo Pascal
cannot do this & must be told to through the use of
ROUND or TRUNC. At the moment I haven't looked into
seeing if the COS & SIN only work slower on the IBM
versions of TP 3, but since TP 5.5 has the same issues
of automatically converting numbers, I'd say that COS &
SIN would be about the same & that INC is one of the
few things which beats TP 3 hands down.
As for the downside to all of this, while Turbo Pascal 3
isn't the best for figures & handles the task better using
arrays, it's the best thing for doing some Turbo Pascal
programming in CP/M! (unless someone can show that
TP 1 maybe better - certainally it would be for smaller
COMs), TP 5.5 has that disadvantage where it wasn't
available.
Cheers,
CP/M User