; Return in EAX the index of the double word passed in RSI:RDI in the array ; of double words (LE) starting at the address in RCX and having RDX elements, ; or -1 if not found. option prologue:none, epilogue:none .code srch128 proc _srch128 proc XCHG RCX,RDX ; RCX = member count, RDX = array's starting address XOR RAX,RAX ; Initialise the double index .repeat .break .if (RDI == [RDX+8*RAX] && RSI == [RDX+8*RAX+8]); End ADD RAX,2 ; Update the double index, ZF = 0 .untilcxz .if (!equal?) LEA RAX,[RCX-2];Double word in RSI:RDI not found, return -1 .endif SHR RAX,1 ; EAX (RAX) = index of the double word found or -1 RET _srch128 endp srch128 endp end