flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > suggestion /*Comments*/ (final rev.8 - over for me) Goto page 1, 2, 3, 4, 5, 6, 7, 8 Next |
Author |
|
ouadji 12 Feb 2010, 00:06
a suggestion, Why not include the code of "Mikolaj Hajduk" inside FASM ? This allows placement of comments on several lines, , or inside a line. The modification is not large, about twenty lines of code in PREPROCE.INC. I recompiled FASM and I tried this new feature, it works fine ! The possibilities of FASM about comments are very limited, The comments are very important in a source code. Be able to place them where you want, would be really useful. I think it would be an interesting new feature for FASM. Tomasz Grysztar, ( the Boss ) and all users of FASM, what do you think about this ? http://mikhajduk.houa.org/EN/Preproce.php Code: like this : /* comment comment comment */ OR, invoke /* comment */ MyProc, eax, ebx /* comment */ , ecx (sorry for my english, i do my best, it's not easy for me) Last edited by ouadji on 21 Sep 2010, 20:22; edited 12 times in total |
|||
12 Feb 2010, 00:06 |
|
windwakr 12 Feb 2010, 01:45
Comments are a waste of time. I'd rather get my code working now without wasting time writing comments than be able to come back in a few months and understand why it works.
Although, I do occasionally go back over my code when I'm done and comment the bits I remember the function of. |
|||
12 Feb 2010, 01:45 |
|
ouadji 12 Feb 2010, 09:35
revolution : Quote:
Obviously I know that ! windwakr : Quote:
perhaps about small projects (in a short period of time), and especially when we're alone on a project. Otherwise, comments are necessary, essential ! |
|||
12 Feb 2010, 09:35 |
|
edemko 12 Feb 2010, 10:53
good one, but when fasmw.exe is based on your preproce.inc and compiles a file the IDE crashes.
|
|||||||||||
12 Feb 2010, 10:53 |
|
ouadji 12 Feb 2010, 12:12
it's just a "starting point" ... To make it completely functional, it is obviously that the designer of fasm (Tomasz Grysztar) must do it himself. I'd like he looks this proposal, I think it would be a useful new feature for FASM. I don't pretend to modify FASM alone, it's just a suggestion for the boss !. Personally, i don't use Fasmw, but i use UEStudio. (or RadAsm) |
|||
12 Feb 2010, 12:12 |
|
revolution 12 Feb 2010, 12:56
ouadji: There has been a lot of discussion in the past about comment style. Did you search?
http://board.flatassembler.net/topic.php?t=582 http://board.flatassembler.net/topic.php?t=839 http://board.flatassembler.net/topic.php?t=2237 http://board.flatassembler.net/topic.php?t=3483 http://board.flatassembler.net/topic.php?t=4340 http://board.flatassembler.net/topic.php?t=5538 http://board.flatassembler.net/topic.php?t=5871 http://board.flatassembler.net/topic.php?t=7115 http://board.flatassembler.net/topic.php?t=7481 http://board.flatassembler.net/topic.php?t=9911 |
|||
12 Feb 2010, 12:56 |
|
DOS386 12 Feb 2010, 14:57
revolution wrote: There has been a lot of discussion in the past 582 839 2237 3483 4340 5538 5871 7115 7481 9911 11161 I highly support this nevertheless Code: /* LET A=3 PRINT A */ MOV EAX, 3 CALL DECOUT32 ; Input in EAX http://board.flatassembler.net/topic.php?t=11086 Code: USE32 /* 83 C0 00 */ ADD EAX, 0 /* 66 83 C0 00 */ ADD AX, 0 ; Bad in USE32 code /* 0F 0B */ UD2 |
|||
12 Feb 2010, 14:57 |
|
ouadji 12 Feb 2010, 15:47
Yes, I know that. a lot of discussion about this (too much !) ... many solutions with a "macro". No really nice solution ! Quote:
Sorry, just alternatives, nothing really effective in all cases ! and with a "macro", how to do this: Code: invoke MyProc, /* comment */ [toto], /* comment */ eax OR /* comment */ opcode I think it's high time that FASM Allows a nice solution for this feature ! Mikolaj Hajduk code in an good solution ! |
|||
12 Feb 2010, 15:47 |
|
ouadji 12 Feb 2010, 22:19
@serfasm ... (and all those who are interested) FASMW.exe is ok now with multiline comments. (I did a small error in the modified "PREPROCE.INC". I also updated my first download above. All is ok now.) With this modified version of FASMW, I have no problems to compile this: Code: /* comment */ mov eax, /* comment */ 'halt' /* comment */ mov eax , eax ; comment nop /* comment */ ret /* comment */ 4 Last edited by ouadji on 21 Sep 2010, 20:23; edited 1 time in total |
|||
12 Feb 2010, 22:19 |
|
edemko 13 Feb 2010, 01:56
TomaszTheBoss, will you stay aside :)?
Last edited by edemko on 13 Feb 2010, 03:11; edited 1 time in total |
|||
13 Feb 2010, 01:56 |
|
revolution 13 Feb 2010, 02:35
Does not compile:
Code: mov ecx,'/*' mov edx,'*/' /* cmp ebx,'/*' mov eax,'*/' */ nop |
|||
13 Feb 2010, 02:35 |
|
edemko 13 Feb 2010, 03:10
We are to achieve an equality:
(TomaszTheBoss * the University) =< (TomaszTheBoss * the Board) ...as it will be much difficult, ouadji, to rewrite the include version a version which might be changed. {ouadji, you could try Delphi styled comments; it will also decrease modification size} |
|||
13 Feb 2010, 03:10 |
|
baldr 13 Feb 2010, 07:50
MHajduk's patch was based on 1.67 codebase. No reasons to inject it into later builds.
Should ";" comments have priority over "/* */"? |
|||
13 Feb 2010, 07:50 |
|
ouadji 13 Feb 2010, 10:03
revolution wrote: Does not compile: just trying to be right ? I tease you ! Obviously ... but as I said, it's a starting point, I am not Tomasz Grysztar. That being said, it's a very small problem compared to the benefits, ... but i will try to fix it ! Quote: @baldr : MHajduk's patch was based on 1.67 codebase. No reasons to inject it into later builds. no problem to inject it into later builds than 1.67 ! Proof, i just do it with 1.69.12 ! i have injected it in the last version of PREPROCE.INC . (I slightly changed it (optimized) but no change in its functioning) ";" comments have priority over "/* */"? : yes Last edited by ouadji on 13 Feb 2010, 10:24; edited 1 time in total |
|||
13 Feb 2010, 10:03 |
|
revolution 13 Feb 2010, 10:17
ouadji wrote: just trying to be right ? Can you fix it? |
|||
13 Feb 2010, 10:17 |
|
ouadji 13 Feb 2010, 10:33
yes, i will try to fix it ... ... but I'm not the boss ! I think Tomasz Grysztar should be involved in the subject ! I am not the owner of FASM. I think I have sufficiently showed the direction of the solution. there is no more much to do ! (Apart from this single exception (above) , it works very nice !) sorry for my english, i do my best. |
|||
13 Feb 2010, 10:33 |
|
revolution 13 Feb 2010, 10:44
There are many cases to consider:
Has a single quote infixed Code: /* don't look here */ Uses a single quote: Code: /* mov bx,'*/' */ Uses a double quote: Code: /* mov bx,"*/" */ Comments out a multiline Code: stdcall Something,value1,\ value2,\ /* value3,\ */ value4 Comments out a comment Code: /* xor eax,eax ;zero eax */ Comments out a comment (2) Code: xor eax,eax ;zero eax /* ignore me */ What should be done in all the above cases? |
|||
13 Feb 2010, 10:44 |
|
ouadji 13 Feb 2010, 11:02
Code: OK --- /* don't look here */ stdcall Something,value1,\ value2,\ /* value3,\ */ value4 /* xor eax,eax ;zero eax */ NOT OK -------- /* mov bx,'*/' */ /* mov bx,"*/" */ xor eax,eax ;zero eax /* -------> not ";zero eax /*" but "/* zero eax" (ok) ignore me */ I must go, i will be back to the forum later. Last edited by ouadji on 13 Feb 2010, 11:10; edited 1 time in total |
|||
13 Feb 2010, 11:02 |
|
revolution 13 Feb 2010, 11:09
Does not compile:
Code: stdcall Something,value1,\ value2,\ /* value3,\ */ value4 |
|||
13 Feb 2010, 11:09 |
|
Goto page 1, 2, 3, 4, 5, 6, 7, 8 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.