Here is a good one for you guys......(I would ask in comp.lang.c, but not sure this is ANSI C and those guys get weird if it isn't STRICTLY C related).
I have a local function defined with the @far directive, a local prototype of the same function @far and looking into the map file the function has a f_ indentified. It is using 3 byte(ie far) addressing, BUT it stuck the bloody thing in near space.
I am using a Motorolla 9s12DG128 with the cosmic compiler v 4.6a.
I assume that Cosmic is doing some sort of optimization thing for me, but I don't know why or how to tell it that I really want it to put this in far space. I #pragma'd it to (ftext) but it still placed it in the .text section.
Any ideas? I have used this format in other context and it has worked as I would expect it to, so there is something unique causing it to do this.
JW
REMOTESTART_FAR void RemoteStart(BOOL coolantValid, UINT8 coolantTemp,\ BOOL ambientValid, UINT16 avgAmbient, UINT16 ignOffTime);
REMOTESTART_FAR void RemoteStart(BOOL coolantValid, UINT8 coolantTemp,\ BOOL ambientValid, UINT16 avgAmbient, UINT16 ignOffTime) { function stuff }
f_RemoteStart 0000519a defined in _output/\RemoteStart.o section BASE1 (.text)