Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 406
  • Last Modified:

How make C and ASM in borland 5.02?

Hello, i like of know how i can make C and ASM programs in Borland 5.02(i think) but no using the __asm stand. One external file with the asm code and asm function, and so creater some like one LIB, or BGI(for grapichs). I dont know nothing about how create the .hex file for the asm code. How it know were start the code in the LIB(this is one example) and viculate with the .hex file? i am lost!!!
I am little new in C and i already know >ASM< language. Please, help-me!!! Thanks you very much if anyone can help-me!

Francisco Filho Brasil! :/
0
Franciscofilho
Asked:
Franciscofilho
2 Solutions
 
fridomCommented:
Well the usually way to combine C and ASM is either through inline assembler or what I guess you want to do is the following.
1) Write you assembler code
2) compile that to object code (not an exectable)
3) link the object file with you application.


Regards
Friedrich

0
 
xyzzerCommented:
Besides, if You want to link many modules in different languages You have to remember about the function-call standards. There are:

PASCAL
C
STDCALL

They mostly differ in the order of parameters passing and clean-up responsibility (whether the function or the caller removes things from the stack).

Besides, from what I remember if You want to call a function named FunctionNameHere from C module - its name in ASM module should be _FunctionNameHere.

That's what I remember from my "Operating Systems" labs (classes?).

--Filip
0
 
drnickCommented:
you can use any common assembler,
like TASM, MASM, NASM and so on,
a lot of theam available as freeware,
such as MASM as part of ms win98 sdk to
assemble your code to object files.
link these then together with your c project.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now