sdata/sbss access from asm

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

sdata/sbss access from asm

670 次查看
Boborjan
Contributor I

Hi,

 

how can I make accesses to the small data area in asm?

like:

move.w #2, _variable(A5)  // although it is how compiler puts it into asm (using -S), it does not work at all from asm file

 

I use legacy 68k codewarrior 3.2.

 

ASM reference says something regarding using "label@sdax" but I could not make it work, I always get error messages.

 

Thanks,

Viktor

标签 (1)
0 项奖励
回复
2 回复数

532 次查看
JimDon
Senior Contributor III

Well, using CW 10.1 for a V1 this worked for me:

long_data:  .long $beefabcd

.

.

.

 

move.l long_data@sdax(A5),D0

 

 

0 项奖励
回复

532 次查看
Boborjan
Contributor I

Thanks for the answer.

These lines give me the message:

 

File "../crt0.S" ; Line 67 # Error: Illegal or unsupported relocation type
move.l long_data@sdax(A5),D0

 

I guess cw for V1 does not have any options for producing CPU32 code, does it?

 

BR,

Viktor

 

0 项奖励
回复