views:

42

answers:

2

Hello everybody I'm currently working on a rather big assembly program it's a chatter bot. It spans currently well over 700 lines of code. In my program I've two labels, my program uses these labels to keep track of certain data that gets moved around in a random manner.

Let me explain to you what happend:

The job the program has to do is big, so what I tend to do is I chop these bits of code in pieces. I create separate projects for all the functions my program needs, and when they're working I include them in the main program.

I had one of these functions completed just now, and I integrated it into my program. The function came between the two labels I told you about before.

When I tried to compile the program I got an error saying:

ChatterBot.asm<22>: Unidentified symbol: EEEndLenght (which is the name of the 2nd label)

The label is 633 lines further away on line 655, if I remove the function again, the error disappears, I'm sure the same label doesn't occur in the new function and I've changed it's name several times

Does anyone know why this is happening and how I can fix it?

Overvieuw:

.386
.model flat,stdcall
option casemap:none
include \masm32\include\masm32rt.inc
include \masm32\include\masm32.inc
include \masm32\include\wsock32.inc
includelib \masm32\lib\wsock32.lib

system PROTO C, :PTR BYTE  
SavePoly PROTO 
       .code

Start:
...
...
mov ecx, (EEEdnLength - Startl) ; line 22, with the label 
...
...

Startl
...
...
GetNumb1And8 PROTO
Filleax PROTO
...
...
FSTR PROTO
recv PROTO
GetData PROTO, nread:DWORD
...
main proc
...
...
Rand proc  
...
Rand endp 
...
...
main endp
...
...
FSTR proc
...
...
FSTR endp 
...
...
GetData proc nread:DWORD
...
...
GetData endp
...
...
end main
...
...
EEEdnLength:
...
...
ret
SavePoly endp
EndForError:
edd:
ret ; kthxbai
end Start

Now I look at it like this, I think I've already found what's wrong, end main... that's wrong....

I'm sorry for wasting your time guys, it was indeed the :end main that messed up I'm sorry :(

A: 

It's really hard to guess without even an extract from your code, but one possibility is that if you use a .mode" statement, MASM will default to exporting only names ofprocs -- a "normal" label defined like:mylabel:` is visible only inside that source file.

If that's the problem, you can add export EEEdnLength, or (if memory serves) you can define it like: EEEndLength:: (two colons instead of one).

Jerry Coffin
I'm sorry for not including code. But I may not do that, it's part of a freelance project, but I can show you how it looks, (I'll edit my main post with the overview)
Rick
A: 

I'm sorry for wasting your time guys, it was indeed the :end main that messed up I'm sorry :(

Rick