AnsweredAssumed Answered

Accessing sda_rel data in assembler

Question asked by Karl Hahn on Nov 25, 2009
Latest reply on Nov 30, 2009 by Karl Hahn

I have a global variable declared in a C module that I need to access from an assembler module. If I disassemble the C code, I can see that it is using addressing relative to r13 to access this data.


My question is, in assembler, what is the syntax to do this same kind of access? How do I tell the assembler to form the relative offset of myVar from the base of its data section (which is .sbss).


.extern myVar 

    lzw    r3, (myVar ???) (r13)


What do I put in the ??? spot to tell it that this offset is relative to _ABS_SDA_BASE_ ?