Access C/C+ variable from assembly

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

Access C/C+ variable from assembly

1,116 次查看
kfirbs
Contributor III

Hi.

I'm having trouble accessing C/C++ variable from an assembly code.

I have used the following documentation:

assembly programming 

and tried to use something like 

ASM_KEYWORD(" la r0,branch_addr");

"Load Address (la): The la mnemonic is useful for obtaining the address of a variable specified by name" (EREFRM_2-0.pdf).

Which results in an error:

:113, Error, Unrecognized line: la r0,branch_addr

Is there another way of accessing a variable?

0 项奖励
回复
0 回复数