mov edx, -2
.while( edx <= 2 )
	mov CubeX, edx
	mov CubeY, ecx
	mov CubeZ, eax
	inc Points
	inc ebx
	inc edx
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?
Posted on 2001-04-22 16:22:00 by eeprom
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 :)
Posted on 2001-04-24 18:01:00 by BogdanOntanu
typecast it .while SDWORD ptr edx<=2
Posted on 2001-04-25 07:08:00 by Iczelion
Thanks! Now my code will be more readable.
Posted on 2001-04-25 08:13:00 by eeprom