View Single Post
Old 7th November 2019, 17:29   #15  |  Link
bassquake
Registered User
 
Join Date: Jan 2007
Posts: 45
Cool thanks. I got it working with the following:

Code:
.586    
.mmx   
.xmm
.model flat, c                                           
.code      

lut_isse proc dst:dword,LUT:dword,psize:dword

public lut_isse

push esi
push edi
push ebx

			mov     edi,dst
			mov     esi,LUT
			mov     ecx,psize

            align     16
GLoop:      mov     eax,[edi]
            xor     ebx,ebx
            mov     edx,eax
            mov     bl,ah
            and     edx,0ff0000h	;A2206 missing operator in expression
            and     eax,0ffh	;A2206 missing operator in expression
            shr     edx,16
            movd    mm0,dword ptr[esi+eax*4+(512*4)]	;A2070 invalid instruction operands
            prefetchnta [edi+512]
            por     mm0,[esi+ebx*4+(256*4)]
            por     mm0,[esi+edx*4        ]
            movd	dword ptr[edi],mm0	;A2070 invalid instruction operands
            add     edi,4
            loop GLoop
            emms

			pop ebx
			pop edi
			pop esi

			ret
lut_isse endp

END
Now need to see if can convert to 64 bit! A project for another time.
bassquake is offline   Reply With Quote