TITLE CXAFUN .386 .MODEL FLAT ; _ACODE SEGMENT PARA USE32 PUBLIC 'CODE' ASSUME CS:_ACODE PUBLIC _cxafun_ ; Entry point name _cxafun_ PROC NEAR ; Start of procedure push ebp ; Save EBP mov ebp,esp ; Will use EBP for args ; mov eax, [ebp+12] ; Argument address fld dword ptr [eax] ; Get real part fadd dword ptr [eax] ; Double it fld dword ptr [eax+4] ; Get imag part fadd dword ptr [eax+4] ; Double it ; mov eax, [ebp+8] ; Return buffer address fstp dword ptr [eax+4] ; Store imag part fstp dword ptr [eax] ; Store real part ; mov esp,ebp ; Restore stack pointer pop ebp ; Restore base pointer ret ; Return to caller _cxafun_ ENDP ; End of procedure _ACODE ENDS ; End of segment END