How can I do these operations in C?
Posted
by Juan Antonio
on Stack Overflow
See other posts from Stack Overflow
or by Juan Antonio
Published on 2010-05-03T20:05:11Z
Indexed on
2010/05/03
20:08 UTC
Read the original article
Hit count: 210
Hello, I'm converting some assembly code to C to be able to use it with the current compiler environment I have to work with.
I've reached 2 operations I don't know how to translate to C. Anyone know how to do it?
In both, offset
is an unsigned 32-bit integer and shift
is a signed integer value. C_FLAG is a bool.
OP1:
__asm {
__asm mov ecx, shift
__asm ror offset, cl
}
OP2:
__asm {
__asm bt dword ptr C_FLAG, 0
__asm rcr offset, 1
}
Thank you very much for your expertise.
P.S.: I'm not the original developer, nor I have seen many x86 assembly code...
© Stack Overflow or respective owner