.386
.model flat,stdcall
option casemap:none
.code
shell_start equ this byte
nop
jmp @f ;; this instruct give rise to error !!
nop
@@:
nop
shell_end equ this byte
TestFunc proc uses ebx esi edi _dwTest
ret
TestFunc endp
start:
;;;;shell_end - shell_start = nop + jmp(short jmp) + nop + nop = 1 + 2 + 1 + 1 = 5
invoke TestFunc,shell_end - shell_start ;;result shell_end - shell_start = 0DH !!
;;;you can see this error by Ollydbg.
ret
end start
masm32 is a package of libraries, include files, examples, tutorials, and tools
masm is a program by microsoft :P
this is a masm bug - not masm32
it is probably fixed on more recent versions of masm
there was a recent related thread, only the problem was with $ in the .DATA section
at any rate, for your case, try this for a work-around...
include \masm32\include\masm32rt.inc
.code
shell_start::
nop
jmp @f ;; this instruct give rise to error !!
nop
@@:
nop
shell_end::
TestFunc proc uses ebx esi edi _dwTest
ret
TestFunc endp
start:
;;;;shell_end - shell_start = nop + jmp(short jmp) + nop + nop = 1 + 2 + 1 + 1 = 5
invoke TestFunc,shell_end - shell_start ;;result shell_end - shell_start = 0DH !!
;;;you can see this error by Ollydbg.
ret
end start
thanks for you reply !
but you code still error .
shell_start::
shell_end::
that syntax i don't see before , :lol\
i had learn it at here . :lol :lol
Quotebut you code still error
interesting :P
Quoteshell_start::
shell_end::
that syntax i don't see before
it is similar to ":", except "::" has global scope
:lol
::
i have see that in nasm
it seems to be a problem with INVOKE (a masm-internal macro)
try this....
push shell_end-shell_start
CALL TestFunc
hi dedndave .
yes, invoke instruct lead to the error .
yestorday, i had to modify it like you code
:U
i happened to think - this will probably work...
TempParm = shell_end-shell_start
INVOKE TestFunc,TempParm
:8)
:bg
These bug reports always make me laugh, MASM has always been a buggy old pig that you had to be familiar with to get results from. Its an assembler, not a consumer multimedia app and there must be at least a million ways of writing code that does not work. The trick is to write code that does work.
yes , just code batter. :bg
Quote from: hutch-- on February 10, 2012, 07:56:05 AM
...there must be at least a million ways of writing code that does not work. The trick is to write code that does work.
That is worthy of being a "quote".
Quote from: SteveAsmThat is worthy of being a "quote".
Made me chuckle too, perhaps the million monkeys working on Shakespeare could knock out a couple of bad MASM examples in the process. Or perhaps Edison's quip about discovering a thousand ways
not to make a light bulb.