English
Assembler Forum

Own Assembler-function a others Call.

 

Frank
Abbing
In another Thread watts the example called, a Own Assemblerfunktion a others aufzurufen:
CompileMarkSeparation
In my actually Program make is plenty of XPIA use, and there's me Fehlerquelle noticed. Übergibt one Parameter a function on another, so must before The own Parameter rescued go. this is too logical, because XPIA to Vereinfachung the Parameter Passing interne variables using. naturally must these global his. therefore can a aufgerufene function The Parameter the aufrufenden function change. These counts it means to appeal To saving!
One example with Parameters, around the To explain:
CompileMarkSeparation
 {$iq}
Declare z1&,z2&
Cls

Asmstart one (0,0)

    mov eax,para1
    add eax,para2

Asmend

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

Asmstart two (10,15)

    Scall one,500,45
    add eax,para1
    add eax,para2

Asmend (z1&)

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

Asmstart three (10,15)

    push  para1
    push  para2
    Scall one,500,45
    pop para2
    pop para1
    add eax,para1
    add eax,para2

Asmend (z2&)

Print "500 + 45 + 10 + 15 = " + Str $(z1&)+" wrong!"
Print "500 + 45 + 10 + 15 = " + Str $(z2&)+" correctly.!"
WaitInput
End

function two operates with incorrect Values moreover, during function three correctly. operates.

naturally functions The conventional manner the Parameter Passing - without The Vereinfachung - How dwelt:
CompileMarkSeparation
Asmstart four (10,15)

    Scall one,500,45
    add eax,[ebp+8]
    add eax,[ebp+12]

Asmend (z3&)

 
01/16/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.452 Views

Untitledvor 0 min.
p.specht06/28/21
funkheld01/03/14
iF04/16/13

Themeninformationen

this Topic has 1 subscriber:

Frank Abbing (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie