[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

calling microsft C++ function in assembly program

Asked by greta13 in Assembly Programming Language, Microsoft Visual C++

Tags: assembly

The short of it I cannot get this assembly program to call C++ proto properly..see code and error results...How do i call these prototypes properly..i am using Microsfot Visual C++ 2008
thanks
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
INCLUDE Irvine32.inc
askForInteger PROTO C
showInt PROTO C, value:SDWORD, outWidth:DWORD
newLine PROTO C
OUT_WIDTH = 8
ENDING_POWER = 10
.data
intVal DWORD ?
.code
SetTextOutColor PROC C,
	color:DWORD
mov eax, color
call SetTextColor
call Clrscr
ret 
SetTextOutColor ENDP
DisplayTable PROC C
INVOKE askForInteger
mov intVal, eax
mov ecx, ENDING_POWER
L1: push ecx
	shl   intVal, 1
	INVOKE showInt, intVal, OUT_WIDTH
	INVOKE newLine
	pop ecx
	loop L1
	ret
	DisplayTable ENDP
END
 
 
1>------ Build started: Project: Project, Configuration: Debug Win32 ------
1>Assembling...
1> Assembling: .\main.asm
1>Linking...
1>main.obj : error LNK2019: unresolved external symbol _askForInteger referenced in function _DisplayTable
1>main.obj : error LNK2019: unresolved external symbol _showInt referenced in function _DisplayTable
1>main.obj : error LNK2019: unresolved external symbol _newLine referenced in function _DisplayTable
1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup
1>C:\irvine2008\examples\Project_sample\Debug\Project.exe : fatal error LNK1120: 4 unresolved externals
1>Build log was saved at "file://c:\irvine2008\examples\Project_sample\Debug\BuildLog.htm"
1>Project - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[+][-]10/07/09 02:25 PM, ID: 25520261Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/07/09 05:17 PM, ID: 25521488Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/08/09 05:42 AM, ID: 25524698Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/11/09 02:19 PM, ID: 25547444Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/15/09 12:48 PM, ID: 25584062Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625