I do this all of the time with storing code in other banks in separate files.
You need to include the file name in the main file of your code like so.
.bank 0
.org $8000
.include "maincode2.asm"
So, in Bank 0 of maincode.asm, I am storing the file maincode2.asm. You can do this anywhere in your code, you don't need to have the .org or memory location there unless you are specifically storing it at that location for some reason. The key is to use use that .include. This literally puts all of the code in that file in that exact location in your code.
I like to use this for bankswitching. Below is just a peak at how I organize my banks and include separate files. If you are not to bankswitching yet, don't worry about that part. Just understand that whereever you put the -.include "filename.asm"- in you code is exactly where the assembler sees the code in filename.asm.
;;;;;;;;;;;;;;;;;bankSource=00;;;;;;;;;;;;;;;;;;;;
.bank 0
.org $8000
.include "maincode2.asm"
.bank 1
.org $A000
.include "maincode3.asm"
;;;;;;;;;;;;;;;;;bankSource=01;;;;;;;;;;;;;;;;;;;;
.bank 2
;;;NO MORE CODE! FOR FLASH SAVING!!!
;.org $8000
.org $0500 ;;put code in ram
.include "flashsavefiles\savecode.asm"
.bank 3
.org $A000
SCORESFLASH:
.incbin "flashsavefiles\blank.bin"
;;;;;;;;;;;;;;;;;bankSource=02;;;;;;;;;;;;;;;;;;;;
.bank 4
.org $8000
TitleGraphics:
.incbin "CHRfiles\titlesprites.chr"
.incbin "CHRfiles\titlegraphics.chr"
.bank 5
.org $A000
GameGraphics:
.incbin "CHRfiles\gamesprites.chr"
GameBGGraphics:
.incbin "CHRfiles\gamegraphics.chr"