To map the RAM differently you need to do the following:
In the PRM file change the addresses. For example, this maps RAM from 0x2000 to 0x3FFF, with reserved space for the stack.
SEGMENTS
STACK_RAM = READ_WRITE 0x2000 TO 0x24FF;
RAM = READ_WRITE 0x2500 TO 0x3FFF;
END
PLACEMENT
.stack INTO STACK_RAM;
END
STACKSIZE 0x500
Note: the stack should be placed below the rest of the RAM in the memory map. That way, a stack overflow will write to illegal addresses yielding an error, instead of silently trashing your whole RAM.
Whether you write in assembler or C, you will then have to write to the RAM mapping register INITRM (the CW debugger can handle such memory mapping writes in runtime). This is best done directly from the reset vector. Example:
void interrupt_reset(void)
{
#pragma MESSAGE DISABLE C12053
asm LDS #$2500; /* set stack */
INITRM = 0x21; /* map RAM */
asm CALL main;
}