I`ve got error A2004:symbol type conflict when tried to import C function in assembler

Viewed 68

I've got error A2004:symbol type conflict when tried to import C function in assembler but I tried to make it in different ways but every time I'm getting same error.

C code

#include <stdio.h>

int __stdcall funcName1(int a, int b, int c)
{
    int answer = a*b-c;
    return answer;
} 

Assembler code

.586
.model  flat, C
.stack
.data
    num1 dd 2h
    num2 dd 2h
    num3 dd 1h
extern funcName1:far
.CODE
FuncName PROC
    mov eax, offset num3
    push eax
    mov eax, offset num2
    push eax
    mov eax, offset num1
    push eax
    call funcName1
    pop  ebx
    pop  ebx
    pop  ebx
    ret
FuncName ENDP
END FuncName

I don't know what to improve it. It's my first time with assembly. I'm trying to find an information but I cant.

0 Answers
Related