![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
混合编程
alotuscc
你和你的犬色声马,我和我的各安天涯。
千里走单骑,八方为敌。
青灯古佛度苍生,不愿度己。
展开
-
CCPP汇编综合例程
C,CPP,汇编综合例程文件结构:srcasmams_base.Scmain_c.ccppmain_cpp.cincasm.hmain_c.hmain_cpp.hobjmakefile# src/asm/asm_base.S.text.globl asm_add.globl asm_subasm_add: push %ebp mov %esp,%ebp mov原创 2021-04-22 20:49:42 · 227 阅读 · 0 评论 -
C中调用C++函数
C中调用C++函数文件结构:srccmain_c.ccppmain_cpp.cincmain_c.hmain_cpp.hobjmakefile// src/c/main_c.c#include "main_cpp.h"#include "main_c.h"int main_c(){ return 0;}int c_add(int a, int b){ return a + b;}int c_sub(int a, int原创 2021-04-22 20:04:43 · 1287 阅读 · 0 评论 -
C中调用C++函数
C中调用C++函数文件结构:srccmain_c.ccppmain_cpp.cincmain_c.hmain_cpp.hobjmakefile// src/c/main_c.c#include "main_cpp.h"#include "main_c.h"int main_c(){ int a = 10; int b = 20; int c = cpp_add(a, b); int d = cpp_sub(a,原创 2021-04-22 19:57:05 · 253 阅读 · 0 评论 -
C++中调用汇编函数
C++中调用汇编函数objsrcasmasm_base.Scppmain_cpp.cppincasm.hmakefilea.out# src/asm/asm_base.S.text.globl asm_add.globl asm_subasm_add: push %ebp mov %esp,%ebp mov 0x8(%ebp),%edx mov 0xc(%eb原创 2021-04-22 19:23:36 · 723 阅读 · 0 评论 -
C中调用汇编函数
C中调用汇编函数文件结构:objsrcmakefile// src/c/main_c.c#include "asm.h"int main_c(){ int a = 10; int b = 20; int c = asm_add(a, b); int d = asm_sub(a, b); return 0;}# src/asm/asm_base.S.text.globl asm_add.globl asm_subasm_add原创 2021-04-22 18:00:09 · 1287 阅读 · 0 评论