Autor Beitrag
SandStein
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Mo 12.12.05 18:39 
Hallo, ich habe folgendes Problem.

Ich würde gerne im inline Assembler die random-Fkt aufrufen und habe keine Ahnung wie das geht.

Den Parameter einfach auf den Stack zu pushen funtzt leider nicht.

Kann mir jmd. helfen?
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 12.12.05 18:52 
Was brauchst Du bei der Random-Funktion von Delphi genau?

Random ohne Parameter oder Random mit Parameter als Integer? Die müssen unter ASM nämlich komplett unterschiedlich angesprochen werden.

Auf jeden Fall solltest Du Dir bereits einmal angucken, wie man Compiler-Interne Funktionen mit ASM aufruft. Dazu hab ich bzgl. RaiseException in dieser Sparte bereits einen Tipp gegeben, weil ich dieses Problem auch bereits hatte.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Allesquarks
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 510

Win XP Prof
Delphi 7 E
BeitragVerfasst: Mo 12.12.05 18:56 
die genauen Funktionsnamen weichen häufig von den Hochsprachennamen ab. Im Zweifelsfall das Assemblat ansehen. In deinem Fall glaube ich suchst du randint.

Für die Übergabe: In der Delphi Hilfe ist recht gut dokumentiert welche Typen wo übergeben werden.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 12.12.05 19:12 
Funktionsnamen sind

System.@RandInt(ARange: Integer): Integer; //--> EAX In; <-- EAX Out
und
System.@RandExt: Extended; // --> None; <-- ST0 out

Nähere Informationen zum Aufruf bitte diesem Thread entnehmen.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
SandStein Threadstarter
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Mo 12.12.05 19:16 
Boa! Vielen Dank!