当您在程序集中声明函数时,请确保在函数名前面附加“y”。当你在函数名前面加上“y”时,你可以从C文件中调用函数。下面给出的例子首先导出了其他程序集和C文件的函数。“C MySimultRead”是用于C文件和“MySimultRead”的,用于汇编文件。同样,在定义的时候,我们必须使用两个名称来使这个名称既可用于汇编程序,也可用于C文件。
请注意,从C文件中,也只能调用名为MySimultSead的函数。
导出yMyStudio启动
导出MyStudio启动
StaseStEnSyStRe::StaskSnSeSyStEng:您的函数代码RET一旦完成,就可以在头文件或要调用该函数的C文件中给出函数的原型。最好的问候,Pushek
以上来自于百度翻译
以下为原文
When you are declaring the function in assembly then make sure you have "_" appended in front of the function name. When you are appending "_" in front of the function name then you can call the function from C files. An example given below first of all exports the function for other assembly and C files. "_MyFunc_Start" is for the C files and "MyFunc_Start" is for assembly files. Similarly at the time of definitiion as well, we have to use two names to make this name accessible to both assembly and C files.
Please note that from C file as well, you have to call the function with name MyFunc_Start only.
export _MyFunc_Start
export MyFunc_Start
SmartSense_Start:
_SmartSense_Start:
; Your function code
ret
Once done, you can give the prototype of the function in a header file or the c file in which you want to call this function.
Best regards,
Pushek
当您在程序集中声明函数时,请确保在函数名前面附加“y”。当你在函数名前面加上“y”时,你可以从C文件中调用函数。下面给出的例子首先导出了其他程序集和C文件的函数。“C MySimultRead”是用于C文件和“MySimultRead”的,用于汇编文件。同样,在定义的时候,我们必须使用两个名称来使这个名称既可用于汇编程序,也可用于C文件。
请注意,从C文件中,也只能调用名为MySimultSead的函数。
导出yMyStudio启动
导出MyStudio启动
StaseStEnSyStRe::StaskSnSeSyStEng:您的函数代码RET一旦完成,就可以在头文件或要调用该函数的C文件中给出函数的原型。最好的问候,Pushek
以上来自于百度翻译
以下为原文
When you are declaring the function in assembly then make sure you have "_" appended in front of the function name. When you are appending "_" in front of the function name then you can call the function from C files. An example given below first of all exports the function for other assembly and C files. "_MyFunc_Start" is for the C files and "MyFunc_Start" is for assembly files. Similarly at the time of definitiion as well, we have to use two names to make this name accessible to both assembly and C files.
Please note that from C file as well, you have to call the function with name MyFunc_Start only.
export _MyFunc_Start
export MyFunc_Start
SmartSense_Start:
_SmartSense_Start:
; Your function code
ret
Once done, you can give the prototype of the function in a header file or the c file in which you want to call this function.
Best regards,
Pushek
举报