News:

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

error A2039:line too long

Started by Ficko, July 26, 2010, 02:13:39 PM

Previous topic - Next topic

Ficko

How to solve this quirk?

I am getting nuts on it. :green


.686p
.model flat, stdcall
option casemap :none
MySub PROTO :DWORD
; ##########################################
Pilot EQU <pilot>
pilot MACRO Var
EXITM <eax>
ENDM
; ##########################################
.code
start:
invoke MySub,Pilot(esi)
; ##########################################
MySub Proc Param
xor eax, eax
MySub endp
end start


Basically I want different cases mapped to the same macro like "pilot","Pilot","PILOT".
It works fine with EQU until I have a MACRO with return parameter - function macro -

jj2007

This works.
Pilot MACRO Var
  EXITM pilot(Var)
ENDM
pilot MACRO Var
  EXITM <eax>
ENDM


Now if you really want to go nuts: This also works, in Masm and JWasm :green

include \masm32\include\masm32rt.inc

MySub PROTO :DWORD

Pilot equ pilot

pilot MACRO Var
  EXITM <eax>
ENDM


.code
start:
invoke MySub, Pilot(esi)

MySub Proc Param
xor eax, eax
ret
MySub endp

end start

Ficko

Quote from: jj2007 on July 26, 2010, 02:53:17 PM
Now if you really want to go nuts: This also works, in Masm and JWasm :green

include \masm32\include\masm32rt.inc

MySub PROTO :DWORD

Pilot equ pilot

pilot MACRO Var
  EXITM <eax>
ENDM


.code
start:
invoke MySub, Pilot(esi)

MySub Proc Param
xor eax, eax
ret
MySub endp

end start


Hm.. this actually the same I have posted the only change is
Pilot equ <pilot> -> Pilot equ pilot

and dosn't work by me. :eek

But the first one seems to work :U have to do some more tests my actual macro isn't that simple. :P

dedndave

i don't know if this will help...
Pilot TEXTEQU <pilot>

Ficko

Quote from: dedndave on July 26, 2010, 03:30:48 PM
i don't know if this will help...
Pilot TEXTEQU <pilot>

Nop but thanks anyway. :lol

JJ's first try is working so if there no other way I will stick to it. :toothy


Pilot MACRO Var
  EXITM pilot(Var)
ENDM
pilot MACRO Var
  EXITM <eax>
ENDM