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
Hi!
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 6.5.1.3 "Memory to Memory Moves":

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

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

Ralph


J2MEJediMaster added MCU type and CodeWarrior version to subject line



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

Outcomes