c - STM8微 Controller STVD IDE中的汇编指令

标签 c assembly stm8

我正在 STVD 中对 STM8 微 Controller 进行编程。我碰巧在代码中间使用了一条汇编指令。如图here
我使用了如下指令

 asm("MOV $00500A,#$3");

但是我遇到了以下错误

 #error cpstm8 ..\app\sched.c:183(5) missing prototype 

谁能帮我解决这个问题?

最佳答案

对于STM8汇编指令,需要在指令前使用_如下图

 _asm("MOV $00500A,#$3");

关于c - STM8微 Controller STVD IDE中的汇编指令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39695563/

相关文章:

c - 警告 : '0' flag ignored with precision and ‘%i’ gnu_printf format

c++ - 声明一个数组而不分配内存

C 和汇编测验

c - 这条指令是做什么的? :- mov %gs:0x14, %eax

c - 在 Linux 内核中混合汇编和 C 函数 - x64 模式

assembly - 混合使用 pxor 和 xorps 会影响性能吗?

c - gethostbyname 有什么问题?

c - 我需要知道为什么我的中断在这里不起作用

c - 了解stm8s反汇编中的功能?