News:

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

Problem Assembling

Started by Jimg, April 10, 2007, 06:52:18 PM

Previous topic - Next topic

Jimg

Deleted.  See simpler example below-

Jimg

#1
see next for simpler example

Jimg

#2
I'm having a problem assembling a file for debug.  I'm using this call to ml-

F:\masm32\BIN\ML /c /coff /Cp /Zi /Fl /I"F:\masm32\INCLUDE" "tst.asm"

and the file consists of -.386
.MODEL flat, stdcall
repxxx MACRO argx
  .data
   db 1
  .code
  EXITM <1>
ENDM
.code
start:
  jmp @f
  mov eax,repxxx(1)
@@:
  ret
end start

When I assemble, I get-

R:\ tst

R:\ F:\masm32\BIN\ML /c /coff /Cp /Zi /Fl /I"F:\masm32\INCLUDE" "tst.asm"
Microsoft (R) Macro Assembler Version 6.15.8803
Copyright (C) Microsoft Corp 1981-2000.  All rights reserved.

Assembling: tst.asm
tst.asm(24) : error A2006: undefined symbol : @@

This happens with both versions 6.14 and 6.15

Can anyone shed some light on this problem?


If I change the code to this, it assembles normally-

.386
.MODEL flat, stdcall
repxxx MACRO argx
  .data
   db 1
  .code
  EXITM <1>
ENDM
.code
start:
  jmp abcd
  mov eax,repxxx(1)
abcd:
@@:
  ret
end start


Anyone have the same problem??

[attachment deleted by admin]

MichaelW

I don't know what is causing the problem, but with ML 6.14 if I eliminate the /Zi, or eliminate the switch to the data segment and back to the code segment, then the problem goes away. So far I have found no other way around the problem.
eschew obfuscation

Jimg

Thanks Michael, at least you're getting the problem.  Hutch didn't seem to have any trouble. ??

Anyone else have any ideas?

sinsi

If you put the code in a PROC it works. The MSDN MASM reference for error A2006 says, in part,
Quote
  A local code label was referenced outside of its scope.

Also, ML version 8.00.50727.104 seemed to assemble it OK.
Light travels faster than sound, that's why some people seem bright until you hear them.

Jimg

Thanks sinsi.  I was wondering about the latest versions of masm.  Guess I can't complain to Microsoft then.

The whole thing seems a little flakey to me.