This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C语言中插入汇编



请问怎样在C语言中插入汇编,实现对状态寄存器ST1的保存,并且恢复。并提供C接口,供C函数调用

  • Yunling 你好,

    要实现对寄存器的读取和写入,需要首先在相应的C语言工程文件中定义和映射寄存器的物理地址,然后直接在主程序中使用C或者汇编进行调用即可。

    P.S: 此贴可转发在MCU论坛中,会有更多工程师进行及时解答。

    谢谢!