Skip to main content
Visitor II
January 7, 2003
Question

Local Labels in ST7 assmebly

  • January 7, 2003
  • 2 replies
  • 773 views
Posted on January 07, 2003 at 06:55

Local Labels in ST7 assmebly

    This topic has been closed for replies.

    2 replies

    Visitor II
    January 6, 2003
    Posted on January 06, 2003 at 16:19

    In ST7 assembly language is there any other way to make a label have local scope other than listing it after a 'LOCAL' directive as you would for a label in a macro?

    Visitor II
    January 7, 2003
    Posted on January 07, 2003 at 06:55

    LOCAL is a directive used only for MACROs. In order to define a label as local to a file, there is nothing to do!! That's the default case:

    loop ; loop is local (can not be called from another

    jra loop ; file)

    There are 2 ways to define a label as public:

    .loop ; to place a dot before the label name

    jra loop

    PUBLIC loop ; or to define it explicitely as public!

    loop

    jra loop

    Then, in all the files where the public label has to be called, the directive EXTERN will have to be used:

    EXTERN loop.w if loop address is a word (loop defined in the code)

    EXTERN variable.b if variable is defined in RAM0

    Hoping it will help!!