0% found this document useful (0 votes)
65 views1 page

1.what Is Mixed Language Programming?

Mixed language programming involves calling programs or routines written in different languages from a primary language. For example, a C program may call assembly language routines that have been assembled separately. This allows each language to focus on tasks it performs best, like using a low-level language for performance critical code. The abstraction of languages hides details but also limits capabilities, so mixed language programming provides benefits of multiple languages without building new abstractions.

Uploaded by

shruti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views1 page

1.what Is Mixed Language Programming?

Mixed language programming involves calling programs or routines written in different languages from a primary language. For example, a C program may call assembly language routines that have been assembled separately. This allows each language to focus on tasks it performs best, like using a low-level language for performance critical code. The abstraction of languages hides details but also limits capabilities, so mixed language programming provides benefits of multiple languages without building new abstractions.

Uploaded by

shruti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.What is mixed language programming?

1. There are times when programs need to call programs written in other languages
referred as mixed language programming. For example, when a particular subprogram is
available in a language other than language you are using, or when algorithms are
described more naturally in a different language, you need to use more than one
language.
2. Mixed-language programming always involves a call to a function, procedure, or
subroutine. Mixed-language calls involve calling functions in separate modules. Instead
of compiling all source programs with same compiler, different compilers or assemblers
are used as per the language used in the programs.
3. Microsoft C supports this mixed language programming. So it can combine assembly
code routines in C as a separate language.
4. C program calls assembly language routines that are separately assembled by-MASM
(MASM Assembler). These assembled modules are linked with the compiled C modules
to get executable file.

2. What are the advantages and disadvantages of mixed language programming?


Advantages of mixed language programming:
Programming languages are fundamentally abstractions that assist in helping you tell a
computer what to do. As they are abstractions, this means that they hide some of the details
and so simplify the overall task, enabling you to comprehend how to do some particular piece
of programming without having to understand the whole thing at once. But that hiding also
means that they restrict what you can do: going outside the abstraction is hard, and so also is
having to build a lot of new abstractions on top of the base level provided by the language.
The net effect of this is to mean that a particular programming language has a range of
programming tasks that it is well suited to, but it is not going to be good for everything. A low-
level programming language allows you to do low-level work, often that happens to be
performance critical.
The best way out of this situation where a programming language that can do one task isn't
good for others is to use multiple programming languages. Let each language focus on doing
the tasks that it is good at, and then transfer control to code written in another language for
other parts. It's specialization (and also componentization) and it is a good thing indeed.

You might also like