answersLogoWhite

0


Best Answer

Because machine language itself varies across systems. For example, machinecode for a x86 is totally different from machinecode for a PowerPC. This is why we need compilers and assemblers, so that the same higher level code can be translated into lower level code for various architectures.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

Assembly language is machine-dependent. Every machine architecture requires its own unique version of assembly language and its own assembler to produce the machine code. You cannot transfer code intended for one assembler to another and expect any meaningful machine code to be produced.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why is assembly level language non portable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the example of low level programing language?

The "machine language" and "assembly language" for each CPU architecture are the lowest-level programming languages. The "Forth language" and the "C programming language" are perhaps the most popular non-CPU-specific low-level programming languages. They were once considered high-level programming languages, and certainly they are at a higher level than assembly language, but now they are considered low-level programming languages when compared to the much higher-level languages available today (Python, Java, C++, etc). Low-level programming languages provide little or no abstraction from the CPU's instruction set architecture; typically they interact with the hardware directly.


What is lint in c language?

Lint is suspicious or non-portable code. Lint is also the name of a program that looks for suspicious or non-portable code.


Why assembly level language is called machine dependent language?

Machine languages are composed of instructions intended to be read directly by the microprocessor (the computer's CPU). The manufacturer of the CPU determines it's "INSTRUCTION SET" ASSEMBLY LANGUAGE on the other hand IS NOT machine dependent. The same commands ADD, Divide, Move, etc are universal. HOWEVER the ASSEMBLY LANGUAGE has to have an INTERPRETER for EACH CPU, and that will translate the Universal ASSEMBLY language to the MACHINE SPECIFIC code required to program the CPU.


What are assembly and machine languages?

Machine language is the native language of the machine. Every machine type has its own version of machine code, determined by the processor architecture. As such, code for a particular architecture cannot execute on a machine with a different architecture; in other words, machine code is non-portable. Assembly language is a human-readable version of machine code. Each instruction (or opcode) maps to an easy to remember mnemonic such as MOV (move), ADD (addition), SUB (subtract) and so on. In this way the programmer doesn't have to remember the binary value of each opcode. Binary values themselves, such as memory offsets, can also be encoded using more convenient notation such as hexadecimal while decimal values and character information can be entered as literals. Due to its low-level nature, assembly language source code needs to be heavily commented to assist the reader. In order to produce the required machine code, the assembly language source code must be converted to a machine code executable. This is achieved using a relatively simple program known as an assembler. However, as with machine code itself, assembly languages are machine-dependent and non-portable. To create portable code, you need to use a high-level language that is suitable for cross-platform development. When we talk about low-level or high-level programming languages, we're really talking about the amount of abstraction between the human-readable source code and the resultant machine code. High level languages are highly abstract, such that a single high level statement may produce dozens of low-level machine instructions. When writing code in assembly, each instruction has to be written in painstaking detail by hand. Unlike assembly languages which must be assembled, high-level languages are either compiled or interpreted. A compiled language produces a standalone machine code executable (similar to that produced by an assembler) whereas interpreted languages require a runtime program to convert and execute high-level statements one statement at a time. Some languages, like Java, compile to byte code rather than machine code. The byte code then has to be interpreted to produce the machine code but the byte code is portable. Java uses the Java virtual machine to perform the interpretation. With high-level languages like C++, it is rarely necessary to use anything less abstract because C++ language compilers are capable of producing highly optimised and more efficient machine code far more easily and more quickly than any human could. Unlike Java, which is only suitable for applications development, C++ can be used to write any type of software, including low-level software such as drivers and operating system kernels. Prior to C++, this type of software would have been written in assembly language and/or C language.


What do you mean by a low level language?

A low-level programming language is one that has little to no abstraction between the source code and the machine code produced by the language translator. Machine code has no abstraction whatsoever and is the lowest possible level of coding (machine code is the native language of the machine). Assembly language has very little abstraction because each mnemonic either maps 1:1 with a specific machine operation code (opcode), or maps to one of several opcodes that only differ by the operand types and can be implied from those operands. Given the lack of abstraction, low-level code is machine-dependent code and is therefore non-portable. That is, code is written specifically to suit the assembler and thus the machine it was intended to execute upon. Conversely, high-level code has a high-level of abstraction and is generally portable. That is, code is written to suit the language compiler or interpreter rather than underlying hardware. High-level languages generally provide a much more convenient method of producing low-level code that is much easier for humans to read, write and maintain, largely due to the high-level of abstraction these languages provide.

Related questions

What is assemble in computer programming?

Assembly (not assemble) is the process by which low-level instruction code written in assembly language is converted into machine code. This is achieved using a piece of software called an assembler. Assembly language is a machine-specific language thus the resultant machine code is non-portable.


What are the example of low level programing language?

The "machine language" and "assembly language" for each CPU architecture are the lowest-level programming languages. The "Forth language" and the "C programming language" are perhaps the most popular non-CPU-specific low-level programming languages. They were once considered high-level programming languages, and certainly they are at a higher level than assembly language, but now they are considered low-level programming languages when compared to the much higher-level languages available today (Python, Java, C++, etc). Low-level programming languages provide little or no abstraction from the CPU's instruction set architecture; typically they interact with the hardware directly.


What is lint in c language?

Lint is suspicious or non-portable code. Lint is also the name of a program that looks for suspicious or non-portable code.


Why assembly level language is called machine dependent language?

Machine languages are composed of instructions intended to be read directly by the microprocessor (the computer's CPU). The manufacturer of the CPU determines it's "INSTRUCTION SET" ASSEMBLY LANGUAGE on the other hand IS NOT machine dependent. The same commands ADD, Divide, Move, etc are universal. HOWEVER the ASSEMBLY LANGUAGE has to have an INTERPRETER for EACH CPU, and that will translate the Universal ASSEMBLY language to the MACHINE SPECIFIC code required to program the CPU.


What are assembly and machine languages?

Machine language is the native language of the machine. Every machine type has its own version of machine code, determined by the processor architecture. As such, code for a particular architecture cannot execute on a machine with a different architecture; in other words, machine code is non-portable. Assembly language is a human-readable version of machine code. Each instruction (or opcode) maps to an easy to remember mnemonic such as MOV (move), ADD (addition), SUB (subtract) and so on. In this way the programmer doesn't have to remember the binary value of each opcode. Binary values themselves, such as memory offsets, can also be encoded using more convenient notation such as hexadecimal while decimal values and character information can be entered as literals. Due to its low-level nature, assembly language source code needs to be heavily commented to assist the reader. In order to produce the required machine code, the assembly language source code must be converted to a machine code executable. This is achieved using a relatively simple program known as an assembler. However, as with machine code itself, assembly languages are machine-dependent and non-portable. To create portable code, you need to use a high-level language that is suitable for cross-platform development. When we talk about low-level or high-level programming languages, we're really talking about the amount of abstraction between the human-readable source code and the resultant machine code. High level languages are highly abstract, such that a single high level statement may produce dozens of low-level machine instructions. When writing code in assembly, each instruction has to be written in painstaking detail by hand. Unlike assembly languages which must be assembled, high-level languages are either compiled or interpreted. A compiled language produces a standalone machine code executable (similar to that produced by an assembler) whereas interpreted languages require a runtime program to convert and execute high-level statements one statement at a time. Some languages, like Java, compile to byte code rather than machine code. The byte code then has to be interpreted to produce the machine code but the byte code is portable. Java uses the Java virtual machine to perform the interpretation. With high-level languages like C++, it is rarely necessary to use anything less abstract because C++ language compilers are capable of producing highly optimised and more efficient machine code far more easily and more quickly than any human could. Unlike Java, which is only suitable for applications development, C++ can be used to write any type of software, including low-level software such as drivers and operating system kernels. Prior to C++, this type of software would have been written in assembly language and/or C language.


What is the term HLL in computer language?

High-level language (HLL) is a term that applies to any computer language that applies a level of abstraction such that there is little or no direct relationship between the code being written and the machine code that is compiled from that code. Java is an HLL with one of the highest levels of abstraction. Its code compiles to byte code rather than machine code, which is then interpreted by the Java virtual machine (JVM). This makes it highly portable as there are few systems that don't have a JVM implementation. However, there's very little access to the underlying architecture as code is written to suit the JVM, a virtual non-existent machine with a consistent interface, rather than the physical machine upon which it runs. C++ is also an HLL but because it compiles to machine code and has direct access to the underlying architecture, its level of abstraction is greatly reduced. It's every bit as portable as Java, but programs must be compiled separately for each platform. As a result, C++ programs take a little longer to develop, but execute many times faster than Java programs. By contrast, assembly language is a low-level language that symbolises every machine instruction as a simple, easy-to-remember mnemonic. As a result, there is very little in the way of abstraction. The only thing lower than assembly language is machine code itself ("banging the metal"), however assembly programming is a far more efficient and less error-prone means of producing that machine code. It is not portable, however. Every architecture has its own version of assembly language. Although C++ code can produce very efficient machine code by itself, assembly language produces the most efficient code as the programmer has complete control over the resulting machine code. However, C++ permits inline assembly language to be used wherever it is needed to maximise performance, so it could be classed as an HLL with low-level features. Java simply cannot compete with this level of control.


What do you mean by a low level language?

A low-level programming language is one that has little to no abstraction between the source code and the machine code produced by the language translator. Machine code has no abstraction whatsoever and is the lowest possible level of coding (machine code is the native language of the machine). Assembly language has very little abstraction because each mnemonic either maps 1:1 with a specific machine operation code (opcode), or maps to one of several opcodes that only differ by the operand types and can be implied from those operands. Given the lack of abstraction, low-level code is machine-dependent code and is therefore non-portable. That is, code is written specifically to suit the assembler and thus the machine it was intended to execute upon. Conversely, high-level code has a high-level of abstraction and is generally portable. That is, code is written to suit the language compiler or interpreter rather than underlying hardware. High-level languages generally provide a much more convenient method of producing low-level code that is much easier for humans to read, write and maintain, largely due to the high-level of abstraction these languages provide.


When is a computer language called machine dependent?

When the code is targeted towards a specific machine architecture. Machine code is entirely machine-dependent, as is the low-level assembly language used to produce that machine code. High-level languages are not machine dependant, however source code can still be targeted towards a specific architecture or platform. Such code is non-portable, however many high-level languages provide methods to filter machine-dependant or platform-dependant code such that the same source code can be compiled on different machines and platforms.


What are high- level languages?

High-level languages are languages that have little or no dependency upon the machine architecture. Code is written with a high-level of abstraction (hence they are classed high-level) which makes it much easier to port the same source code to any machine that has a compatible compiler or interpreter to produce the low-level machine code. Low-level code is non-portable code. Some languages, including C and C++, are both low-level and high-level, often classed as mid-level languages. These languages allow programmers to write both portable and non-portable code within the same program. However, the non-portable code can be rendered portable by crafting alternative versions of the non-portable code for each supported platform, filtering them through the use of precompiler directives. In this way, the compiler only sees the code that is specific to the platform and will compile accordingly. Java is an extremely high-level language that is both compiled and interpreted. Unlike normal compiled languages which compile to machine-dependent code and therefore need to be recompiled separately for each supported platform, Java compiles to byte code which can then be executed upon any machine without recompiling. To achieve this, the target machine must be running an interpreter program known as the Java virtual machine (or JVM) where each physical machine has its own implementation of the JVM. In other words, source code is targeted towards the same, non-physical machine. The upside is that compilations are highly portable. The downside is that Java programs do not perform well compared to their compiled language equivalents and are only suitable for high-level applications software (you cannot write low-level software such as operating system kernels and drivers).


What is the difference between assembly language program and high level language program?

There is very little difference, functionally, between assembly language and machine level language. Each assembly language statement corresponds to one machine instruction. The difference is in readability (who wants to read and write in hex code?) and in ease of address computation.


Explain the differences between Assembly Language and High Level Language?

Assembly language is used to write programs using the instruction set for a particular processor/controller.(example : 8051 or 8086 or MIPS).It is confined to a particular machine, it involves symbolic representation of the binary machine codes and other constants needed to program a given CPU architecture.Assembly Language require an ASSEMBLER to convert the assembly code to machine level code(HEX CODE)High Level Language require a Compiler to convert into ASSEMBLY THEN machine level code.(Now-a-days compilers are smart enough to generate the machine code directly)To write assembly code it is necessary to know the architecture of the processor or controller.To write an High Level Program it is not neccessay to know the architecture completly.Assembly language is not protable.High Level Language is Portable.with regardsMohan Kumar.JMCIS,MANIPAL.Assembly language is used to write programs using the instruction set for a particular processor/controller.(example : 8051 or 8086 or MIPS).High Level Language is used to write programs using some grammer rules or languages created like C,PASCAL,FORTRN,JAVA.Assembly Language require an ASSEMBLER to convert the assembly code to machine level code(HEX CODE)High Level Language require a Compiler to convert into ASSEMBLY THEN machine level code.(Now-a-days compilers are smart enough to generate the machine code directly)To write assembly code it is necessary to know the architecture of the processor or controller.To write an High Level Program it is not neccessay to know the architecture completly.Assembly language is not protable.High Level Language is Portable.with regardsMohan Kumar.,MCIS,MANIPAL.EACH HLL INSTRUCTION SPECIFY SEVERAL INSTRUCTIONS IN isa OF COMPUTER. WHEREAS EACH aSSEMBLY LEVEL INSTRUCTION SPECIFIES A SINGLE INSTRUCTION IN ISA OR MACHINE LEVEL LANGUAGEPRIYA BAJAJWIPRO TECHNOLOGIESBANGALOREAnswer--Assembly language :-A programming language that is once removed from a computer's machine language. Machine languages consist entirely of numbers and are almost impossible for humans to read and write. Assembly languages have the same structure and set of commands as machine languages, but they enable a programmer to use names instead of numbers.Each type of CPU has its own machine language and assembly language, so an assembly language program written for one type of CPU won't run on another. In the early days of programming, all programs were written in assembly language. Now, most programs are written in a high-level language such as FORTRAN or C. Programmers still use assembly language when speed is essential or when they need to perform an operation that isn't possible in a high-level language.High-level language:-A high level language hides the micro abstractions such as set of command required to be performed by the processors such as CPU. Java and C++ are all high level languages.Java, C++ : all easy to write non-binary languagesExample : (i=10, i


Why are machine and assembly languages known as low level languages?

Machine code isn't just low-level, it is the native language of the machine; the only language the machine actually understands. When we say low-level or high-level we are referring to the amount of abstraction between the source code and the machine code. The source code must be translated into machine code and the more closely that code resembles the machine code the more low-level it is. Assembly is extremely low-level because there is very little in the way of abstraction; the assembly instructions map 1:1 with the machine code. C is also low-level because C statements map very closely to the machine code, but offer a higher level of abstraction than assembly. Assembly language is machine-dependant because every type of machine requires its own distinct version of assembly language whereas C's slightly higher level of abstraction means it can be used to write non-machine-dependant code, more portable code. However, the source code must be recompiled for each machine. Java, on the other hand, is extremely high-level because the source code bears no resemblance whatsoever to the machine code. Indeed, the source code does not even compile to machine code it compiles to Java byte code suitable for interpretation by the Java virtual machine. In other words, the source code is compiled against a non-existent machine, but one that has common architecture across all platforms that support Java (which is pretty much everything today). This makes the code extremely portable because the Java virtual machine handles the low-level conversion from the Java byte code to the physical machine's native code; the same byte code can be executed upon any platform without the need to recompile.