something like this dosen't assemble is it a bug in masm?

jmp @b
Posted on 2003-12-04 08:52:40 by ENF
Do you have any specific reason to use that ?? -- I?m sorry I don?t see any use of a jump in .data section
Posted on 2003-12-04 09:05:52 by WinCC
I'm trying to store a small fragment of code in the data section so that it can be modified.
Posted on 2003-12-04 09:21:18 by ENF
Replace it with jmp $-1 ?
Posted on 2003-12-04 10:33:16 by roticv
dosen't work either.
gives the error a2107 cannot have implicit far jump or call to near label
It would seam that using the data section for anything other then data is not a good idea
Posted on 2003-12-04 10:51:19 by ENF
Last resort

db 0Ebh, 0FEh
Posted on 2003-12-04 11:09:56 by roticv
:) use GoAsm, it does all of that rather easily...


newlabel(arg1) equ mov eax,arg1 \
test eax,eax \
jnz > \
mov edx,FALSE\

Edit : the > and : are equivalent to @F and @@:
Posted on 2003-12-04 11:54:51 by donkey
is this sort of a macro?Dose it produce code each time or just change the argument.
Posted on 2003-12-04 12:10:14 by ENF
It produces code so it is a sort of macro. Though in reality GoAsm has very poor macro support. It does however imbed the code in the data section so if you have no arguments you can call it directly. For example:


newlabel: equ mov eax,100 \

can be directly called in code with CALL newlabel
Posted on 2003-12-04 12:19:24 by donkey
What I remember of MASM is that the .DATA section does not do an ASSUME CS:_DATA, so that it is not possible to define code labels (using ":") in the .DATA section, unless you add the ASSUME.
Posted on 2003-12-04 17:31:07 by tenkey