Syntax flexibility ....
RosAsm not only works on multi-instruction lines and multi-line instructions but it gives some new features for source text organization:
Comma sign ',' doesn't mean anything but 'Not over...' in multi line instructions and 'not one word' before signed numbers. So, it makes it possible to use commas where you want, as many times as you want. All following statements are good:
mov eax ebx | mov eax,ebx | mov,,,,, eax,,,,,,,,ebx
The main reason why assemblers need the comma sign is here: | mov D§eax -4 | In this case, the text parser would suppress the true separator space (just like in | mov D§eax - 4 ecx | ), so that | mov D§eax-4 | produces an error. Of course, in RosAsm too, you will have to write: | mov eax, -4 | but, as this is the only one case where a comma is needed, I don't consider it a good reason to make it a rule. (you can as well write: | mov D§eax 0-4 | you can, of course, put commas everywhere -the old way- if you prefer to). I recommend the | mov eax 0-4 | formulation.
Commas are not required inside square brackets (to tell the Parsers that the Bracket Statement(s) is (are) not over), even if you insert blank lines or comments. Pay attention that freedom and flexibility in source writing has some counterpart: RosAsm has a few controls on mistakes like :
[open_bracket
In some (rare) cases this error may not be found. It could be done but flexibility would be decreased.
Out of Win32 Equates Names and text expressions, The sign '_' is given 'free of meaning' to draw lines,
________________________ = ; ___________________________
and to insure clear writing:
My_Value = myvalue = M_Y___V_A_L_U_E
all these forms will refer to the same internal symbolic: 'MYVALUE'. Particularly useful for binary numbers:
00_1010_1111_0000_0011 = 001010111100000011
'_' sign is simply stripped off by the text parser and does not appear in further treatments with one important exception: The integrated Win Equates '_' signs are NOT stripped off and are really meaningful.
Spaces are fully controlled by the parser, so that:
mov ah b§si+1
mov ah b§ si + 1
mov ah, b§ si + 1
are all equivalent. Spaces are the true separators between the components of a statement, but the text parser is able to strip off the meaningless ones.
Note for the advanced search features of the Source_Editor: If you write
[MyData : 0]
My_Proc :
....
with a space before the colon, Right click search and tree view will not find these labels because these features apply on your real text.
RosAsm is a one pass model from the theoretical encoding point of view, but in its global way of working, it is a multi-pass (many passes, in fact). So, you can organize your source file the way you want; even macros and equates at last, entry point at first or about end and so on. The only one counterpart is that you can't redefine equates.
~~~~~~~