; Return in registers RDX:RAX the double word in registers RSI:RDI with ; reversed bit order. option prologue:none, epilogue:none .code bitr128 proc _bitr128 proc MOV ECX,64 ; Initialise the bit counter SHL RSI,1 ; Get the most significant (highest) bit in CF .repeat RCR RDI,1; Put the highest bit from CF, get the lowest RCL RSI,1; Put the lowest bit from CF, get the highest .untilcxz ; Next iteration of the loop XCHG RAX,RDI MOV RDX,RSI ; Return the double word in RDX:RAX RET _bitr128 endp bitr128 endp end