![]() |
Delphi-Version: 7
is there any error in this function
here is my function
Delphi-Quellcode:
But when i call it i get an AV
Function call_to_func(mem, a, c: DWORD): integer;
var b: integer; begin b := 0; writeln(format('call_to_func: mem=%X a=%X c=%X',[mem,a,c])); asm mov ecx,a mov edx,c mov eax, mem push ecx call eax //--->!!! Program try to call assembled code which is stored in mem pointer pop ecx mov b, eax end; call_to_func := b; end; Access violation at address 01496180. Write of address 01496180 ........... 01496180 push esi ; <-- EXCEPTION ............ call_to_func works correctly and assembled function called by "call eax" but this assembled function can not push register??!! stack not writeable??? All this under windows 7 . Please is there any error in the above Function ? many thanks |
AW: is there any error in this function
Delphi-Quellcode:
Function call_to_func(mem, a, c: DWORD): integer;
var b: integer; begin b := 0; asm mov ecx,mem mov edx,c mov eax, a push ecx call ecx //--->!!! Program try to call assembled code which is stored in mem pointer pop ecx mov b, eax end; call_to_func := b; end; |
AW: is there any error in this function
thank you Bummi , But can you explain me what's the difference between my function and your modified one ?
|
AW: is there any error in this function
my assembler time is years ago, perhaps this will help
![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:15 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz