|
Lahar,
This could be easily done with an addin. You could try to code one that suits your needs, and we 'll give you all the help you 'll need. Sorry for misunderstanding your question.
Anyway, just for reference, this is how the COMMENT directive works:
From MSDN:
| QUOTE |
| CODE | COMMENT delimiter [[text]] [[text]] [[text]] delimiter [[text]] |
Treats all text between or on the same line as the delimiters as a comment.
|
The delimiter can be ANY SINGLE character (case sencitive). At the second instance of the single character used as delimiter, the COMMENT directive range is assumed closed.
For instance, one could try to use the character "a" as delimiter, to comment the whole snippet below. (Note where the second instance of the delimiter occurs):
| QUOTE | COMMENT a szMessage1 db "Hello World 1",0 szMessage2 db "Hello World 2",0 szCaption db "I ran out of imagination...",0 a |
The comment's range is defined by the first occurance of the character used as delimiter, to the last character of the line that contains the second instance of the delimiter.
This is what is assumed as comment by the MASM pre-compiler for the above snippet (in contrast to the programmers expectations):
| QUOTE | COMMENT a szMessage1 db "Hello World 1",0 szMessage2 db "Hello World 2",0 szCaption db "I ran out of imagination...",0 a |
Because of this effect, someone should use as delimiter, any single character that is not frequently used in text or code, such as {"^", "~", "`" } etc. Usually, and as an unofficial standard, the ASCII character "~" is used as delimiter for the COMMENT directive. References:Microsoft Macro Assembler Reference at MSDN - COMMENT (MASM)
|