Hello,
I tried a couple of things with your absolute assembly code.
Firstly, the file RAM.asm uses some constants that are defined in main.asm. So, for absolute assembly, these constants must be defined before INCLUDing RAM.asm. I also swapped the order of the last two includes.
NOLIST
INCLUDE 'derivative.inc'
LIST
FAST_RAM_START: EQU $0000
FAST_RAM_END: EQU $007F
RAM_START: EQU $0080
RAM_END: EQU $087F
ROM_START: EQU $8000
INCLUDE 'RAM.asm'
INCLUDE 'CPU.asm'
INCLUDE 'IRQ_ISR.asm'
INCLUDE 'IRQ_VEC.asm'
Once I had done this, I was actually able to get your main.asm code to assemble without complaint, using the CW assembler independently of the CW IDE. (I also needed to do a couple of additional things so that the include files could be found by the assembler.) Incidently, this is the way I would normally handle my absolute assembly projects.
However, with the same code handled via the CW IDE, when I attempted to Make the project, I did get a number of errors. These included "A2333: Forward reference not allowed" to the lines of code, within RAM.asm, that used the constants that were defined prior to the INCLUDE.
There was also a further error "A1104: Undeclared user defined symbol:" pertaining to the symbols 'Sys_Sts' and 'spurious'. The first symbol is defined within RAM.asm, and referenced within CPU.asm, whereas the second symbol is defined within IRQ_ISR.asm, and referenced within IRQ_VEC.asm. So everything is defined before it is referenced, as it should be.
My understanding is that XDEF and XREF do nothing for absolute assembly.
I cannot explain why the assembler tool should work as anticipated, but CW IDE does not. It would seem that the IDE does not handle absolute assembly in an identical manner to assembler.
Perhaps others may be able to offer an explanation.
I did find other obvious errors within your code, but not that would prevent assembly. Check that your ORG locations are what you intend, and check that you use the '$' prefix when you intend hexadecimal values.
Regards,
Mac