The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: guro on October 13, 2008, 11:13:57 AM

Title: [HELP] MASM10 compiling error
Post by: guro on October 13, 2008, 11:13:57 AM
Hi to everyone, i tried to assemble a program but i get a very strange error from masm10. The strange is that the same chunk of code pass correctly through assembler before the failed segment of code. Particularly the following part of code assembles fine: (is part of the program)

....
.WHILE edx != NULL  ;Do a loop for that amount of bytes
           xor byte ptr [ecx], al
           inc ecx
           dec edx
           rol eax, 4h
       .ENDW
....


if u need to post the whole code tell me.
but the masm when try to assemble the program reports an error a2206 and says that missinig operator in expression

the problem part of the program is the following:
   
loop:    
   xor byte prt [ecx], al
   inc ecx
   rol eax, 4h
   .IF byte ptr [ecx] == NULL
       dec edx ;Move onto next string
       jmp LoadString ;Load the next string
...


the error is located in line 69 according to my code, which corresponds to the line: 'inc ecx' from loop label.

Any ideas why is this happens?
Also if someone registers an account in these forums and hasn't post anything for say 1 month it gets deleted, cause i miss my previous account and had to register again.
Title: Re: [HELP] MASM10 compiling error
Post by: hutch-- on October 13, 2008, 12:49:37 PM
The label name "loop" is a MASM reserve word, in this case a mnemonic. Change the label name.

If you read the forum introduction, it asks you to post quickly so we know you are a human being, not a bot. Without that identification we must delete your membership to protect members from spam and porn.
Title: Re: [HELP] MASM10 compiling error
Post by: guro on October 13, 2008, 12:58:22 PM
i changed the label to mylabel but same error raised again.From what u see from the code do u find an error? The code is a downloader can i post it or not?
Title: Re: [HELP] MASM10 compiling error
Post by: guro on October 17, 2008, 01:47:23 PM
found the error yesterday its one of those mean and hard to find though simple errors, which could be avoided if masm's editor has keywords highlighting. I wrote prt instead of ptr.
Title: Re: [HELP] MASM10 compiling error
Post by: jj2007 on October 17, 2008, 05:41:09 PM
Quote from: guro on October 13, 2008, 11:13:57 AM
the error is located in line 69 according to my code, which corresponds to the line: 'inc ecx' from loop label.

Any ideas why is this happens?
Yes: You use an editor with incorrect line numbering.

Quote
Also if someone registers an account in these forums and hasn't post anything for say 1 month it gets deleted, cause i miss my previous account and had to register again.

Shouldn't be a problem in future since you committed publicly to introduce syntax highlighting. We expect many interesting posts.

Quote from: guro on October 17, 2008, 01:47:23 PM
could be avoided if masm's editor has keywords highlighting. I wrote prt instead of ptr.