flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Multiline /* ... */ comments in FASM. |
Author |
|
MHajduk 27 May 2007, 17:54
I've just added two little blocks of instructions to the 'PREPROCE.INC' file to allow multiline C-style comments (i.e. /* .... */):
Added fragments: Code: symbol_character: cmp al,3Bh je ignore_comment ; ; Looking for '/*' symbols (begin of multiline comment block). ; \ ; ; \ ; | ; Looking for '/'. ; | ; ; | cmp al, 2Fh ; | jne @f ; | lods byte [esi] ; | ; | ; Looking for '*'. ; | ; ; | cmp al, 2Ah ; \ Lines added by je multiline_comment ; / Mikolaj Hajduk ; | 27.05.2007. ; Reloading previous value of esi register if read pair differs ; | ; from '/*'. ; | ; ; | dec esi ; | dec esi ; | lods byte [esi] ; | ; / @@: ; / cmp al,5Ch Code: ; ; \ ; Cutting off multiline comment block. ; \ ; ; | multiline_comment: ; | lods byte [esi] ; | or al, al ; | jz line_end ; | ; | cmp al, 1Ah ; | je line_end ; | ; \ Lines added by ; Looking for '*/' symbols (end of multiline comment block). ; / Mikolaj Hajduk ; ; | 27.05.2007. ; | ; Looking for '*'. ; | ; ; | cmp al, 2Ah ; | jne multiline_comment ; | ; | ; Looking for '/'. ; | ; ; | lods byte [esi] ; | cmp al, 2Fh ; | jne multiline_comment ; / jmp convert_line_data ; / ignore_comment: [EDIT]Added version of 'PREPROCE.INC' with my & Mr_Silent's improvements.[/EDIT]
Last edited by MHajduk on 28 May 2007, 13:13; edited 3 times in total |
|||||||||||||||||||||
27 May 2007, 17:54 |
|
Ehtyar 27 May 2007, 21:22
Oh that is just sexy, what else can i say. Thank you Mikolaj. For those not bothered to recompile fasm, the topic of multiline comments in fasm has been solved using macros here.
Ehtyar. |
|||
27 May 2007, 21:22 |
|
vid 27 May 2007, 23:27
nice job, it going to be highlighted.
Someone could also provide diff file for future compatibility |
|||
27 May 2007, 23:27 |
|
Mr_Silent 28 May 2007, 10:43
Tried to fix those issues I mentioned above.
I wonder how many bugs are still left
|
|||||||||||
28 May 2007, 10:43 |
|
MHajduk 28 May 2007, 10:47
Thanks to all of you for good words.
|
|||
28 May 2007, 10:47 |
|
MHajduk 28 May 2007, 11:27
Mr_Silent
I've just tested 'PREPROCE.INC' with your changes - also good work. [EDIT]I've added to the first post in this thread 'PREPROCE.INC' with your improvements.[/EDIT] |
|||
28 May 2007, 11:27 |
|
DOS386 06 Aug 2007, 06:31
Making this official would be my wish for 1.67.23
|
|||
06 Aug 2007, 06:31 |
|
MHajduk 06 Aug 2007, 06:40
NTOSKRNL_VXE wrote: Making this official would be my wish for 1.67.23 |
|||
06 Aug 2007, 06:40 |
|
Tomasz Grysztar 06 Aug 2007, 08:44
There are some other reasons why it has not been done.
|
|||
06 Aug 2007, 08:44 |
|
DOS386 06 Aug 2007, 10:46
Some more hints about them available ?
|
|||
06 Aug 2007, 10:46 |
|
rugxulo 31 Aug 2007, 05:22
Tomasz Grysztar wrote: There are some other reasons why it has not been done. /* Like what? Just ignore /* or */ inside any string literals and behind normal ; comment lines. (Sorry, I know it's not quite that simple, just saying ...) */ |
|||
31 Aug 2007, 05:22 |
|
comrade 06 Apr 2009, 16:36
What's the status on official support of this? Just wondering
|
|||
06 Apr 2009, 16:36 |
|
rxantos 22 Jun 2009, 15:31
This is useful as it would allow to use doxygen to comment assembly sourcecode. Of course, you will still need to use @fn, @struct, @typedef in the comment, but at least you can have the comment at the same place as the code. Instead of a different tile.
I hope it makes it to be official. |
|||
22 Jun 2009, 15:31 |
|
MHajduk 23 Jun 2009, 09:53
rxantos wrote: I hope it makes it to be official. |
|||
23 Jun 2009, 09:53 |
|
Azu 19 Aug 2009, 09:35
Tomasz Grysztar wrote: There are some other reasons why it has not been done. |
|||
19 Aug 2009, 09:35 |
|
MHajduk 19 Aug 2009, 10:30
Azu wrote:
|
|||
19 Aug 2009, 10:30 |
|
Plue 19 Aug 2009, 19:33
What is wrong with if 0 .. end if?
|
|||
19 Aug 2009, 19:33 |
|
Azu 19 Aug 2009, 21:03
Try to compile this and find out.
Code: blah equ db 0 if 0 blah equ db error macro foo bar{ if bar eq 1 db 3 else dd 12345678 end if } foo 1 end if blah |
|||
19 Aug 2009, 21:03 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.