For C & assembly mixed programming, you have two solutions: Seperate src with Link time mixing, and mixing src directly.
The first solution is clearer on src, and you should only notice the linker symbol names(the heading slash). The second, sounds nicer, I'm not sure about the other C compilers, while GCC's assembly inline specification is really UGLY. It has messed & confusing semantics. It'll waste a lot of dev. time~!
I hate it~!
I hate GCC inline Assembly
最新推荐文章于 2017-09-04 17:39:58 发布
本文探讨了C语言与汇编语言混合编程的两种方案:链接时间混合与直接混合源代码。第一种方法使源代码更清晰,需要注意链接器符号名称。第二种方法直观上更好,但在GCC中内联汇编的规范较为复杂且语义混乱。
1167

被折叠的 条评论
为什么被折叠?



