Hey there guys,
I am having this old snippet from MASM and it uses macros like .while.
.while ecx!=_searchsize
while ecx != not equals _searchsize. How would I code something like that in GoASM?
The .while statement generates code that executes the block of statements while condition remains true.
I have no idea how to transform that for goasm.
I tried sticking in a compare like cmp ecx, [_searchsize]
je >...
but that does not seem to work.
put int 3 in front of the .While, assemble in ML or JWasm and see what Olly can tell you...
xor ecx, ecx
nops 3
.while ecx != 1234h
inc ecx
.endw
nops 3
00401000 33C9 xor ecx,ecx
00401002 90 nop
00401003 90 nop
00401004 90 nop
00401005 EB01 jmp loc_00401008
00401007 loc_00401007:
00401007 41 inc ecx
00401008 loc_00401008:
00401008 81F934120000 cmp ecx,1234h
0040100E 75F7 jnz loc_00401007
00401010 90 nop
00401011 90 nop
00401012 90 nop
thanks MichaelW,
I debugged it and found the missing code added that to GoASM and it works like a charm now.
But isn't there any piece of code in GoASM that is a replacement for the .while macro?
Thanks for the input.
FlySky Jeremy said he's been working on adding builtin conditional statements,I was workin on a preprocessor to do it, but kinda stopped after I read his plans cause I didn't want my efforts to be for nothin. When I find out the status of that, I may finish mine up, as there's not much left to it, but yeah the way I did was just cmps/test and jmps(jne,je,etc...)
Runtime conditions are still work in progress I am afraid, but in any case they would not include "while".