Уважаемые программисты! Снова прошу помочь мне с сишными функциями Код (Text): format PE console include 'win32axp.inc' N dd ? d db '%d',0 form db 'Sinus of %d is %d, cosinus of %d is %d',0 string db 'Input N:',0 printf dd ? scanf dd ? sin dd ? cos dd ? name1 db 'printf',0 name2 db 'scanf',0 name3 db 'sin',0 name4 db 'cos',0 dllka db 'msvcrt.dll',0 sinus dd ? cosinus dd ? ex dd ? .code fuck: invoke LoadLibrary,dllka push eax push eax push eax invoke GetProcAddress,eax,name1 mov [printf],eax pop eax invoke GetProcAddress,eax,name2 mov [scanf],eax pop eax invoke GetProcAddress,eax,name3 mov [sin],eax invoke GetProcAddress,eax,name4 mov [cos],eax cinvoke printf,string cinvoke scanf,d,N cinvoke sin,N mov [sinus],eax cinvoke cos,N mov [cosinus],eax cinvoke printf,form,[N],[sinus],[N],[cosinus] invoke ExitProcess,0 .end fuck Независимо от того, вызываю ли я sin,[N] или sin,N - возникает ошибка "execution 0x0" Дизасм: Код (Text): start: ; "msvcrt.dll" .text:00402000 push offset aMsvcrt_dll .text:00402005 call ds:LoadLibraryA .text:0040200B push eax .text:0040200C push eax .text:0040200D push eax .text:0040200E push offset aPrintf ; "printf" .text:00402013 push eax .text:00402014 call ds:GetProcAddress .text:0040201A mov dword_401037, eax .text:0040201F pop eax .text:00402020 push offset aScanf ; "scanf" .text:00402025 push eax .text:00402026 call ds:GetProcAddress .text:0040202C mov dword_40103B, eax .text:00402031 pop eax .text:00402032 push offset aSin ; "sin" .text:00402037 push eax .text:00402038 call ds:GetProcAddress .text:0040203E mov dword_40103F, eax .text:00402043 push offset aCos ; "cos" .text:00402048 push eax .text:00402049 call ds:GetProcAddress .text:0040204F mov dword_401043, eax .text:00402054 push offset aInputN ; "Input N:" .text:00402059 call dword_401037 .text:0040205F add esp, 4 .text:00402062 push offset dword_401000 .text:00402067 push offset byte_401004 .text:0040206C call dword_40103B .text:00402072 add esp, 8 .text:00402075 push offset dword_401000 .text:0040207A call dword_40103F .text:00402080 add esp, 4 .text:00402083 mov dword_401067, eax .text:00402088 push offset dword_401000 .text:0040208D call dword_401043 .text:00402093 add esp, 4 .text:00402096 mov dword_40106B, eax .text:0040209B push dword_40106B .text:004020A1 push dword_401000 .text:004020A7 push dword_401067 .text:004020AD push dword_401000 .text:004020B3 push offset aSinusOfDIsDCos ; "Sinus of %d is %d, cosinus of %d is %d" .text:004020B8 call dword_401037 .text:004020BE add esp, 14h .text:004020C1 push 0 .text:004020C3 call ds:ExitProcess
Вся беда отсюда: А если серьёзно — посмотри, как это делает компилятор сей: Код (Text): proc get_sin arg fild dword[arg] fstp [bufq] cinvoke sin,dword[bufq],dword[bufq+4] fstp dword[arg] mov eax,[arg] ret endp bufq dq ?