§_or_$  ....



RosAsm notations never assume any typing (just like NASM). So you have to always specify some markers. Many older programmers, who are accustomed to MASM, do not like this at all, and consider it as an added pain to have to regularly specify the size, the type, and so on... They usually prefer declaring a symbol as 'type defined' and go on. 


The result of typing is unreadability. The advantage of having no typing at all and markers in all places instead is that we never have to search for what a given symbol is. This is extremely time saving, for the programmer, for future readers, and also, for the compiler, as, for example, when it encounters some &TRUE, there is no need to search what kind of symbol it is. First char > Win Equate > done. It's just the same for YOU as reader of your own writings, two months later...


Two characters are available for defining the size of accessed Values: Paragraph characters and Dollar character. (These two same characters are to be used to define Data Declarations):


mov eax D§ebx  |  sub bl B$MyCount


RosAsm actually subtitutes  $  to  §  ,so that the two keyboard inputs are equivalent on the screen.


This is to replace the old killing:


mov eax, DWORD PTR[ebx]  |  sub bl, BYTE PTR[MyCount]


Note: Given the importance of this notation in the overall RosAsm syntax design, the replacement of '§' by '$' is performed directly by intercepting the keyBoard input. An inconvenience comes with this technical choice: When you'd like to really type a '§' character, say, inside a String, you will have to explicitely write, for example:


[Data: B$ 'I'm using ', 167, '...'] 


, instead of


[Data: 'I'm using $...']


If you do not want, at all, of this substitution, just set the [With $ Marker only] Flag in the Configuration Tab [Sources Editor] Dialog.


I provide two signs in order to make it easy on all national Keyboards. Just choose the easiest one for you.


The '@' sign may be used the same way for Local_Symbols definitions and evocations.


Now, for beginners: Why do we have to tell the size? Lets look at this with a very common example:


cmp  D§ebp+12  &WM_COMMAND


Here we mean to compare the ''contents'' of an address pointed by ''ebp+12''. In this example, ebp points to the stack. Ebp value could be, for example,  063FF78 hexa, this is to say to one particular place in a particular memory reserved for Stack operations.


Now, we want to compare the value written in that place with WM_COMMAND  value (0111 hexa). 


If you are a pure beginner, it may be you do not have a really clear idea of what is a memory address and what is a value in memory. If so, imagine your computer's memory as a wide set of little boxes one after another. Some registers (eax, ebx, ...) may be managed, either by you, or directly by the processor's instructions, to point to what little box is actually going to be read or written to. This is the Pointer concept:


mov eax ebp    ; < eax = 063FF78 hexa.This is the pointer.

mov eax D§ebp ; < eax = value previously stored at the pointed to address.


If we just type something like:


cmp [ebp+12]  &WM_COMMAND


RosAsm (or any other Assembler) couldn't guesss if we intend to compare a byte with 0111, a word with 0111, or a dWord with 0111. In this example, if D$ebp+12 value were 0_A200_0111, W$ebp+12 would be equal to 0111, whereas D$ebp+12 would be greater.


~~~~~~~