Intel 8086 Assembly procedure calling from C

拥有回忆 提交于 2019-12-02 04:12:39

recommend a C compiler

Not enough info, however if your platform is significant enough, chances are that GCC already supports it.

and also a way to make the simple C program that is able to call the assembly procedure and get the returned value.

The way for writing simple C programs is using a text editor. (Oh wait, you're interested in the code? Here it goes:

#include <stdio.h>

extern int foo();

int main()
{
    int i = foo();
    printf("%d\n", i);
    return 0;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!