Plain vs Local Labels ...
From the point of view of encoded jumps sizes, RosAsm is a MonoPass Assembler. This means that the Encoder does not perform any kind of computation or optimization for short or long sizes of any jmp Instruction. For example, in a MultiPasses Assembler, if a jump can be short, and that the reserved space for encoding the Displacement is 4 Bytes, another computation will be run in order to adjust the reserved space to 1 Byte.
RosAsm always encodes Plain Labels as long Displacements (4 Bytes). Only Local_Labels Displacements can be encoded Short (1 Byte), if the Source Instruction has no direction Marker (default is Up-Short) or if it has a Short Marker (< for Up, or > for Down).
The inconvenience of this technical choice is that, if the user does not control by himself the code Sizes and makes use of Plain Labels inside the Routines for short moves, the produced Code will not be optimized from a size point of view.
The first advantage is, of course, the compilation speed. Another advantage is that, as this size choice is not done by the Assembler, the user has full control upon the sizes.
Inside Routines, you should never use Plain Labels. Local Labels should be preferred, or, even better, HLL Macros making use of Local Labels, with the 2 forms for short and long. In many circumstances, you will see that the use of short Local Labels is a very good error control for yourself. Avoiding long jumps inside a Routine is a pretty good security, for the prevention of errors like a missing label (inside the Routines), but existing label (outside, in another routine).
This last point is very important: Enabling an error case on bad short jumps, instead of having the jumps automatically optimized by the Assembler provides a earlier detection of a type of bug that may be pretty difficult to point out once running.
As a consequence of this encoding strategy, using Plain Labels is completely forbidden for some particular Instructions that work only in Short scope:
loop Instruction can only be Short-Up and the target can only be a Local Label.
jcxz / jecxz Instructions targets can only be Short scope Local Labels
Otherwise, an error Message is delivered.
~~~~~~~