 |
|
|
|
| Author |
Message |
signrite
Joined: 04 Oct 2007 Posts: 9
|
Posted: Mon Jan 09, 2006 7:01 am Post subject: vbdos - run time files |
|
|
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,
Archived from group: microsoft>public>vb>dos |
|
| Back to top |
|
 |
Jim Mack
Joined: 04 Oct 2007 Posts: 735
|
Posted: Mon Jan 09, 2006 12:50 pm Post subject: Re: vbdos - run time files |
|
|
signrite@hotmail.com wrote:
> 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 |
|
| Back to top |
|
 |
Stephen Howe
Joined: 04 Oct 2007 Posts: 59
|
Posted: Tue Jan 10, 2006 2:00 am Post subject: Re: vbdos - run time files |
|
|
> 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.
> 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.
> Does VBDRT10E.EXE go to another area of ram than the base area(640k) ?
Not as far as I am aware.
> 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 |
|
| Back to top |
|
 |
BIAF
Joined: 04 Oct 2007 Posts: 1
|
Posted: Mon Jan 09, 2006 11:03 pm Post subject: Re: vbdos - run time files |
|
|
| Thanks alot both of you, very clear to me now. |
|
| Back to top |
|
 |
ararghmail601NOSPAM
Joined: 04 Oct 2007 Posts: 2
|
Posted: Tue Jan 10, 2006 1:57 am Post subject: Re: vbdos - run time files |
|
|
On 9 Jan 2006 02:01:44 -0800, signrite@hotmail.com wrote:
>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.
>
>Does VBDRT10E.EXE go to another area of ram than the base area(640k) ?
No.
>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.
|
|
| Back to top |
|
 |
|
|
| Related Topics: | making apps in vbdos then loading them within vbdos HI, I have a simple app, but my friend wants to help as well, rather than giving whole source, Im thinking that if he has vbdos aswell, then he could make his app(basic text view'r) with a FD.exe, so then its like another app but on its own form/window, i
VBDOS under XP I've been trying to run VBDOS under Windows XP, but there appears to be alot of strange errors and crashes, does anybody know if this is an XP problem or just specific to my setup? Is there any way to correct it? I'm sure VBDOS runs OK under NT 4.0 and I
VBDOS Tutorials Hi, i'm looking for tutorials on VBDOS. Does anyone know where to go to find free tutorials? -J. Christensen
vbdos crashing i've had a confusing vbdos problem for years, but i've been able to find ways round it until now. when making executables, they sometimes crash, sometimes after extended periods, but i've found that making a few small unimportant changes to the code can r
Copy of VBDOS Hello. I am desperatly trying to get hold of VB FOR DOS and can't see anywhere I can buy it on the net. I am prepared to pay a substantial amount from anywhere... Shipping to the UK would be required. Any help would be apreciated. Thank you Daz Elleringto |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|