Assembly language - computer architecture, Computer Engineering

Assignment Help:

Assembly language:

An assembly program has a series of instructions--mnemonics that relate to a stream of executable instructions, when translated by an assembler that may be loaded into memory and then executed.

For an example, an x86/IA-32 processor may execute the following binary instruction as expressed in machine language (see x86 assembly language):

  • Binary: 10110000 01100001 (Hexadecimal: B0 61)

The equivalent assembly language representation is simpler to remember (example in the Intel synta x, more mnemonic):

  • MOV AL, 61h

Means of this instruction:

  • Move the value 61h (or 97 decimal; the h-suffix means hexadecimal; into the processor register named "AL".

The mnemonic "mov" represents the opcode 1011 which moves the value in the second operand into the register specified by the first operand. The mnemonic was selected by the instruction set designer to abbreviate "move", by making it easier for the programmer to remember.  A comma-separated list of parameters or arguments follows the opcode; it is a typical assembly language statement.

In practice many programmers drop the word mnemonic and which is technically incorrect, call "mov" an op code. When they do this they are referring to the underlying binary code which it represents. To put it as a way, a mnemonic such as "mov" is not an op code, but it symbolizes an op code, one can refer to "the op code mov" for instance when one intends to refer to the binary op code it symbolizes rather than to the symbol -- the mnemonic -- itself. As few modern programmers have required being attentive of actually what binary patterns are the op codes for specific instructions, the distinction has in practice become a bit blurred among programmers but not among processor designers.

An assembler transforms assembly language into machine language, and the reverse by disassemble. There is typically a one-to-one correspondence between assembly statements unlike in high-level languages, and the machine language instructions. But, in some cases, an assembler can provide pseudo instructions which expand into various machine language instructions to provide commonly required functionality. For instance, for a machine that lacks a "branch if greater or equal" instruction, an assembler can be used a pseudo instruction that expands to the machine's "branch if zero (on the result of the set instruction)"and "set if less than" and. All the full-featured assemblers also provide a rich macro language mostly (discussed below) which is used by programmers and vendors to generate more difficult code and data sequences.

Each processor architecture and computer architecture has its own machine language. On this level, each instruction is enough simple to be executed by using a relatively small number of electronic circuits. Computers differ by the type and number of operations they support. For instance, a new 64-bit machine would have different circuitry from a 32-bit machine. They can also have different sizes and numbers of registers and different representations of data types in storage. Whereas most general-purpose computers are able to carry out really the same functionality, the ways they do so differ; the equivalent assembly languages reflect these differences.

Multiple sets of assembly-language syntax or mnemonics may exist for a single instruction set, typically instantiated in different assembler programs. In these types of cases, the most popular one is usually that supplied by the manufacturer and used in its documentation.


Related Discussions:- Assembly language - computer architecture

What do you mean by analysis and design, Analysis: Basically, it is the...

Analysis: Basically, it is the process of determining what requirement to be done before how it should be done. In order to accomplish this, the developer shows the existing sy

Give an example of first fit and best fit algorithms, Given memory partiti...

Given memory partitions of 100k, 500k, 200k, 300k, and 600k (in order), apply first fit and best fit algorithms to place processes with the space requirement of 212k, 417k, 112k an

What is hit and hit rate , What is hit? A successful access to data in ...

What is hit? A successful access to data in cache memory is known as hit. Normal 0 false false false EN-IN X-NONE X-NONE

What is the use of fork and exec system calls, What is the use of fork and ...

What is the use of fork and exec system calls?  Fork is a system call by which a new process is formed. Exec is also a system call, which is used after a fork by one of the two

What is machine language, What is Machine Language? To write program fo...

What is Machine Language? To write program for a computer we need to specify, directly or indirectly the sequence of machine instructions.  These instructions  inside  computer

What is stack addressing, Q. What is Stack Addressing? In this addressi...

Q. What is Stack Addressing? In this addressing technique operand is implied as top of stack. It isn't explicit however implied. It employs a CPU Register known as Stack Pointe

Explain mdr and mar, Explain MDR and MAR. The data and address lines of...

Explain MDR and MAR. The data and address lines of the external memory bus linked to the internal processor bus by the memory data register, MDR and the memory address register

What is unordered lists, Q. What is Unordered Lists? First, we will bui...

Q. What is Unordered Lists? First, we will build an unordered list. Many times, these lists are also termed as bulleted lists. These lists are characterized by list items which

Explain about double error detection bit, Q. Explain about Double Error Det...

Q. Explain about Double Error Detection bit? Let's presume now that two bit errors take place in data. Data received: So on -matching we conclude P3-D3 pair doesn't

Explain moores law and amdahls law, Question (a) Imagine you need to mo...

Question (a) Imagine you need to move people through a distance of 10 miles, with the following specifications. • Car: capacity = 5, speed = 60 miles/hour • Bus: capacity

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd