Is it possible to have MASM-like labels with FASM ?

Like this...

@@:
xor eax, eax
jmp @B

Thanks... (maybe it is on the doc, but I just printed it and am at work, so...)
Posted on 2002-07-24 05:26:57 by JCP
Now, these "anonymous" labels were never implemented. But you can use local labels instead.
Posted on 2002-07-24 05:31:18 by Tomasz Grysztar
Thanks for the answer.

Do you plan to add this feature ? (I personnaly find useful to have anonymous label for more or less small loops)
Posted on 2002-07-24 05:49:39 by JCP
With all due respect...

I do not think its a good ideea. Local labels are enough.

Anonymouse lables are nice only for the much too lazy writter that wants to copy and paste :P

After all its much easyer to read code (by others and yourself after a long time) with labels that actually mean something.

And with name space colision eliminated as for local labeles everything its OK.

IMHO of course
Posted on 2002-07-24 05:57:10 by BogdanOntanu

Is it possible to have MASM-like labels with FASM ?

Like this...

@@:
xor eax, eax
jmp @B

Thanks... (maybe it is on the doc, but I just printed it and am at work, so...)


I agree with Bogdan. Whats so bad about



_1:
xor eax, eax
jmp _1


? (except the detail, that this will be an endless loop)
Posted on 2002-07-24 06:08:43 by bazik
I don't see the point to have an assembler still in development if everytime an user asks for a feature, its branded as useless or wrong... that is were the laziness is : not even wanting to think about the problem deeply. :mad:

Imho an assembler must allow the most common coding style... and for people that have many MASM codes to reuse in MASM, it would facilitate the porting...
I'm not saying to integrate all the MASM feature in it and follow MASM syntax exactly, but if you want to have a popular assembler, you have to integrate popular features and it doesn't make the assembler worse but better as it is more flexible... and please more users.

Is it about making an assembler or creating a new langage with a strict semantic defined by what some users think as right or wrong?

I'm not critizing FASM because it doesn't have the features I need (the assembler is still in development, after all), but that everytime I suggest something, "good-thinking" people say that is not useful and won't be implemented for this reason only...

:mad:

Bazik: _1: means nothing, @@ means anonymous label. It is clearer to me, but I don't must be sane...
Posted on 2002-07-24 06:18:58 by JCP
Well, those "good-thinking" people are not deciding whether something will be implemented or not. I said you can use local labels instead, because thery are available by now, but I didn't say I won't implement anonymous labels in the future.

BAZik: you should rather use .1:
Posted on 2002-07-24 06:28:40 by Tomasz Grysztar
Privalov, thanks, that was my question.
It wasn't against you but critizing the other people coding styles behind the development of an assembler somewhat irritates me...
Posted on 2002-07-24 06:32:15 by JCP

BAZik: you should rather use .1:


Heh, one keypress (SHIFT) less :tongue:
Posted on 2002-07-24 06:50:52 by bazik
Finally 1.40 beta 2 has them implemented: http://fasm.metro-nt.pl/fasm140b.zip
Posted on 2002-07-24 07:12:17 by Tomasz Grysztar
So fast! :eek:

Thanks! :alright:
Posted on 2002-07-24 07:20:46 by JCP

Finally 1.40 beta 2 has them implemented: http://fasm.metro-nt.pl/fasm140b.zip


The file looks suspiciously identical to Beta 1. Is it just me?
Posted on 2002-07-24 08:18:02 by Frank
No, I can promise you it does support anonymous labels now. ;)
The previous beta didn't.
Posted on 2002-07-24 08:29:49 by JCP
Of course, I'm wonder if this feature could be created with macros...
Posted on 2002-07-24 08:30:19 by bitRAKE

Heh, one keypress (SHIFT) less :tongue:
The purpose with .1 is to use the local label mechanism. That way you can have thousands of .1 labels without conflict - easier cut-n-paste, too. ;)
Posted on 2002-07-24 17:20:03 by bitRAKE
Well, you could do something like:


macro @@
{
local ..label
..label:
@b equ ..label
}

@@
jmp @b

but it can't handle @f references, allows to define only one kind of label, and last but not least: is less elegant.
Posted on 2002-07-24 17:34:44 by Tomasz Grysztar



I agree with Bogdan. Whats so bad about



_1:
xor eax, eax
jmp _1


? (except the detail, that this will be an endless loop)


How is an endless loop bad? Besides, if you're writing some (say) kernel code, an interrupt could overwrite the contents of the instructions... or you're on a multi-tasking OS that swaps the the code out to HD and you're in a car and the write head overwrites that part of your HD... or some freak elevation in radiation causes your CPU's instruction cache to change... or you you're just running in Windows, in which case your computer will probably crash before any of that happens :grin:
Posted on 2002-07-24 20:15:28 by jademtech