Local Labels in ST7 assmebly
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-01-06 9:55 PM
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-01-06 7:19 AM
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?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2003-01-06 9:55 PM
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!!