A digression
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.fortran Profile…
 Up
A digression         


Author: Terence
Date: Apr 18, 2008 16:17

This came up accidentally when someone asked for a copy of an old
program, and I found how D... big it was compared to what I am used to
passing around.

I have these two menu programs, one written in my usual F77style and
compiled with MS 3.31, which came to 44,676 bytes as an executable,
and which runs in DOS or Windows command line or I can double-click on
it in the directory, whatever, and it runs as expected, even on
Macintosh DOS emulators (or pretty much any machine around).

At some stage (2002, I think) I brought the source of this original
F77 program into CVF 6.6 and compiled it as a command-line program to
do absolutely the same job.

There IS a difference. In the first program I call the SPAWN function
for loading daughter programs for execution; in the Windows version I
had to call SYSTEM to do the same job, one line difference, even
though both actually use the SYSTEM function, but only the DOS program
uses SPAWN.

When these programs run, even I cannot tell which is which, since both
appear as full screen programs with the same font and colours and so
on, and no difference in behaviour at all.
Show full article (2.15Kb)
19 Comments
Re: A digression         


Author: Steve Lionel
Date: Apr 18, 2008 17:11

Terence wrote:
> When these programs run, even I cannot tell which is which, since both
> appear as full screen programs with the same font and colours and so
> on, and no difference in behaviour at all.
>
> BUT, the windows-compiled version is 299,008 bytes long!
>
> Am I correct in assuming there must be unused code sitting in the
> larger Windows version?
> Obviously the two DO differ in one line of souce and so in executable
> content.
>
> But THAT much?

You were probably looking at the EXE size, right? What's happened is
that the run-time library, because of cross-references and just a larger
language, pulls in more code, including much that ends up not being
used. It is possible to structure the library so less unused code gets
pulled in, but nowadays a couple hundred KB is noise and you notice it
only on small programs.
Show full article (1.41Kb)
no comments
Re: A digression         


Author: glen herrmannsfeldt
Date: Apr 18, 2008 17:38

Steve Lionel wrote:
> Terence wrote:
(snip)
>> BUT, the windows-compiled version is 299,008 bytes long!
>> Am I correct in assuming there must be unused code sitting in the
>> larger Windows version?
>> Obviously the two DO differ in one line of souce and so in executable
>> content.
> You were probably looking at the EXE size, right? What's happened is
> that the run-time library, because of cross-references and just a larger
> language, pulls in more code, including much that ends up not being
> used. It is possible to structure the library so less unused code gets
> pulled in, but nowadays a couple hundred KB is noise and you notice it
> only on small programs.
> Another thing is if the program is linked against DLL libraries, the EXE
> will be smaller.
> Compare instead the size of the .obj file and you'll get a better notion
> of generated code size.
Show full article (1.12Kb)
no comments
Re: A digression         


Author: e p chandler
Date: Apr 18, 2008 21:20

On Apr 18, 7:17 pm, Terence cantv.net> wrote:
> This came up accidentally when someone asked for a copy of an old
> program, and I found how D... big it was compared to what I am used to
> passing around.
>
> I have these two menu  programs, one written in my usual F77style and
> compiled with MS 3.31, which came to 44,676 bytes as an executable,
> and which runs in DOS or Windows command line or I can double-click on
> it in the directory, whatever, and it runs as expected, even on
> Macintosh DOS emulators (or pretty much any machine around).
>
> At some stage (2002, I think) I brought the source of this original
> F77 program into CVF 6.6 and compiled it as a command-line program to
> do absolutely the same job.
>
> There IS a difference. In the first program I call the SPAWN function
> for loading daughter programs for execution; in the Windows version I
> had to call SYSTEM to do the same job, one line difference, even
> though both actually use the SYSTEM function, but only the DOS program
> uses SPAWN. ...
Show full article (2.47Kb)
no comments
Re: A digression         


Author: glen herrmannsfeldt
Date: Apr 18, 2008 22:14

e p chandler wrote:
(snip)
> Good luck. Vista does not run DOS graphics. Vista does not allow text
> in fullscreen mode. My good old DOS text editor runs like a dead dog
> in a console window... Eventually you will not have a choice. Old
> stuff just won't run anymore - or emulation will extract a large
> penalty in performance.

IBM has done somewhat better at supporting old systems.

Programs compiled (or assembled) for OS/360 over 40 years
ago will still run under current z/OS systems. One that
I have heard is the PL/I (F) compiler. The Fortran G
and H compilers should also run fine.

-- glen
no comments
Re: A digression         


Author: Gary Scott
Date: Apr 19, 2008 09:09

e p chandler wrote:
> On Apr 18, 7:17 pm, Terence cantv.net> wrote:
>
>>This came up accidentally when someone asked for a copy of an old
>>program, and I found how D... big it was compared to what I am used to
>>passing around.
>>
>>I have these two menu programs, one written in my usual F77style and
>>compiled with MS 3.31, which came to 44,676 bytes as an executable,
>>and which runs in DOS or Windows command line or I can double-click on
>>it in the directory, whatever, and it runs as expected, even on
>>Macintosh DOS emulators (or pretty much any machine around).
>>
>>At some stage (2002, I think) I brought the source of this original
>>F77 program into CVF 6.6 and compiled it as a command-line program to
>>do absolutely the same job.
>>
>>There IS a difference. In the first program I call the SPAWN function
>>for loading daughter programs for execution; in the Windows version I
>>had to call SYSTEM to do the same job, one line difference, even ...
Show full article (3.60Kb)
no comments
Re: A digression         


Author: Gary Scott
Date: Apr 19, 2008 09:11

glen herrmannsfeldt wrote:
> e p chandler wrote:
> (snip)
>
>> Good luck. Vista does not run DOS graphics. Vista does not allow text
>> in fullscreen mode. My good old DOS text editor runs like a dead dog
>> in a console window... Eventually you will not have a choice. Old
>> stuff just won't run anymore - or emulation will extract a large
>> penalty in performance.
>
>
> IBM has done somewhat better at supporting old systems.
>
> Programs compiled (or assembled) for OS/360 over 40 years
> ago will still run under current z/OS systems. One that
> I have heard is the PL/I (F) compiler. The Fortran G
> and H compilers should also run fine.

Z/OS is almost indistinguishable. I think it's 1969 every time I log on.
Show full article (1.10Kb)
no comments
Re: A digression         


Author: e p chandler
Date: Apr 19, 2008 11:03

On Apr 19, 12:11 pm, Gary Scott sbcglobal.net> wrote:
> glen herrmannsfeldt wrote:
>> e p chandler wrote:
>> (snip)
>
>>> Good luck. Vista does not run DOS graphics. Vista does not allow text
>>> in fullscreen mode. My good old DOS text editor runs like a dead dog
>>> in a console window... Eventually you will not have a choice. Old
>>> stuff just won't run anymore - or emulation will extract a large
>>> penalty in performance.
>
>> IBM has done somewhat better at supporting old systems.
>
>> Programs compiled (or assembled) for OS/360 over 40 years
>> ago will still run under current z/OS systems.  One that
>> I have heard is the PL/I (F) compiler.  The Fortran G
>> and H compilers should also run fine.
>
> Z/OS is almost indistinguishable.  I think it's 1969 every...
Show full article (0.92Kb)
no comments
Re: A digression         


Author: Gary Scott
Date: Apr 19, 2008 11:26

e p chandler wrote:
> On Apr 19, 12:11 pm, Gary Scott sbcglobal.net> wrote:
>
>>glen herrmannsfeldt wrote:
>>
>>>e p chandler wrote:
>>>(snip)
>>
>>>>Good luck. Vista does not run DOS graphics. Vista does not...
Show full article (1.55Kb)
no comments
Re: A digression         


Author: Terence
Date: Apr 19, 2008 17:16

TOn Apr 20, 4:03 am, e p chandler juno.com> wrote:
> On Apr 19, 12:11 pm, Gary Scott sbcglobal.net> wrote:
>
>
>
>> glen herrmannsfeldt wrote:
>>> e p chandler wrote:
>>> (snip)
>
>>>> Good luck. Vista does not run DOS graphics. Vista does not allow text
>>>> in fullscreen mode. My good old DOS text editor runs like a dead dog
>>>> in a console window... Eventually you will not have a choice. Old
>>>> stuff just won't run anymore - or emulation will extract a large
>>>> penalty in performance.
>
>>> IBM has done somewhat better at supporting old systems.
>
>>> Programs compiled (or assembled) for OS/360 over 40 years
>>> ago will still run under current z/OS systems.  One that
>>> I have heard is the PL/I (F) compiler.  The Fortran G ...
Show full article (1.39Kb)
no comments
1 2