Page 1 of 1

NESASM3 - Using Multiple ASM files?

Posted: Mon Jul 23, 2018 10:58 pm
by chemical
Hello,

I am working through Nerdy Nights right now, and everything is going well.

I am noticing my ASM code is starting to get rather long, is there a way to incorporate multiple ASM files so I can break my code out into multiple files?

Re: NESASM3 - Using Multiple ASM files?

Posted: Mon Jul 23, 2018 11:37 pm
by tokumaru
You can use the INCLUDE directive to "insert" the contents of a file into another (e.g. .include "otherfile.asm"). One common solution is to break up the program in several .asm files as you see fit (modules, functions, whatever), and have a main file that includes all the others to make a cohesive ROM.

Re: NESASM3 - Using Multiple ASM files?

Posted: Tue Jul 24, 2018 11:35 pm
by chemical
Awesome! Thank you, my code is so much easier to read now.

Re: NESASM3 - Using Multiple ASM files?

Posted: Wed Jul 25, 2018 5:41 am
by Banshaku
Great. Once you have something working then share it with the community ;)