How to write assembler in S32 Design Studio

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

How to write assembler in S32 Design Studio

1,352 次查看
dyc09052110
Contributor I

HI:

  I want to know how  to write the assembler in S32. The chip i use is MCP5744P.

Thanks!

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

949 次查看
martin_kovar
NXP Employee
NXP Employee

Hello,

as a quick interview you can use thread below.

https://community.nxp.com/message/830899?commentID=830899#comment-830899 

If you have any other questions, please feel free to write me back.

Regards,

Martin

0 项奖励

949 次查看
dyc09052110
Contributor I

Hi,

I would like to achieve the following procedure:

int main()

{

      signed short n1 = 1;

      signed short n2 = 2;

      asm("mfmsr %r1": "=kregs"(n1));

      asm("mfmsr %r2": "=kregs"(n2));

      asm("e_add %r1, %r2");

      asm("mfmsr %r1": "=kregs"(n1));

      return 0;

}

I want n1 to be equal to 3,but the result is not right.Can you help me find out what's wrong with my code?

Thanks!

0 项奖励