Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Borland Delphi > Re: Function ca...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 8 Topic 3722 of 3952
Post > Topic >>

Re: Function calling convention for large return values ?

by "Skybuck Flying" <BloodyShame@[EMAIL PROTECTED] > May 2, 2008 at 07:42 AM

Well, I decided to modify my latest example a little bit to show what 
happens for int64, because it can be interesting too to use int64...

 if ExamineMixedParameters
 (
  $1A, // eax
  $1B, // edx
  $1C, // ecx
  $1D, // stack
  $0102030405060708, // stack
  $1F, // stack
  $10, // stack
  $11  // stack
 ) then
 begin
  writeln('true');
 end;

// disassembly:

Project1.dpr.129: if ExamineMixedParameters
0040936F 6A1D             push $1d
00409371 6804030201       push $01020304
00409376 6808070605       push $05060708
0040937B 6A1F             push $1f
0040937D 6A10             push $10
0040937F 6A11             push $11
00409381 B11C             mov cl,$1c
00409383 66BA1B00         mov dx,$001b
00409387 B01A             mov al,$1a
00409389 E846FEFFFF       call ExamineMixedParameters
0040938E 84C0             test al,al
00409390 7416             jz $004093a8

// The value is nicely visible... it's indeed pushed like the others,
except 
in this case
// the least significant value is pushed first, then the most significant 
value.
// good to know that ;) it makes sense from left to right.

// **** intel with their weird hardware memory layout from right to left 
HAHAHAHAHAHA. Actually **** all hardware with numbering from
// right to left, it's unnatural for human beings to read from right to
left 
except if you bin laden HAHAHA LOL

Bye,
  Skybuck.
 




 8 Posts in Topic:
Function calling convention for large return values ?
"Skybuck Flying"  2008-05-02 07:13:19 
Re: Function calling convention for large return values ?
"Skybuck Flying"  2008-05-02 07:23:35 
Re: Function calling convention for large return values ?
"Skybuck Flying"  2008-05-02 07:30:33 
Re: Function calling convention for large return values ?
"Skybuck Flying"  2008-05-02 07:42:51 
Re: Function calling convention for large return values ?
"Skybuck Flying"  2008-05-02 09:36:22 
Re: Function calling convention for large return values ?
Ivan Levashew <octagra  2008-05-04 04:25:06 
Re: Function calling convention for large return values ?
Terence <tbwright@[EMA  2008-05-03 16:01:07 
Re: Function calling convention for large return values ?
Terence <tbwright@[EMA  2008-05-03 18:42:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 4:46:08 CDT 2008.