pairofstrings said:
Thank you.
Question one:
Can a C language program have code written in C plus plus and/or Assembly language? I will use Turbo C compiler v3.0
Yes to both. You would compile the C and C++ code using the Turbo C compiler (tc.exe if I'm remembering correctly), and assemble the assembly code using tasm.exe. Note that C++ is always written this way, not as "C plus plus".
The linker (tlink.exe) would be used to combine the object code produced by the compiler and assembler into an executable. One thing to be aware of is that the compiler "mangles" the names of C++ functions, so you have to take that into account when you call them from the C or assembly portions.
I'm assuming that the different types of code would be in different files, although you can write assembly code inline inside C or C++ code.
pairofstrings said:
Question two:
Can a C plus plus language program have code written in C and/or Assembly language? I will use Turbo C compiler v3.0
A C++ module can call a function written in C or a PROC written in assembly.
pairofstrings said:
Question three:
Can a Assembly language program have code written in C and/or C plus plus? I will use TASM or NASM.
An assembly "main" program can call code written in C or C++. The linker doesn't particularly care what language the code was written in - it just combines object code into an executable.
pairofstrings said:
Question four:
Can Java language program have code written in C and/or C plus plus and/or Assembly language? (Can be invoked?) I will use Notepad and Java Development Kit.
I'm pretty sure you can't mix Java and C/C++/assembly, but I could be wrong. I would be very surprised to find that you can mix Java with C/C++/assembly. How Java gets interpreted and executed is very different from how C, C++, and assembly are translated, linked, and executed.
pairofstrings said:
Question five:
Can Assembly language program have code written in C and/or C plus plus and/or Java? (Can be invoked?) I will use TASM or NASM.
No Java.
pairofstrings said:
Where can I invoke and where can the mixing be done directly?
I only have knowledge that:
C, C plus plus and Assembly language code are mixed in one single program to program ARM processors. I do not know if C plus plus and Assembly language are mixed in C program or C and Assembly language are mixed in C plus plus program or C and C plus plus are mixed in Assembly language program.
I believe that the most common arrangement would be to have a C++ main program that calls functions written in C++ and possibly some legacy code that was written in C. For time-critical or hardware-specific applications, some assembly code might be used to speed up processing.
pairofstrings said:
Please tell me which is where.
Sorry for asking so many questions.