The MASM Forum Archive 2004 to 2012

Project Support Forums => MASM32 => Topic started by: mdutra on October 12, 2009, 03:25:58 PM

Title: MASM line-length limit
Post by: mdutra on October 12, 2009, 03:25:58 PM
Hi,

I have been using MASM again for a year now (since a long hiatus on programming) and I really like it. During this time I have also looked at other assemblers, but none of them compelled me to change my original choice.

However, there is an issue about MASM that is really driving me crazy: the line-length limit of (if I'm not mistaken) 255 chars. MASM licensing states that it must be used to develop for Microsoft operating systems only (i.e. Windows) and under Windows it is fairly common to have long structures that need to be initialized.

So, my basic question is: instead of proposing workarounds, how difficult would it be to increase MASM's line-length limit to, let's say, 1024 chars?

Kind regards,

Miguel.
Title: Re: MASM line-length limit
Post by: BlackVortex on October 12, 2009, 03:30:59 PM
Why not use a slash ? Oh, sorry you don't want workarounds  :P

Maybe later versions of ml.exe don't have that limitation, or you could use Jwasm, which is 99% compatible and 100% better than ml.exe
Title: Re: MASM line-length limit
Post by: dedndave on October 12, 2009, 03:58:47 PM
i don't consider using slash to be a "workaround"
Title: Re: MASM line-length limit
Post by: BlackVortex on October 12, 2009, 04:13:47 PM
I was being kinda sarcastic   :toothy
Title: Re: MASM line-length limit
Post by: Vortex on October 12, 2009, 05:18:01 PM
Hi mdutra,

Welcome to the forum.

Here (http://www.masm32.com/board/index.php?topic=11671.msg87982#msg87982), I posted a macro to split long lines with a lot of parameters pushed on to the stack.
Title: Re: MASM line-length limit
Post by: jj2007 on October 12, 2009, 05:52:10 PM
Hi Miguel,

Out of curiosity: Could you post an example where the limit plays a role?

Benvenido al Forum,
Jochen
Title: Re: MASM line-length limit
Post by: hutch-- on October 12, 2009, 11:15:06 PM
Ummmm,

> how difficult would it be to increase MASM's line-length limit to, let's say, 1024 chars?

Impossible, ML.EXE is closed source and this will not change in the next millenium or so. Options are to learn how to use MASM or try an alternative, JWASM emulates MASM very well and if you don't mind playing with the source you can extend that limit. For what its worth it is rarely ever worth the effort to write initialised structures in the initialised data section, declare the structure in the .CONST like normal and dynamically fill the structure at run time. If you need it to have global scope, put it in the UNinitialised data section and fill it at runtime.
Title: Re: MASM line-length limit
Post by: MichaelW on October 13, 2009, 03:56:24 AM
And initializing a large, complex structure with a single statement can be somewhat cumbersome and error prone:

esb EMRSTRETCHBLT <{1,},{0,0,9,9},0,1,,,,1,1,{1,2,,,5,6},0ffffffh,1,,11b,,,,7>