Unresolved External '_main'....

admin

Administrator
Staff member
Here's my code...<br /><br />Anyone know whats up? Im really new at this language, it was copied from a book to test my compiler.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><br />.486<br />MODEL FLAT<br />.CODE<br /><br />PUBLIC _myFunc<br />_myFunc PROC<br /> ; *** Standard subroutine prologue *** <br />     push ebp          ; save the old base pointer value<br />     mov ebp, esp      ; set the new base pointer value<br />     sub esp, 4        ; Make room for one 4 byte local variable<br />     push edi          ; save the values of registers that the function<br />     push esi          ; will modify.  this function uses EDI and ESI.<br />                       ; (no need to save EAX, EBP, or ESP)<br />     <br /> ; *** Subroutine Body ***<br />     mov eax, [ebp+8]  ; put the value of parameter 1 into EAX<br />     mov esi, [ebp+12] ; put the value of parameter 2 into ESI<br />     mov edi, [ebp+16] ; put the value of parameter 3 into EDI<br />     <br />     mov [ebp-4], edi  ; Put EDI into the local variable<br />     mov [ebp-4], esi  ; Put ESI into the local variable<br />     add eax, [ebp-4]  ; Add the contents of the local variable<br />                       ; into EAX (final result)<br />                        <br /> ; *** Standard subroutine epilogue ***<br />     pop esi           ; Recover register values<br />     pop edi<br />     mov esp, ebp      ; Deallocate local variables<br />     pop ebp           ; restore the caller's base pointer values<br />     ret<br /> ENDP _myFunc<br /> END<br /><!--c2--></div><!--ec2--><br /><br /><span class='edit'>This post has been edited by <b>born2c0de</b>: 24 Feb, 2008 - 11:43 PM</span>
</div>
 
Top