Data creation routine

 BBS: Inland Empire Archive
Date: 03-15-92 (17:50)             Number: 133
From: BILL BEELER                  Refer#: NONE
  To: MICHAEL MALLEY                Recvd: NO  
Subj: Data creation routine          Conf: (2) Quik_Bas
In a message to Dave Cleary <14 Mar 92 12:47> Michael Malley wrote:

 >DC>will store quoted strings in memory, and when it finds
 >DC>matches, will only write the quoted string once in the
 >DC>object file, and have both variables reference the same

 MM> Nope, I checked it out the other day.  Contrary to the docs, BC *still*
 MM> (with 7.1) writes the strings to the .OBJ file, but LINK processes it
 MM> differently so that the different references to the same literal strings
 MM> all point to one copy in the .EXE.

 >DC>string it comes upon in the object file. Using /S gives you
 >DC>more working memory (Bytes Free), but will probably create
 >DC>a larger EXE.

 MM> No, is needs more memory because BC is maintaining the strings in a look
 MM> up table.  Using /S creates a smaller .EXE.  See my previous posting to
 MM> Steve to see the code and the results.

 MM> Let me see if I can get this right...  You should test the things you
 MM> post before you post them (ROFL [Grin] Couldn't let it pass, just
 MM> teasing!).

Now...let me see if I can get this right... ;-)


A$ = "Hi there MIKE"

bc/o/s hithere;
link /e/noe/f/packc hithere smallerr tscnionr,,nul,bcl71enr;
HITHERE.EXE      7904   03-15-92   5:54p

bc/o hithere;
link /e/noe/f/packc hithere smallerr tscnionr,,nul,bcl71enr;
HITHERE.EXE      7888   03-15-92   5:55p

It depends on how many quoted strings you have...for small
amounts it appears to be ever it's yet
failed to shave a few bytes off of any program of
appreciable size....:-)

--- GEcho/beta
 * Origin: Amber Shadow BBS - MultiLine, MultiProblems - HST/V32b (1:203/988)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET