You do not need to set the DEFINES at the beginning of your code. You can set the registers as you go. I would setup a couple of sub routines for this.