News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

MASM line-length limit

Started by mdutra, October 12, 2009, 03:25:58 PM

Previous topic - Next topic

mdutra

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.

BlackVortex

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

dedndave

i don't consider using slash to be a "workaround"

BlackVortex

I was being kinda sarcastic   :toothy

Vortex

Hi mdutra,

Welcome to the forum.

Here, I posted a macro to split long lines with a lot of parameters pushed on to the stack.

jj2007

Hi Miguel,

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

Benvenido al Forum,
Jochen

hutch--

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.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

MichaelW

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>
eschew obfuscation