[A83] Re: Local labels in tasm...


[Prev][Next][Index][Thread]

[A83] Re: Local labels in tasm...




At 19:29 2001-12-08, you wrote:
>A while ago someone mentioned something about local labels in tasm...
>could anyone explain this to me in more detail?
>tnx
>--Peter-Martijn

This is from page 13 of Tasm.doc:

----
Labels. Labels are strings of characters that have a numeric value associated
with them, generally representing an address.   Labels can contain upper  and
lower case letters, digits,  underscores, and periods.   The first  character
must be a  letter or the  local label prefix  (default '_'). The  value of  a
label is  limited  to  32  bit  precision.   Labels  can  contain  up  to  32
characters, all of which are significant (none are ignored when looking at  a
label's value, as in some assemblers).   Case is significant unless the  '-i'
command line option is invoked.

Local labels must  only be  unique within the  scope of  the current  module.
Modules are defined with the MODULE directive.  Here is an example:

                .MODULE xxx
                lda regx
                jne _skip
                dec
         _skip  rts

                .MODULE yyy
                lda regy
                jne _skip
                dec
         _skip  rts


In the above example, the _skip label is reused without harm.  As a  default,
local labels are not shown in the label table linting (resulting from the  '-
l' command line  option).   See also  sections on  MODULE and  LOCALLABELCHAR
directives.
----

I have more examples from my own code if you need.

///Olle





Follow-Ups: References: