flat assembler
Message board for the users of flat assembler.
Index
> Main > Comment a block of lines in FASM? |
Author |
|
revolution 10 Oct 2008, 10:20
Short answer: No.
Long answer: Yes Answer with more detail: No, but yes if you alter the fasm sources. There are also some macro solutions already posted on this board, but they do not work in all situations, but may be suitable for your needs. |
|||
10 Oct 2008, 10:20 |
|
vid 10 Oct 2008, 10:27
I'd suggest to just use ";" in the beginning of every line. It is clean, and not so much effort.
|
|||
10 Oct 2008, 10:27 |
|
MHajduk 10 Oct 2008, 12:46
alorent
Some time ago I presented that some small changes done in 'PREPROCE.INC' (FASM preprocessor sources) allow us to use C-style /*...*/ multiline comments. Take a look at this topic: Multiline /*...*/ comments in FASM |
|||
10 Oct 2008, 12:46 |
|
vid 10 Oct 2008, 13:01
... and then no one else would be able to compile your sources
|
|||
10 Oct 2008, 13:01 |
|
revolution 10 Oct 2008, 13:15
... and you must modify your fasm sources every time there is a new version
|
|||
10 Oct 2008, 13:15 |
|
MHajduk 10 Oct 2008, 13:18
vid
... assuming that you want to publish sources of your program. In opposite case I see no problem. This change is only proposition for those, who want make their work easier (I'm still wondering why this kind of comments isn't standard, but I will never receive an answer, of course). |
|||
10 Oct 2008, 13:18 |
|
vid 10 Oct 2008, 13:19
For custom hobby projects, and if you don't want to use newer FASM versions (as revolution pointed out), okay. Otherwise, it is a bad idea.
|
|||
10 Oct 2008, 13:19 |
|
MHajduk 10 Oct 2008, 13:22
Really, how often the file 'PREPROCE.INC' is changed? With every newer version of FASM? I don't think so, because main changes are made by adding new sets of the macros.
|
|||
10 Oct 2008, 13:22 |
|
Grom PE 10 Oct 2008, 15:11
Code: macro comment { these are my comments in several lines bla, bla, bla, bla } |
|||
10 Oct 2008, 15:11 |
|
windwakr 10 Oct 2008, 17:06
This is easier than the above, add this to start of your file:
Code: comment fix macro comment then use like: Code: comment{ mov [blah],ax add ax,[bleh] xchg whatever,dx .... } |
|||
10 Oct 2008, 17:06 |
|
sleepsleep 11 Oct 2008, 16:46
i actually think it is editor job to have the feature, multiblock comment instead of language.
|
|||
11 Oct 2008, 16:46 |
|
alorent 16 Oct 2008, 12:02
windwakr wrote: This is easier than the above, add this to start of your file: Wow, that works just great!!! Thanks a lot! |
|||
16 Oct 2008, 12:02 |
|
baldr 20 Oct 2008, 21:23
alorent,
I'm using old C preprocessor technique of #if/#endif, as in Code: … if 0 invoke ExitProcess, 0 end if … |
|||
20 Oct 2008, 21:23 |
|
ouadji 13 Jan 2009, 21:45
Code: comment fix macro comment wonderful ! tks windwakr |
|||
13 Jan 2009, 21:45 |
|
vid 14 Jan 2009, 01:35
hate to repeat the obvious, but when using "if 0" or "comment fi macro comment", don't use it to comment preprocessor code - it might not work.
|
|||
14 Jan 2009, 01:35 |
|
baldr 14 Jan 2009, 06:10
vid,
Yep. Any technique has it's limitations, programmer should clearly understand how his/her source will compile (especially when using advanced macros, like invoke ). |
|||
14 Jan 2009, 06:10 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.