1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/// direct method: "stack" without loop unsigned rbN6 (unsigned arg) { __asm { mov edx, arg mov ecx, 32 align 16 // didn't help, however NEXTBIT: shr edx, 1 // pop cf from edx rcl eax, 1 // push cf into eax sub ecx, 1 jnz NEXTBIT } }