Discussion:
vbdos - run time files
(too old to reply)
s***@hotmail.com
2006-01-09 10:01:44 UTC
Permalink
Hi,

Whats the best way to compile a vbdos exe, I noticed that if I use
runtime option, my main exe becomes very small and then VBDRT10E.EXE is
needed with the exe to run,

My file is about 200k if i compile it as a full exe with runtime inside
it and its only about 52k with VBDRT10E.EXE out side but I noticed that
VBDRT10E.EXE was about 316k on its own.

So it seems that VBDRT10E.EXE and my main exe (52k) added togeather are
bigger than the exe compiled in full standalone,

Point is when my 52k file is loaded in ram and its using VBDRT10E.EXE,
does vbdos also load this VBDRT10E.EXE into ram or does it just call it
for functions etc as it needs them?

Does VBDRT10E.EXE go to another area of ram than the base area(640k) ?

If VBDRT10E.EXE does be called only for stuff if needed, does it load
totaly into ram as its getting what it needs from that file and ending
again or is VBDRT10E.EXE being exec'd in a way that it is not fully
placed in ram,

Im trying to decide if a stand alone exe or an exe with runtime is the
best option for freeing up the 640k base ram?

Thanks,
Jim Mack
2006-01-09 12:50:34 UTC
Permalink
Post by s***@hotmail.com
Hi,
Whats the best way to compile a vbdos exe, I noticed that if I use
runtime option, my main exe becomes very small and then VBDRT10E.EXE
is needed with the exe to run,
You'll get a smaller total memory footprint with a standalone EXE. Generally, you're also better off writing several smaller modules than one big main module, isolating routines that may require the /X or /E switches (for example). Also, link in as many of the NOxxx.obj as you can, and smallerr.obj etc.
--
Jim Mack
MicroDexterity Inc
www.microdexterity.com
Stephen Howe
2006-01-09 21:00:37 UTC
Permalink
Post by s***@hotmail.com
Whats the best way to compile a vbdos exe, I noticed that if I use
runtime option, my main exe becomes very small and then VBDRT10E.EXE is
needed with the exe to run,
There is no "best way". What matters is your circumstances.
The Run-Time Executable versus lniking with Stand Alone libraries have
different pros and cons.
The Stand Alone libraries produce a bigger executable but it takes up a
smaller space in 640K compared to the Run-Time Executable + your Executable
because only the stuff you use in BASIC is linked in.
The Run Time libraries produce a smaller executable.

Generally I would use

1. Stand Alone libraries if producing some utility that is stand alone.
Also if it critical that you minimise memory footprint with 640K
2. Run-Time Executable if producing a suite of related EXE's. You are
minimising size of overall executable, not size in memory. It may be that
one EXE CHAIN's the the next. This second option is useful when the combined
programs are too big to fit into 640K or even when using overlays.
Post by s***@hotmail.com
My file is about 200k if i compile it as a full exe with runtime inside
it and its only about 52k with VBDRT10E.EXE out side but I noticed that
VBDRT10E.EXE was about 316k on its own.
So it seems that VBDRT10E.EXE and my main exe (52k) added togeather are
bigger than the exe compiled in full standalone,
Point is when my 52k file is loaded in ram and its using VBDRT10E.EXE,
does vbdos also load this VBDRT10E.EXE into ram or does it just call it
for functions etc as it needs them?
It loads it all into RAM.
Post by s***@hotmail.com
Does VBDRT10E.EXE go to another area of ram than the base area(640k) ?
Not as far as I am aware.
Post by s***@hotmail.com
Im trying to decide if a stand alone exe or an exe with runtime is the
best option for freeing up the 640k base ram?
If this is important, the stand-alone libraries are the better bet.
You can see this by PRINTing FRE(-1) which shows you how much Far Heap you
have left.
I am willing to bet that you have most memory when linking with stand alone
libraries.

3 other points:

(i) You can actually design a custom RTM EXE which only contains the support
for the stuff you use. So the run-time EXE will be smaller. But I woud not
advocate this. I would only ever consider this if I had a suite of EXE's,
all for some client and size in memory was an issue. Otherwise never.

(ii) As Jim Mack says. There are a number of OBJ & LIB files that can
reduce the size of your EXE (but only for stand alone libraries or for
building custom RTM EXE).
Not using Olivetti SCREEN 4 mode?
Link in NOOGA.OBJ

(iii) Some of the compiler switches can reduce size of EXE e.g. /G3 (and
linker switches)
You need to understand each one throughly. See Ethan Winer's notes on this.
Some BASIC expressions can produce fatter executables

c% = d% / e%

The "/" operator means floating-point divide.
d% & e% are converted to single-precision, a floating point divide is done
and result converted back to integer. What should have been written is

c% = d% \ e% ' integer divide

c% = d% ^ 2
f# = g# ^ 2

These are expensive. BASICs exponention operator has to be capable of doing

g# = 1.4567# ^ 23.8912076#

so it is not fast. And it always works using floating-point types.

The last 2 statements should be written

c% = d% * d%
f# = g# * g#

which are far faster

Stephen Howe
BIAF
2006-01-10 02:03:16 UTC
Permalink
Thanks alot both of you, very clear to me now.
a***@NOW.AT.arargh.com
2006-01-10 02:57:54 UTC
Permalink
Post by s***@hotmail.com
Whats the best way to compile a vbdos exe, I noticed that if I use
runtime option, my main exe becomes very small and then VBDRT10E.EXE is
needed with the exe to run,
My file is about 200k if i compile it as a full exe with runtime inside
it and its only about 52k with VBDRT10E.EXE out side but I noticed that
VBDRT10E.EXE was about 316k on its own.
So it seems that VBDRT10E.EXE and my main exe (52k) added togeather are
bigger than the exe compiled in full standalone,
Point is when my 52k file is loaded in ram and its using VBDRT10E.EXE,
does vbdos also load this VBDRT10E.EXE into ram or does it just call it
for functions etc as it needs them?
All of it.
Post by s***@hotmail.com
Does VBDRT10E.EXE go to another area of ram than the base area(640k) ?
No.
Post by s***@hotmail.com
If VBDRT10E.EXE does be called only for stuff if needed, does it load
totaly into ram as its getting what it needs from that file and ending
again or is VBDRT10E.EXE being exec'd in a way that it is not fully
placed in ram,
Im trying to decide if a stand alone exe or an exe with runtime is the
best option for freeing up the 640k base ram?
Stand alone almost always is the better choice.
--
ArarghMail601 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the garbage from the reply address.
Loading...