Dec 062017
 
Microsoft BASIC source that will determine what stubs your program is using. Useful for optimizing file EXE size.
File BC7STUB.ZIP from The Programmer’s Corner in
Category BASIC Language
Microsoft BASIC source that will determine what stubs your program is using. Useful for optimizing file EXE size.
File Name File Size Zip Size Zip Type
BC7STUB.DOC 1537 732 deflated
CLSTUB.BAT 249 163 deflated
STUBSCAN.BAS 5846 1682 deflated
STUBSCAN.EXE 26752 18928 deflated
TPCREAD.ME 199 165 deflated

Download File BC7STUB.ZIP Here

Contents of the BC7STUB.DOC file



BC7STUB.DOC 03-14-90 T.E.M.
Benchmark the effect of linking Microsoft `stub` files.

STUB FILES.
----------
Stub files are .OBJ files which block certain pieces of runtime code
from being included in the .EXE file being created by the LINK step.
It is up to the user to determine (using the documentation) which
stub files can be used. For example: INPUT, VAL, and READ statements
but use only long integer math variables and strings (no floats)
do not really need floating point math support. You can safely
link the NOFLTIN.OBJ stub file to your program and reduce the .EXE
file size by about 12 k!



Source file.............. : CRLF.BAS from BC 7.0 dist disks (slightly modif)

Compile statement........ : BC crlf /o/e/x;

Approach................. : Link one, two, three, etc. stub files

Most significant findings : (1.) The NOFLTIN.OBJ stub saved almost 12 k.
(2.) The NOCOM.OBJ stub saved almost 3 k.

Test Results............. :

.EXE Bytes
Size Saved Description
------ ------ ----------------------------------------------------------
40,920 0 With NO stub files: just `LINK crlf;`

28,804 12,116 LINK /NOE crlf nofltin;

27,768 1,036 LINK /NOE crlf nofltin noedit;

24,662 3,106 LINK /NOE crlf nofltin noedit nocom;

23,934 728 LINK /NOE crlf nofltin noedit nocom nolpt;

22,670 1,264 LINK /NOE crlf nofltin noedit nocom nolpt smallerr;




 December 6, 2017  Add comments

Leave a Reply