| |
|
|
Normann Strübli | Hi,
Perhaps have I it Yes somewhere überlesen, but are Procedures inside the XPIA-Codes allows?
goes the? and how can then The upper procedure something on The aufrufende transfer if ret not allows is?
Greeting Normann |
|
|
| |
|
|
|
| now You could on whom AsmStart-area by Parameters The Prozeduradresse of/ one Profanprozedur indicate circa these then with Call aufzurufen. How with the the Parameter Passing & the Returnwertes looks - I likes eigendlich not drüber cogitate.
generally would I like this dissuade from the AsmProc a XPrfProc To callen.
salvo. |
|
|
| |
|
|
|
Normann Strübli | No iF, the have you got wrong understood
I have two Procedures within one ASM-Blockes and the a should The others Call. From one XPrfProc-appeal wasn't The speech...
The question was whether mehrer Procedures inside the ASM-Blockes allows are which mutual Call can and what then with <ret> happens.
|
|
|
| |
|
|
|
Michael Dell | Hi,
whether Verschachtellung allows is white I do not.
but that here goes: CompileMarkSeparation {$clq}
Declare a&,b&,c&,d&
Cls
Print "Test Start:"
ASMSTART Zweite
Parameters a&,b&
Return c&
mov eax,para1
mov ebx,para2
add eax,ebx
ASMEND
ASMSTART Erste
Return d&
Local Var1 :DWORD
Local Var2 :DWORD
mov Var1,6
mov Var2,3
Scall Zweite,Var1,Var2
ASMEND
Print "Ergebnis (6+3=9): " + Str$(d&)
WaitKey
End
|
|
|
| Salu Michael...
Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! | 11/09/05 ▲ |
|
|
|
|
| [quote:b049d93a42]No iF, the have you got wrong understood [/quote:b049d93a42]From take off Procedures redest You then? In ASM Gibts no Procedures - I had means suppose the You of XProfan-Procedures redest - of what otherwise?
Asm-reaches are no Procedures - separate functions.
salvo. |
|
|
| |
|
|
|
Frank Abbing | Hi,
To Michaels Solution benötigst You yet the Macro Scall: CompileMarkSeparationScall MACRO name:REQ,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22
FOR arg,<p22,p21,p20,p19,p18,p17,p16,p15,p14,p13,
p12,p11,p10,p9,p8,p7,p6,p5,p4,p3,p2,p1>
IFNB <arg>
push arg
ENDIF
ENDM
call name
includeasis.inc write. for the next XPIA-Version Have I the now time made, is yes a sinnvolles Macro. Michaels Solution is the simplest, for Own functions instead of invoke simply Scall use.
Call goes naturally too, if The Parameter in umgekehrter Order too the Stack stored go. Invoke goes only, if The functions before definiert go. is take off The next XPIA-Version.
P.s.: two functions in a Assemblerblock weg naturally not. |
|
|
| |
|
|
|
Normann Strübli |
thanks, i think the has me weitergeholfen but it comes certainly yet The one- or others question of me....
Greeting Normann |
|
|
| |
|
|
|
Normann Strübli | and there's tappt im dunkeln already, The next question:
The XPIA reports with subesquent code: Maschinencode couldn't generiert go! I see there but no Error -or? something Have I there well not yet understands. CompileMarkSeparation...
Declare istring$,pb&
Asmstart String2Dword
Parameters addr(istring$)
Return pb&
LOCAL Result:DWORD
mov Result,0
mov edi,para1
invoke lstrlen,para1
.while eax!=0
xor edx,edx
mov dl,byte ptr [edi]
sub dl,"0"
mov esi,eax
dec esi
push eax
mov eax,edx
push ebx
mov ebx,10
.while esi > 0
mul ebx
dec esi
.endw
pop ebx
add Result,eax
pop eax
inc edi
dec eax
.endw
mov eax,Result
Asmend
|
|
|
| |
|
|
|
Michael Wodrich | time look:
- with Parameters is no Variable indicated separate a function. - eax is a Result- and Rechenregister, for counter is ecx rather suitable (sooner from old Time)
it'll well on Parameters lying. simply test times.
Best wishes Michael Wodrich
Have here unfortunately no Tools exist. |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 11/09/05 ▲ |
|
|
|
|
Normann Strübli | but in the Doku of Frank standing indeed:
[quote:e9d72de353]Parameters x&, area#, addr(string$)[/quote:e9d72de353]
|
|
|
| |
|
|
|
Michael Wodrich | then change please times whom names the procedure. the wished I first with write, having But verworfen. Evtl. depends it still with the manner the Namensgebung together (here Specifically with the word DWORD). |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 11/09/05 ▲ |
|
|
|
|
Normann Strübli | No, this is it unfortunately neither. but nevertheless thanks for your speedy Help!
Greeting Normann |
|
|
| |
|
|