Solved

Assembling in Delphi 3.0

Posted on 1998-06-19
3
119 Views
Last Modified: 2010-04-04
Hi,

Does any one know how to use PUSH instruction built-in Delphi 3.0 to push a double data type (64bit) to the stack whose resgister is only 32bit?

Thanks.
0
Comment
Question by:NYang
3 Comments
 
LVL 3

Expert Comment

by:rickpet
ID: 1354150
If your not worried about losing the high bits you can type it to a pointer...

var
  myComp: comp

.

  pointer(myComp);
0
 
LVL 3

Accepted Solution

by:
vladika earned 10 total points
ID: 1354151
Let exists such code

procedure Test(T: Double);
begin
end;

procedure Push1;
var T: Double;
begin
  T := 1;
  Test(T);
end;

It's equivalent
procedure Push2;
var T: Double;
begin
  T := 1;
  asm
    push dword ptr T.4
    push dword ptr T
    call Test
  end;
end;

So, use PUSH instruction 2 times

0
 

Author Comment

by:NYang
ID: 1354152
Many thanks to vladika for solving my problem.

NYang
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now