Message board for the users of flat assembler.
> Main > Legal label characters
The docs are a bit vague on this, so what exactly are the legal characters that can appear within a label?
A forum search reveals that '.' is legal, but not at the start of a label. How about '$'? any others?
Will such labels export correctly?
|08 Feb 2004, 01:49||
Actually "." is valid symbol even at the begining of the label, only it have a little bit special meaning. Point as first char in label defines so called "local" labels. Actually this means that the label with point will be concatenated with the last used "global" label (i.e. without "." as first char) for form the full name of the label. This allows programmer to create equal names for labels in different parts of code, for example subroutines.
Another case is with labels begining with two points: '..'
Such labels are global, but they did not become "current" global label. Example:
SomeGlobal1: nop .local1: nop .local2: SomeGlobal2: nop .local1: nop ..GlobalNotCurrent: nop .local2: ret
In the above example the full names of the labels are:
|08 Feb 2004, 02:30||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.