Solved

Assembling in Delphi 3.0

Posted on 1998-06-19
3
126 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

734 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