My code doesn't enter this loop because .while() use a JBE (wich is NOT signed) to compare the value. How could I do to make .while() use JLE (wich is signed) instead of JBE? Is this possible? Or must I write my own loop using JLE?
mov edx, -2 .while( edx <= 2 ) mov CubeX, edx mov CubeY, ecx mov CubeZ, eax inc Points inc ebx inc edx .endw
i suggest makeing your own loop it can nit hurt to do so from time to time ;) again take care as this kinnda problem in not .while related, registers and dwords/etc can allways considered either a very bug UNSIGNED number and a SIGNED number, what is what depend on your code ... micro's know to add/substract signed numbers...compilers (MASM) also know to deal (well allmost) with negative numbers at compile time but at run time memory addressing with negative registerd is full of surprises ... as they are considered unsigned numbers ... so -1 is the biggest address a micro can handle :) once again take care :)
typecast it .while SDWORD ptr edx<=2
Thanks! Now my code will be more readable.