AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein In Asm-Prozedur eine Exception auslösen
Thema durchsuchen
Ansicht
Themen-Optionen

In Asm-Prozedur eine Exception auslösen

Ein Thema von Amateurprofi · begonnen am 2. Nov 2023 · letzter Beitrag vom 11. Nov 2023
Antwort Antwort
Amateurprofi

Registriert seit: 17. Nov 2005
Ort: Hamburg
1.101 Beiträge
 
Delphi XE2 Professional
 
#1

AW: In Asm-Prozedur eine Exception auslösen

  Alt 7. Nov 2023, 01:58
Hier, in #24 sind die Prozeduren für die ich das haben wollte.
Noch einmal vielen Dank für die Hilfestellungen.

https://www.delphipraxis.net/119187-...ml#post1529146
Gruß, Klaus
Die Titanic wurde von Profis gebaut,
die Arche Noah von einem Amateur.
... Und dieser Beitrag vom Amateurprofi....
  Mit Zitat antworten Zitat
Benutzerbild von paule32.jk
paule32.jk

Registriert seit: 24. Sep 2022
Ort: Planet Erde
356 Beiträge
 
Delphi 11 Alexandria
 
#2

AW: In Asm-Prozedur eine Exception auslösen

  Alt 10. Nov 2023, 11:21
@Kas Obi:

I think, the stack is need under modern Microsoft Windows.
Because the first two 8 Bit = 16 Bit = 10h is for 64-Bit self-references the Functions, and Procedures.
So the first Argument/Parameter for the Function's/Procedure's begin at Bit 16.
I say to me:
Code:
first := 0 <-- self
second := 1 <-- first Parameter
...
Frag doch einfach
Alles was nicht programmiert werden kann, wird gelötet
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
435 Beiträge
 
#3

AW: In Asm-Prozedur eine Exception auslösen

  Alt 10. Nov 2023, 12:40
@Kas Obi:

I think, the stack is need under modern Microsoft Windows.
Because the first two 8 Bit = 16 Bit = 10h is for 64-Bit self-references the Functions, and Procedures.
So the first Argument/Parameter for the Function's/Procedure's begin at Bit 16.
I say to me:
Code:
first := 0 <-- self
second := 1 <-- first Parameter
...
I am not sure i do understand that %100, but Self will be used and added ONLY in Objects and Classes when the code is used in OOP style, not in orphan procedures/functions like all the mentioned p/f in this thread.

Example
Code:
function MyFunc(A: Integer; B: string): Integer;
begin

end;
 // Internally the compiler will make generate the code exactly as the following

procedure MyFuncAsProc(A: Integer; B: string; out Result: Integer);
begin

end;

------------------------

function MyClass.MyFunc(A: Integer; B: string): Integer;
begin

end;
 // Internally the compiler will make generate the code exactly as the following

procedure MyClass.MyFuncAsProc(const Self: TMyClass; A: Integer; B: string; out Result: Integer);
begin

end;
So using the satck is not for only referencing Self, in fact Self will always be in a register.( in edx on x86/x32, and in rcx on x64)

and that if i understand your comment right and we are talking about Self like This in other languages.
Kas
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.399 Beiträge
 
Delphi 12 Athens
 
#4

AW: In Asm-Prozedur eine Exception auslösen

  Alt 10. Nov 2023, 12:46
no, with is only for results greater a Register aka SizeOf(Pointer)
or for Results with managed types, such as string and interface.
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
Benutzerbild von paule32.jk
paule32.jk

Registriert seit: 24. Sep 2022
Ort: Planet Erde
356 Beiträge
 
Delphi 11 Alexandria
 
#5

AW: In Asm-Prozedur eine Exception auslösen

  Alt 10. Nov 2023, 19:41
@kas ob:

ehmm... with self, I mean not the Delphi keyword in Context of Classes/Records.
with self, I mean the internal working Design of Microsoft Windows.
Like himitsu said - it could be for "self" managed Code (COM+).

And I can bet, that Microsoft have a secret Layer'ed File with Numbers (I pointed: 2 ^64 = 18 Trillion GiBytes dataflow. So, each managed Type becomes a (GUID) Number, and as such, all the Component(s) are different and can directly accessed. Instead to use String like in Delphi, and C++ Builder Debug Symbols.
In older Window's, the DLL Functions could be called by Value, and Name.
Frag doch einfach
Alles was nicht programmiert werden kann, wird gelötet
  Mit Zitat antworten Zitat
Benutzerbild von jaenicke
jaenicke

Registriert seit: 10. Jun 2003
Ort: Berlin
9.989 Beiträge
 
Delphi 12 Athens
 
#6

AW: In Asm-Prozedur eine Exception auslösen

  Alt 10. Nov 2023, 22:01
I don't understand what you mean, but the stack layout is documented here:
https://learn.microsoft.com/en-us/cpp/build/stack-usage
Sebastian Jänicke
AppCentral
  Mit Zitat antworten Zitat
Benutzerbild von paule32.jk
paule32.jk

Registriert seit: 24. Sep 2022
Ort: Planet Erde
356 Beiträge
 
Delphi 11 Alexandria
 
#7

AW: In Asm-Prozedur eine Exception auslösen

  Alt 10. Nov 2023, 22:11
hello @jaenicke:

I point to: PROLOG and EPILOG

You can not simply call Exception Functions or any Functions of any Classes without .Create a Instance.
This give MAVs.
Frag doch einfach
Alles was nicht programmiert werden kann, wird gelötet
  Mit Zitat antworten Zitat
Antwort Antwort


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 23:23 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-2025 by Thomas Breitkreuz