I am hoping someone could shed some light on a possible ASM to C language translation of some ASM code.
OK, first off let me say that I know basically nothing about C language programming, or any language programming for that matter.
This little chunk of ASM code has been bothering me in regard to a C language translation.
mov eax, [eax - 33] ; mov data from somewhere to eax
cdq ; convert double to quad
shl edx, 8 ; shift left edx c << 8;
sbb eax, edx ; subtract with borrow
sar eax 8 ; shift right eax c >> 8;
I know the translation between ASM and C isn't nessarily easy, but it seems a lot of the ASM instructions can be generalized in some type of C expression I guess. What confuses me about the ASM code I posted is the cdq, sbb instructions, and in this case the use of cdq when it's not followed by idiv.