Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Strings being compacted on compliation ....

2 views
Skip to first unread message

rebel

unread,
Mar 3, 2009, 11:26:52 PM3/3/09
to
I have a string variable equated to 36 characters ("A") as a literal, not a
STRING$ function. Previously when compiled this string remained intact. Now
it is being compacted which completely defeats the purpose as a placeholder. I
am compiling from within the IDE, "/O"

(Currently appears in the .exe as (hex) 04 B2 41 24 whereas other strings are
appearing as 04 nn 00 <string> where nn is the #characters in the following
string.)

What can cause this compaction, and how can I prevent it?

ArarghMai...@not.at.arargh.com

unread,
Mar 3, 2009, 10:50:48 PM3/3/09
to
On Wed, 04 Mar 2009 12:26:52 +0800, rebel <m...@privacy.net> wrote:

>I have a string variable equated to 36 characters ("A") as a literal, not a
>STRING$ function. Previously when compiled this string remained intact. Now
>it is being compacted which completely defeats the purpose as a placeholder. I
>am compiling from within the IDE, "/O"

I presume prior to VBDOS?

>(Currently appears in the .exe as (hex) 04 B2 41 24 whereas other strings are
>appearing as 04 nn 00 <string> where nn is the #characters in the following
>string.)
>
>What can cause this compaction, and how can I prevent it?

Hack bc.exe to default to "/S" :-)

OR

Try "/S" in the "Additional Options:" field.


--
ArarghMail903 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 extra stuff from the reply address.

rebel

unread,
Mar 4, 2009, 12:40:00 AM3/4/09
to
On Tue, 03 Mar 2009 21:50:48 -0600, ArarghMai...@NOT.AT.Arargh.com wrote:

>On Wed, 04 Mar 2009 12:26:52 +0800, rebel <m...@privacy.net> wrote:
>
>>I have a string variable equated to 36 characters ("A") as a literal, not a
>>STRING$ function. Previously when compiled this string remained intact. Now
>>it is being compacted which completely defeats the purpose as a placeholder. I
>>am compiling from within the IDE, "/O"
>
>I presume prior to VBDOS?

Nope, same deal. That's the annoying thing - it WAS working fine for over a
year, and now it's gone weird.

>>(Currently appears in the .exe as (hex) 04 B2 41 24 whereas other strings are
>>appearing as 04 nn 00 <string> where nn is the #characters in the following
>>string.)
>>
>>What can cause this compaction, and how can I prevent it?
>
>Hack bc.exe to default to "/S" :-)
>
>OR
>
>Try "/S" in the "Additional Options:" field.

It's Standard Edition, not Pro.

John, any ideas why/how it decides to compact strings?

rebel

unread,
Mar 4, 2009, 5:50:01 AM3/4/09
to
On Wed, 04 Mar 2009 12:26:52 +0800, rebel <m...@privacy.net> wrote:


Aaahhhh!! - just had a bo-peep and the relevant module's .OBJ file has the
string in clear view. Linker is called automagically from IDE's "make .EXE"
button. I haven't changed anything to do with that - don't even know how to or
if I can.

The mystery (for me at least) deepens.

Auric__

unread,
Mar 4, 2009, 12:36:40 PM3/4/09
to

I can't help with the problem, but if it's a placeholder, why not use
something that's unlikely to get compacted?
"1234567890qwertuiopasdfgjklzxcvbnm" Bam, 36 characters.

--
auric dot auric at gmail dot com
--
Even my subconscious mocks me.

Auric__

unread,
Mar 4, 2009, 12:51:47 PM3/4/09
to
On Wed, 04 Mar 2009 17:36:40 GMT, I wrote:

> "1234567890qwertuiopasdfgjklzxcvbnm" Bam, 36 characters.

Look at that, a typo turned my smart-ass statement into complete idiocy.

--
auric dot auric at gmail dot com
--

Just because the object cannot be seen
doesn't mean that it has ceased to exist.

ArarghMai...@not.at.arargh.com

unread,
Mar 4, 2009, 7:46:45 PM3/4/09
to
On Wed, 4 Mar 2009 17:51:47 +0000 (UTC), "Auric__"
<not.m...@email.address> wrote:

>On Wed, 04 Mar 2009 17:36:40 GMT, I wrote:
>
>> "1234567890qwertuiopasdfgjklzxcvbnm" Bam, 36 characters.
>
>Look at that, a typo turned my smart-ass statement into complete idiocy.

I was going to suggest "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", as a
placeholder. Easier to check for typos. :-)

ArarghMai...@not.at.arargh.com

unread,
Mar 4, 2009, 8:00:06 PM3/4/09
to

There is no "Additional Options:" field as the last thing on the MENU
-> RUN -> Make EXE file menu? I can't see why that would be different
on the standard version.

View this is a fixed font (copied from VBDOS):

=================================================================
Make EXE File

+-------------------------+ +-----------------+
EXE File Name: ŚUntitled.EXE Ś Ś Make EXE Ś
+-------------------------+ +-----------------+
+EXE Type--------------------------------+ +-----------------+
Ś ( ) Stand-Alone EXE file /O Ś ŚMake EXE and ExitŚ
Ś ( ) EXE Requiring Run-Time Module Ś +-----------------+
+----------------------------------------+ +-----------------+
+Optimizations---------------------------+ Ś Cancel Ś
Ś ( ) 80x87 or Emulator Math Ś +-----------------+
Ś ( ) Alternate Math /Fpa Ś +-----------------+
Ś [ ] 80286 Code Generation /G2 Ś Ś Help Ś
Ś [ ] 80386 Code Generation /G3 Ś +-----------------+
+----------------------------------------+
+Debug-----------------------------------+
Ś [ ] Run-Time Error Checking /D Ś
+----------------------------------------+
+--------------------+
Additional Options: Ś Ś
+--------------------+

=================================================================

And I can't imagine why MS even bothered with a compress strings
option. It seems to be almost totally useless, to me.


>
>John, any ideas why/how it decides to compact strings?

John Who?

rebel

unread,
Mar 4, 2009, 9:20:11 PM3/4/09
to

No Optimisations or Additional Options offered in (my) Standard Edition VBDOS.

>And I can't imagine why MS even bothered with a compress strings
>option. It seems to be almost totally useless, to me.

As noted in my later post, it is being compressed by the linker.

But who knows why MS do many of the things they do.

ArarghMai...@not.at.arargh.com

unread,
Mar 4, 2009, 11:56:05 PM3/4/09
to
On Thu, 05 Mar 2009 10:20:11 +0800, rebel <m...@privacy.net> wrote:
>On Wed, 04 Mar 2009 19:00:06 -0600, ArarghMai...@NOT.AT.Arargh.com wrote:
>>On Wed, 04 Mar 2009 13:40:00 +0800, rebel <m...@privacy.net> wrote:
>>>On Tue, 03 Mar 2009 21:50:48 -0600, ArarghMai...@NOT.AT.Arargh.com wrote:
>>>>On Wed, 04 Mar 2009 12:26:52 +0800, rebel <m...@privacy.net> wrote:
>>>>
>>>>>I have a string variable equated to 36 characters ("A") as a literal, not a
>>>>>STRING$ function. Previously when compiled this string remained intact. Now
>>>>>it is being compacted which completely defeats the purpose as a placeholder. I
>>>>>am compiling from within the IDE, "/O"
>>>>
>>>>I presume prior to VBDOS?
>>>
>>>Nope, same deal. That's the annoying thing - it WAS working fine for over a
>>>year, and now it's gone weird.
>>>
>>>>>(Currently appears in the .exe as (hex) 04 B2 41 24 whereas other strings are
>>>>>appearing as 04 nn 00 <string> where nn is the #characters in the following
>>>>>string.)
>>>>>
>>>>>What can cause this compaction, and how can I prevent it?
>>>>
>>>>Hack bc.exe to default to "/S" :-)
>>>>
>>>>OR
>>>>
>>>>Try "/S" in the "Additional Options:" field.
>>>
>>>It's Standard Edition, not Pro.
>>
>>There is no "Additional Options:" field as the last thing on the MENU
>>-> RUN -> Make EXE file menu? I can't see why that would be different
>>on the standard version.
>>
>>View this is a fixed font (copied from VBDOS):
<snip>

>
>No Optimisations or Additional Options offered in (my) Standard Edition VBDOS.
Oh. I only have the Pro version.

>
>>And I can't imagine why MS even bothered with a compress strings
>>option. It seems to be almost totally useless, to me.
>
>As noted in my later post, it is being compressed by the linker.

Probably as a result of the "/PACKDATA" linker option. One reason I
never use the IDE to compile and link is because of limited control
over the process. Outside of some really serious hacking on
VBDOS.EXE, the easiest thing is to just create a small batch file to
do the compile and link. 2 or 3 lines would do it. Something like:

@echo off
bc %1.bas, %1.obj %1.lst ;
link %1.obj, %1.exe, %1.map ;

assuming that all necessary files are in the PATH and LIB environment
variables. If not, it needs to have a few more things added.


>But who knows why MS do many of the things they do.

True. But usually for money. :-) Or control.

rebel

unread,
Mar 5, 2009, 8:18:43 AM3/5/09
to
On Wed, 04 Mar 2009 18:46:45 -0600, ArarghMai...@NOT.AT.Arargh.com wrote:

>On Wed, 4 Mar 2009 17:51:47 +0000 (UTC), "Auric__"
><not.m...@email.address> wrote:
>
>>On Wed, 04 Mar 2009 17:36:40 GMT, I wrote:
>>
>>> "1234567890qwertuiopasdfgjklzxcvbnm" Bam, 36 characters.
>>
>>Look at that, a typo turned my smart-ass statement into complete idiocy.
>I was going to suggest "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", as a
>placeholder. Easier to check for typos. :-)

Tnx to both of you. I settled on "0123 ... XYZ" and modified the routine that
searches for the placeholder. All is now good. I'll stop trying to figure out
why MS stuff does the weird things thst it does.

ArarghMai...@not.at.arargh.com

unread,
Mar 5, 2009, 10:51:07 AM3/5/09
to

Probably a wise idea. Otherwise the headaches . . .

Auric__

unread,
Mar 5, 2009, 1:16:20 PM3/5/09
to
On Thu, 05 Mar 2009 00:46:45 GMT, wrote:

> On Wed, 4 Mar 2009 17:51:47 +0000 (UTC), "Auric__"
> <not.m...@email.address> wrote:
>
>>On Wed, 04 Mar 2009 17:36:40 GMT, I wrote:
>>
>>> "1234567890qwertuiopasdfgjklzxcvbnm" Bam, 36 characters.
>>
>>Look at that, a typo turned my smart-ass statement into complete idiocy.
> I was going to suggest "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", as a
> placeholder. Easier to check for typos. :-)

Hey! Nunya lip, mister! ;-)

--
auric dot auric at gmail dot com
--

Pot, kettle, you get the idea.

0 new messages