Solved

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

Posted on 2006-10-25
2
809 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
[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
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:Jose Parrot
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

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…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

632 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