I just started a larger project completely coded in Assembly. Having multiple subroutines, macros, memory tables etc. I am wondering how I can best split the code up in multiple files. The goal is obvious a better structure and a better readability.
Currently I use an .inc-file containing all my constant definitions (.equ
) but how to handle my many subroutines? If I want to put them in another file, do I need to use an .asm-file (since it contains executable code)? More general: what is the difference between .asm- and .inc-files, especially concerning including them into one main file in the end?
And once I have split up the file how can I handle multiple dependencies (i.e. file A includes file B and C of which file B includes file C as well). Since apparently my current environment, Atmel Studio 6, does not like double inclusions.