My code was simply as follows:
void outputstuff()
{
WORD i = 0;
__asm{pop i}
printf("%u",i);
}
int main(int nArgs,char*sArgs[])
{
WORD i = 0;
__asm
{
jmp looping
looping:
cmp i,256
je breaker
push i
call outputstuff
add i,1
jmp looping
breaker:
}
}
but it doesn't run properly (but compiles fine)
I also tried putting WORD i as an argument:
void outputstuff(WORD i) ... push i call outputstuff ....
but that didn't work either. Any idea?
Also, the conditional jump gave me some trouble. It works fine now, but I want to say if i is greater than or equal to 256, quit, but jge just quit right away and jle quit at 129. what's with that?
Thanks


Sign In
Create Account


Back to top









