.386
.387
.model flat

public _v_abs_f@4
public _v_fsincos_f@12
public _v_fsincos_d@16

ifndef	NO_MEMOPS

public _memFill@12
public _memZero@8
public _memCopy@12
public _memFill32@12
public _memZero32@8
public _memCopy32@12

endif	; NO_MEMOPS

CODE SEGMENT PARA PUBLIC USE32
; ========================================================================
;float  __stdcall   v_abs_f(float x);
_v_abs_f@4 proc near
	and     dword ptr 4[esp],07fffffffh
	fld     dword ptr 4[esp]
	ret     04h
_v_abs_f@4 endp
; ========================================================================
; void __stdcall v_fsincos_f(float *s,float *c,float radians);
_v_fsincos_f@12 proc near
	fld     dword ptr 12[esp]
	fsincos
	mov     eax, 8[esp]
	mov     edx, 4[esp]
	fstp    dword ptr [eax]
	fstp    dword ptr [edx]
	ret     12
_v_fsincos_f@12 endp
; ========================================================================
; void __stdcall v_fsincos_d(double *s,double *c,double radians);
_v_fsincos_d@16 proc near
	fld     qword   ptr 12[esp]
	fsincos
	mov     eax, 8[esp]
	mov     edx, 4[esp]
	fstp    qword   ptr [eax]
	fstp    qword   ptr [edx]
	ret     16
_v_fsincos_d@16 endp
; ========================================================================
ifndef	NO_MEMOPS
; ========================================================================
; void __stdcall memFill(void *dest, unsigned char value, unsigned int _length);
_memFill@12 proc near
	push    edi
	mov     edi,dword   ptr 8[esp]
	mov     al,byte ptr 12[esp]
	mov     edx,dword   ptr 16[esp]
	mov     ah,al
	mov     ecx,eax
	shl		eax, 16
	mov     ax,cx
	mov     ecx,edx
	shr     ecx,2
	rep     stosd
	mov     cl,dl
	and     cl,3
	rep     stosb
	pop     edi
	ret     12
_memFill@12 endp
; ========================================================================
; void __stdcall memZero(void *dest, unsigned int _length);
_memZero@8 proc near
	push    edi
	mov     edi,dword   ptr 8[esp]
	mov     edx,dword   ptr 12[esp]
	xor     eax,eax
	mov     ecx,edx
	shr     ecx,2
	rep     stosd
	mov     cl,dl
	and     cl,3
	rep     stosb
	pop     edi
	ret     8
_memZero@8 endp
; ========================================================================
; void __stdcall memCopy(void *dest, void *src, unsigned int _length);
_memCopy@12 proc near
	push    edi
	push    esi
	mov     edi,dword   ptr 12[esp]
	mov     esi,dword   ptr 16[esp]
	mov     eax,dword   ptr 20[esp]
	mov     ecx,eax
	shr     ecx,2
	rep     movsd
	mov     cl,al
	and     cl,3
	rep     movsb
	pop     esi
	pop     edi
	ret     12
_memCopy@12 endp
; ========================================================================
; void __stdcall memFill32(void *dest,unsigned char value, unsigned int _dwords);
_memFill32@12 proc near
	push    edi
	mov     edi,dword   ptr 8[esp]
	mov     al,byte ptr 12[esp]
	mov     ah,al
	mov     ecx,eax
	shl		eax, 16
	mov     ax,cx
	mov     ecx,dword   ptr 16[esp]
	rep     stosd   
	pop     edi
	ret     12
_memFill32@12 endp
; ========================================================================
; void __stdcall memZero32(void *dest, unsigned int _dwords);
_memZero32@8 proc near
	push    edi
	xor     eax,eax
	mov     edi,dword   ptr 8[esp]
	mov     ecx,dword   ptr 12[esp]
	rep     stosd   
	pop     edi
	ret     8
_memZero32@8 endp
; ========================================================================
; void __stdcall memCopy32(void *dest, void *src, unsigned int _dwords);
_memCopy32@12 proc near
	push    edi
	push    esi
	mov     ecx,dword   ptr 20[esp]
	mov     edi,dword   ptr 12[esp]
	mov     esi,dword   ptr 16[esp]
	rep     movsd   
	pop     esi
	pop     edi
	ret     12
_memCopy32@12 endp
; ========================================================================
endif	; NO_MEMOPS
; ========================================================================
CODE ENDS
END
;EOF
