I'm trying to write my own procedure call but when I go to link the file it says fatal error "LNK1120: 1 unresolved externals". I am new to masm so any help would be greatly appreciated.
.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
include \masm32\include\user32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\user32.lib
isPrime PROTO :dword
.data?
buffer db 100 dup(?)
.code
start:
invoke isPrime, 322
END start
isPrime proc arg1:dword
mov eax, arg1
mov ebx, 4
mov ecx, 5
mov edx, 6
Ret
isPrime endp
Your procedure is after the END statment; move the procedure between the .code directive and the start: label. Also, you may want to perform some sort of ExitProcess() call or 'ret' to keep it from crashing.
-r
Thanks that fixed it.