AnsweredAssumed Answered

howto: HLI varible,x (inline assembly using varible,X offset to tables of varibles)

Question asked by Carl Norman on Jul 8, 2009
Latest reply on Jul 10, 2009 by Carl Norman

Hi All,

 

Should be very easy, I searched around for ideas for half hour and have given up on this very simple problem. I cannot work out how to get inline assembly to compile the address of a varible for use with an ,X offset.

 

- I know this code is useless here, but its important for our application as its doing 128 bit NLF's.

 

uchar test[32]  = 0;

 

__asm{

   LDHX #$0005

   LDA test:1,x  //< PROBLEM, will not compile "test" as an address using @ or & or a pointer to test.

}

 

Note: Using Codewarrior 6.1 and a HCS08 processor.

 

The problem is clearly that test is not being replaced as an address, I have tried everything i can think of. Code works straight away in straight assembly.

Message Edited by CarlFST60L on 2009-07-08 04:00 AM

Outcomes