Intel 8086 Assembly procedure calling from C

前端 未结 1 1527
甜味超标
甜味超标 2021-01-25 10:29

I need to develop a procedure for Assembly language and call that procedure from C language (pass a string and return an integer value). My assembly procedure works fine \"stand

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-25 10:50

    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 
    
    extern int foo();
    
    int main()
    {
        int i = foo();
        printf("%d\n", i);
        return 0;
    }
    

    0 讨论(0)
提交回复
热议问题