flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > nop \ [solved] |
Author |
|
Madis731 05 Oct 2011, 09:58
Are you sure? The first example does not have whitespace after the nop\ and users intention was to continue on the next line. Its the user's bug.
The second example is assembled to two rows where the first row consists of "n","o","p","\",13,10 and the second "n","o","p". CR and LF (at least according to HTML) are whitespace. I don't know how they're supposed to be handled by FASM. This user bug is hard to find, but I think its up to the user to fix. |
|||
05 Oct 2011, 09:58 |
|
Tomasz Grysztar 05 Oct 2011, 10:45
First case only causes error when you do not have a line following the "nop\" line, and it is "unexpected end of file", because fasm is looking for the next line to concatenate it in place specified by "\", but finds none.
Press enter after "nop\", save, and you've got no error. |
|||
05 Oct 2011, 10:45 |
|
Madis731 05 Oct 2011, 10:51
I remember seeing this kind of (error?) in some C compiler's IDE, where it greeted you with a warning/error (I cannot remember) at compile time, saying you needed a newline at the very end of every source/include file. I felt it was weird, but I got accustomed.
Is it a matter of taste? Elegance? Completeness? I don't know. |
|||
05 Oct 2011, 10:51 |
|
ouadji 05 Oct 2011, 11:18
Code: if last_char='\' AND ~ next_line eq ;and ! {concatenate } else {all ok, go} just because one likes perfect things. |
|||
05 Oct 2011, 11:18 |
|
LocoDelAssembly 05 Oct 2011, 14:02
Quote:
"Warning: No newline at end of file"? I think that was the warning in GCC. |
|||
05 Oct 2011, 14:02 |
|
Tomasz Grysztar 05 Oct 2011, 14:42
ouadji wrote:
However in my opinion current behavior is strictly logical - think of "\" as two-argument operator here, it needs two lines ("arguments") to concatenate. When you have no next line, this "expression" is invalid. It is like if you wrote "a = 1+". |
|||
05 Oct 2011, 14:42 |
|
ouadji 05 Oct 2011, 16:10
Quote: I do not really understand your pseude-code there but also(2) if the following line exists.(3) in other words,if the next line does not exist, ignore the "\" character Code: if last_char='\' ;(1) AND ;(2) ~ next_line eq ;(3) Quote: It is like if you wrote "a = 1+". In fact, on second thought, i'm agree with you. |
|||
05 Oct 2011, 16:10 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.