Much like in C with functions, the Keil assembler labels in one file may be used in another file using the 'EXTRN CODE' and 'PUBLIC' keywords. The calling file should use the 'EXTRN CODE (<label>)' keyword to notify the assembler that the label used in the file is defined in another file. The file that contains the label definition should use the 'PUBLIC <label>' keyword to make the label available to other files.
In the attached Blinky example, the LED blinking code has been placed in a separate file (LED.asm) from main (in F31x_Blinky.asm). The Main label uses a jmp Blink_LED instruction to jump to this function. At the top of the F31x_Blinky.asm file, the Blink_LED label has been declared:
EXTRN CODE (Blink_LED)
In the LED.asm file, the Blink_LED label is made accessible by declaring it public:
The F31x_Blinky.asm file is then able to jump to the code in the LED.asm file.
Please see the attached example for more information.