News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

[HELP] MASM10 compiling error

Started by guro, October 13, 2008, 11:13:57 AM

Previous topic - Next topic

guro

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.

hutch--

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.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

guro

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?

guro

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.

jj2007

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.