K-Young Kim

how to link data in assembly data file to c code file

Discussion created by K-Young Kim on Oct 8, 2008
Latest reply on Oct 9, 2008 by K-Young Kim
Hi, there!
Please help me if someone knows this:
 
I'm programming for mpc5200b in CW mobile GT v.8.5 environment.
I added a assembly file(bitmp.asm) which has bitmap data in the project.
The contents of the file, bitmp.asm, are something like this:
 
.data
 
;public cMyPic line 1
 
cMyPic:  .byte  0x42,0x4D,0x5E,0x0,0x0,0x0,0x0,0x0
               .byte  0x0,0x0,0x3E,0x0,0x0,0x0,0x28,0x0
               .byte  0x0,0x0, ...
               ...
 
I want to use the variable name 'cMyPic' in my main function, so I defined the variable in main:
extern char cMyPic[ ];
, but it did not work.
Does anyone know how to call the 'cMyPic' variable in assembly file from c file?
 
Thanks,
 
K-Young
 
 
 
 
 

Outcomes