flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > suggestion /*Comments*/ (final rev.8 - over for me) Goto page Previous 1, 2, 3, 4, 5, 6, 7, 8 Next |
Author |
|
LocoDelAssembly 24 Feb 2010, 03:08
Although it is probably great to have multi-line comments (and comments between line code), if this is accepted for the official package it will introduce an incompatibility (match is currently able to find /* and */).
Probably this will hardly be a problem for existing code though, and there was a change in the past with the processing of the curly braces that affected backward compatibility much more seriously (this time lots of written code affected), but yet I wanted to point out this problem. |
|||
24 Feb 2010, 03:08 |
|
revolution 24 Feb 2010, 03:20
LocoDelAssembly, I doubt that Tomasz will include it in the official releases. But it is good for people that want to make their own version and have this feature. Personally I don't need it in my code.
|
|||
24 Feb 2010, 03:20 |
|
ouadji 24 Feb 2010, 07:07
Quote:
"/**/" Is no more appropriate? ... "!@@!", "§°°§", "<[]>", "+()+" or any others. Quote:
This would be pity to deny this type of improvement for Fasm. This last version is perfect and would deserve a little interest from Tomasz. All good compilers have a advanced management comments, FASM is a good compiler and deserves to have management of comments more advanced than only the sign ";" at the end of sentences. I ask nothing, I give it ... a finished product, efficient, powerful. if my code contains elements that Tomasz do not like, I can modify it according to his choice. I'm open to any requests from him about possible changes, modifications, or others.. |
|||
24 Feb 2010, 07:07 |
|
revolution 24 Feb 2010, 07:19
ouadji wrote:
more advanced than ;". Good compilers do what the user needs without bugs (or unnecessary bloat). If you want Tomasz to consider including this in the official sources then I expect you have to show where this is necessary and useful beyond the current methods. What problem does it solve that cannot be solved in the current version? Give a good reason to show where it is needed and the rest is easy, it would happen. But without a compelling reason it is just extra fluff. |
|||
24 Feb 2010, 07:19 |
|
ouadji 24 Feb 2010, 08:11
A good compiler is a compiler that compiles well, who builds a good code, which does not have a bugs ... I totally agree with you! A good compiler, or rather a complete compiler, is a compiler that has "also" a good management of comments and provides developers with good features about it. To develop a project alone in "his corner", no need many features about this. A sheet of paper beside the keyboard is perfect. "in his corner', in french, it means "alone" ! When developing in a team, and for a long time, a advanced management comments is essential. It's amazing, usually we debate things to improve them, and here, we discuss to try that things do not change ! Last edited by ouadji on 24 Feb 2010, 08:51; edited 1 time in total |
|||
24 Feb 2010, 08:11 |
|
revolution 24 Feb 2010, 08:51
ouadji: You still have not given any example of where your comment style is vital and solves a current problem. I am not trying to say that it has no merit, I am trying to help you to convince Tomasz.
|
|||
24 Feb 2010, 08:51 |
|
ouadji 24 Feb 2010, 09:28
Code: @Intercept dw 1 dup (\ /* A - B - Table_A : Direct interception -------- */ /*targetA1*/ 0, /*targetA2*/ 0, /*targetA3*/ 0,\ /* Table_B : indirect interception -------- */ /*targetB1*/ 0, /*targetB2*/ 0, /*targetB3*/ 0,\ /* below : priority target ----------------------- comments, objectives and description a) b) ... ... */ /* level_0 */ 0) |
|||
24 Feb 2010, 09:28 |
|
ouadji 24 Feb 2010, 10:01
or more simply this: Code: @Intercept dw 1 dup (\ \ /*targetA1*/ 0, /*targetA2*/ 0, /*targetA3*/ 0,\ /*targetB1*/ 0, /*targetB2*/ 0, /*targetB3*/ 0,\ /*targetC1*/ 0, /*targetC2*/ 0, /*targetC3*/ 0,\ /*targetD1*/ 0, /*targetD2*/ 0, /*targetD3*/ 0) |
|||
24 Feb 2010, 10:01 |
|
MHajduk 24 Feb 2010, 10:24
I think that there is a one big advantage which multiline comments give us: when you need to comment large piece of code. With C-style /*...*/ comments you can do it very quickly adding only 4 symbols (/* just before the block and */ after it). With "classical" assembler comments you need to precede every single line of this large piece of code with semicolon ';', so amount of work you have to do is noticeable bigger in such case.
I don't agree with those who claim that FASM preprocessor is just ideal and there is no need to change. Referring to the macros mechanism we may say euphemistically that it's "highly inconvenient", however one can use another, more relevant, epithetes here. Yes, FASM preprocessor should be completely rewritten to be more elastic and, what is the most important, easily extensible. We should appreciate ouadji's attempts in this matter because he revived old but anyway actual question and did it with impressive enthusiasm and consequence. |
|||
24 Feb 2010, 10:24 |
|
revolution 24 Feb 2010, 10:25
Alternative?
Code: @Intercept dw 1 dup (\ \ 0,\ ;targetA1 0,\ ;targetA2 0,\ ;targetA3 \ 0,\ ;targetB1 0,\ ;targetB2 0,\ ;targetB3 \ 0,\ ;targetC1 0,\ ;targetC2 0,\ ;targetC3 \ 0,\ ;targetD1 0,\ ;targetD2 0) ;targetD3 |
|||
24 Feb 2010, 10:25 |
|
ouadji 24 Feb 2010, 10:56
it has no resemblance to the example I proposed. This is absolutely not the same presentation. The concept of a Table disappeared. your presentation distorts and does not show the function of the object I don't talk about to manage to put comments "in spite of everything", I talk about a real feature to do this. It's not the programmer who must adjust to the program, but the reverse. Better clarity, better readability, a presentation that reflects the function of the object. This ensures a comfortable development. Comment a program is more than just put comments. Last edited by ouadji on 24 Feb 2010, 11:03; edited 1 time in total |
|||
24 Feb 2010, 10:56 |
|
bitshifter 24 Feb 2010, 11:00
MHajduk wrote: I think that there is a one big advantage which multiline comments give us: when you need to comment large piece of code... Why not like this? Code:
if 0
...
... a whole bunch of code ...
...
end if _________________ Coding a 3D game engine with fasm is like trying to eat an elephant, you just have to keep focused and take it one 'byte' at a time. |
|||
24 Feb 2010, 11:00 |
|
ouadji 24 Feb 2010, 11:09
We could not see things ... a little more professional ? Last edited by ouadji on 24 Feb 2010, 11:17; edited 2 times in total |
|||
24 Feb 2010, 11:09 |
|
MHajduk 24 Feb 2010, 11:12
bitshifter wrote:
|
|||
24 Feb 2010, 11:12 |
|
ouadji 24 Feb 2010, 11:51
Quote:
yes, but with your help MHajduk. My final code is totally different from yours, but without it , I could not succeed! |
|||
24 Feb 2010, 11:51 |
|
MHajduk 24 Feb 2010, 12:08
ouadji wrote: My final code is totally different from yours |
|||
24 Feb 2010, 12:08 |
|
revolution 24 Feb 2010, 13:24
I find that if/when I need to disable a large portion of code that an 'if 0'/'end if' block would often work but it is not clear to me in the editor window that each line has been disabled. Instead, for that situation I usually highlight the section and do a search and replace to replace all line-starts (^) with a semi-colon (;). This way if the first and last lines of the block are not visible on the screen then each individual line is clearly marked and has proper colouring.
eg. pretend that this code box below is in your editor view window, with code above and below not currently visible: Code: mov eax,aValue add ecx,[aLocation] ror edx,14 cmp byte[esi],0xef jpo .label If instead you saw this Code: ; mov eax,aValue ; add ecx,[aLocation] ; ror edx,14 ; cmp byte[esi],0xef ; jpo .label ouadji: Can you make your code properly highlight/lowlight/recolour the commented text blocks in the view screen? |
|||
24 Feb 2010, 13:24 |
|
ouadji 24 Feb 2010, 14:05
"highlight/lowlight" is not a feature of the compiler, but a feature of the text editor. This is not a special feature of FASMW. I have this feature also with UEStudio. I must just specify what is the symbol that marks the beginning of a comment. FASMW is a "integrated product" (text editor + fasm). FASMW does not have this option (choice of symbol) |
|||
24 Feb 2010, 14:05 |
|
Borsuc 24 Feb 2010, 15:20
revolution wrote: eg. pretend that this code box below is in your editor view window, with code above and below not currently visible: _________________ Previously known as The_Grey_Beast |
|||
24 Feb 2010, 15:20 |
|
Goto page Previous 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.