AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

is there any error in this function

Ein Thema von randy_dom · begonnen am 20. Mär 2012 · letzter Beitrag vom 20. Mär 2012
 
randy_dom

Registriert seit: 28. Apr 2008
17 Beiträge
 
#1

is there any error in this function

  Alt 20. Mär 2012, 11:38
Delphi-Version: 7
here is my function

Delphi-Quellcode:
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;
But when i call it i get an AV

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
  Mit Zitat antworten Zitat
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:00 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz