Hi,
I just downloaded the eval version of MPC5xx 8.1 from Metrowerks. I'm
having the simplest problem that i just can't find the answer to in the
docs.
I'm trying to work in native assembler and generate a flat binary,
which is kinda working out but the problem i have is with the assembler
not assigning label addresses into my code.
eg.
..text
..org 0x10000
start:
li r28, 0
lis r26, myvar@[EMAIL PROTECTED]
r26, myvar@[EMAIL PROTECTED]
0(r26)
lis r26, 0x10050@[EMAIL PROTECTED]
r26, 0x10050@[EMAIL PROTECTED]
0(r26)
blr
myvar: .long 0x0
the listing file it generates doesn't have the address for the label in
it (nor does the .elf file the linker produces), as you can see on the
2nd and 3rd lines of code here. However if i explicitly define the
address it works, as you can see on lines 5 & 6. What beats me is that
if i remove the @[EMAIL PROTECTED]
and @[EMAIL PROTECTED]
after the label name, the compiler generates
an error with the exact label address (obviously saying it can't load
the 32 bit address). Anyone got any ideas? I'd like to get it sorted
before i fork out the $$$ for the full licensed version.
Chris...
.text
.org 0x10000
start
0x00010000: 3b800000 li r28, 0
0x00010004: 3f400000 r26, myvar@[EMAIL PROTECTED]
635a0000 ori r26, r26, myvar@[EMAIL PROTECTED]
939a0000 stw r28, 0(r26)
0x00010010: 3f400001 lis r26, 0x10050@[EMAIL PROTECTED]
635a0050 r26, r26, 0x10050@[EMAIL PROTECTED]
939a0000 stw r28, 0(r26)
0x0001001c: 4e800020 blr
0x00010020: 00000000 myvar .long 0x0


|