Because symbols are “global” within a file, it is best to define a subroutine per source file. This helps to avoid collisions of label names.
If functions are defined in different files, then it is necessary to “export” the entry point symbol name of a function so a linker can resolve references to it from other files. This is done by the .global directive.
For example, if a function is called funky, then it should be defined in a file called funky.s. Furthermore, a label funky should be used as the entry point of the subroutine. This means that the file should also contain the following line to export the symbol name:
Of course, if a program uses many functions, there will be many source files. It is a pain to do everything by hand. It is best to use a Makefile to help track the dependencies of files. This is a topic for another module.