2003-01-06 09:55 PM
2003-01-06 07:19 AM
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?
2003-01-06 09:55 PM
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!!