Anyway from your code there is absolutly
no way to predict what could be in eax after all
THE SVIN
no way to predict what could be in eax after all
THE SVIN
I dont know what ur problem is, u wont me to wriete whole code (i do not have NET so my questions are shorter that they should be, but i was counting on ur IQ) ??????
xor eax,eax
xor ebx,ebx
here is the part of missing part :P
bdw thx to u all but i have got another question
Can change values of flags for example CF by myself ?
I dont know what ur problem is, u wont me to wriete whole code (i do not have NET so my questions are shorter that they should be, but i was counting on ur IQ) ??????
xor eax,eax
xor ebx,ebx
here is the part of missing part :P
bdw thx to u all but i have got another question
Can change values of flags for example CF by myself ?
My IQ is very low.
I'm wellknown here as the dumbest coder on the board.
To change CF and keep unchanged the rest of the flags:
1.set carry to 1
- STC
+ more other ways
2. set carry to 0
- CLC
+ more other ways
3. invert carry
- CMC
+ lots more other ways
4. To know more about all this ways and other flags affectation.
- Download Intel refference manual.
:grin:
THX mr. wellknown :alright:
THX mr. wellknown :alright:
Sorry for digging this old thread, an idea just came to me. Yay!, :grin: I have another solution...
this for abolute values. :)
mov ecx, eax ;ecx == eax
neg eax ;if eax is sign then eax = 0 - (-eax) -> positive
;if eax is not sign then eax = 0 - eax -> negative
cmovs eax, ecx ;if eax is sign then copy ecx
;if eax is not sign don't copy anything
of course, CMOVcc instruction is only supported on P6/PPro++ and other x86 processors but not all .... :)
this for abolute values. :)
simulating movsx...
simulating movsx for 16 bit size. :)
mov cl, -128
mov al, cl
shl eax, 24
sar eax, 24
Useless but an alternative. :)
simulating movsx for 16 bit size. :)
mov cx, -32768
mov ax, cx
shl eax, 16
sar eax, 16
Smaller:
mov al, cl
cbw
cwd
16-bit:
mov ax, cx
cwd
mov al, cl
cbw
cwd
16-bit:
mov ax, cx
cwd