How can I do these operations in C?
- by Juan Antonio
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...