|
[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. |
|
|
|
|
Asked by greta13 in Assembly Programming Language, Microsoft Visual C++
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 ==========
|
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625