Solved

C++ Builder 6 --> Linking to Assembly .OBJ Files

Posted on 2006-10-25
2
780 Views
Last Modified: 2013-11-17
    How to use a C++ Builder 6 application to access data items defined in x86 assembly language files?
     The source code to the .OBJ files are available, as are the .OBJ files themselves.
     The ILINK32 linker is available.
     When viewing the C++ Builder 6 project's folder, there is an .OBJ file with the same name as the project.

     How to use ILINK to link the C++ Builder 6 .OBJ and the assembly language .OBJ files?
     Does a Module Definition File (or anything else) need to be used to define code and data segments during the linking process?
     What are examples of data item definitions (on both the C++ and assembly sides) that allow the C++ project and the assembly files to exchange data?

     I haven't found the information for all this.
0
Comment
Question by:apx_31088
2 Comments
 
LVL 2

Accepted Solution

by:
pmdw earned 500 total points
ID: 17810687
Hi
I am assuming you have a file eg
myassembler.asm
;with code here
Code_seg@
 Func@  my_assm_func
....
end

you will then need to have a
myassembler.h
/*with func declaration here */
void _FAR * my_assm_func();

Note you will have to look at the calling convention definitions you are using
(ie stdcall,  cdecl )

Then you would add the myassembler.asm file to your project (shift+f11)
When you want to call my_assm_func() you incude the header
  #include "myassembler.h"

The rest of the build and compile is standard cbuilder

Note AFAIK This uses the turbo assmbler (tasm) to compile the .asm files in the build
process this has caused probems in once for me.

0
 
LVL 18

Expert Comment

by:JoseParrot
ID: 17817067
Hi,

A very complete tutorial on this subject is at http://www2.arnes.si/~ssdudzin/
It isn't specific to Borland Builder C++ but the examples can be adapted to it.

Jose
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
missing "main" in Java on Eclipse 4 65
installing and using WTP plugin eclipse MARS 3 99
The line on IDE 4 71
Embarcadero C++ Builder XE10.1 Berlin red arrow Indicator 2 19
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

920 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

16 Experts available now in Live!

Get 1:1 Help Now