I'm tring to create a conditional address statement in my start167.a66. The goal is to be able to use the same start up file with different uv2 targets. one target would be stand-alone and the other target needs to coexist with a bootloader ROM. (The programming tools I have available can only program CS0 ) I tried to create a block using the if/else statement but found out the hard way that the last/latest %Define statement will over ride any previous ones.
; BUSCON2/ADDRSEL2 ; --- Set BUSCON2 = 1 to initialize the BUSCON2/ADDRSEL2 registers $SET (BUSCON2 = 1) ; Uv2/Dave ;$IF (I_USE_CS0 = 1) ; pick you chip %DEFINE(ADDRESS2) (80000H) ; 0x80000 clears the 1'st ROM by 2 times (8*64K)->2x256 %DEFINE(RANGE2) (256K) ; (this setsup a mask for start address as well as size $ELSE ;][ App Programs are to run out of the second ROM and expect intr table @0 %DEFINE(ADDRESS2) (00000H) ; MUST BE SET TO 0! or no intrupts will work %DEFINE(RANGE2) (256K) ; only limited by $ENDIF ; ] of changed chip config