AnsweredAssumed Answered

Problem with copy routine for HCS08 and CW 5.1

Question asked by Ralph Beck on Jun 4, 2007
Latest reply on Jun 21, 2007 by Ralph Beck
Maybe a beginners question, but I don't know whats wrong there.
In my program I have to copy different strings from Flash to my transmit queue which is in RAM (for sure :-)). So I tried to find a good assembler routine to do this with minimal effort. Fortunately (?) I have found a routine in HCS08RM chapter "Memory to Memory Moves":

    ldhx    #TX_queue
    lda      (Text-TX_queue),x
    beq      end_of_copy
    sta      ,x
    bra      copy_loop

If I start with "make" button of CW5.1 I get the following Error:
A2401: Complex relocatable expression not supported for "    lda      (Text-TX_queue),x"

I don't know why this is happening. It should be a valid command (address mode IX2). Is this a bug of CW5.1 or do I have to use fixed flash adresses and compute the difference of "Text-TX_queue" by myself?

Many thanks in advance!
Best regards


J2MEJediMaster added MCU type and CodeWarrior version to subject line

Message Edited by J2MEJediMaster on 2007-06-05 09:19 AM