fgh dfhg

FreeRTOS+SMAC on 13192-SARD(CW5.1). Strange asm code.

Discussion created by fgh dfhg on Apr 25, 2007
Latest reply on Apr 26, 2007 by fgh dfhg
I`m trying to work with FreeRTOS + HCS08 + SMAC from here:
with CW5.1.
In the ordinal SMAC C-code

if (MCPSDataRequest(&gsTxPacket) == SUCCESS)

is compiled to

JSR 0x1a57 ;jumping to MCPSDataRequest
CMP #0x77

And that is resonable, because MCPSDataRequest returns value via A register.
But in the mentioned project FreeRTOS + HCS08 + SMAC the same C-code compiled to

JSR 0x2A50 ;jumping to MCPSDataRequest
CPHX #0x0077

comparing the HX register value with SUCCESS. But the returned value is still in A register and this check fails.
So, how to get back the right behavior?
Thanks in advance.