assembly language

Views:
 
Category: Education
     
 

Presentation Description

ASEMBLY LANGUAGE & MACHINE LANGUAGE

Comments

Presentation Transcript

ASSEMBLY LANGUAGE AND MACHINE LANGUAGE:

ASSEMBLY LANGUAGE AND MACHINE LANGUAGE

ASSEMBLY LANGUAGE:

ASSEMBLY LANGUAGE A program written in assembly language consists of a series of mnemonic statements andmeta -statements (known variously as directives, pseudo-instructions and pseudo-ops),comments and data . Assembly language is the most basic programming language available for any processor. With assembly language, a programmer works only with operations implemented directly on the physical CPU. Assembly language lacks high-level conveniences such as variables and functions, and it is not portable between various families of processors. assembly language is the most powerful computer programming language available, and it gives programmers the insight required to write effective code in high-level languages. Learning assembly language is well worth the time and effort of every serious programmer .

LANGUAGE DESIGN :

LANGUAGE DESIGN There is a large degree of diversity in the way the authors of assemblers categorize statements and in the nomenclature that they use. In particular, some describe anything other than a machine mnemonic or extended mnemonic as a pseudo-operation (pseudo-op). A typical assembly language consists of 3 types of instruction statements that are used to define program operations: Opcode mnemonics Data sections Assembly directives Instructions (statements) in assembly language are generally very simple,unlikethose in high-level language Generally, a mnemonic is a symbolic name for a single executable machine language instruction (an opcode ), and there is at least one opcode mnemonic defined for each machine language instruction. Extended mnemonics are often used to support specialized uses of instructions, often for purposes not obvious from the instruction name.

ASSEMBLY DIRECTIVES :

ASSEMBLY DIRECTIVES Assembly directives, also called pseudo opcodes , pseudo-operations or pseudo-ops, are instructions that are executed by an assembler at assembly time, not by a CPU at run time. There are instructions used to define data elements to hold data and variables. They define the type of data, the length and the alignment of data. program dependent on parameters input by a programmer, so that one program can be assembled different ways, perhaps for different applications.

MACROS :

MACROS Many assemblers support predefined macros, and others support programmer-defined (and repeatedly re-definable) macros involving sequences of text lines in which variables and constants are embedded . macros can have 'short' names but expand to several or indeed many lines of code, they can be used to make assembly language programs appear to be far shorter, requiring fewer lines of source code, as with higher level languages . Many assemblers have built-in (or predefined) macros for system calls and other special code sequences, such as the generation and storage of data realized through advanced bitwise and boolean operations used in gaming, software security, data management, and cryptography.

APPLICATIONS OF ASSEMBLY LANGUAGE:

APPLICATIONS OF ASSEMBLY LANGUAGE Computation Data Transfer Sequencing Copies information, either within one storage class or from one storage class to another. Examples: A move instruction that copies the contents of one register to another; a read instruction that copies information from a disc to main storage

MACHINE LANGUAGE:

MACHINE LANGUAGE A machine language can be viewed as an agreed-upon formalism, designed to manipulate a memory using a processor and a set of registers . A machine language is an agreed-upon formalism, designed to code low-level programs as seriesof machine instructions. Using these instructions, the programmer can command the processor toperform arithmetic and logic operations, fetch and store values from and to the memory, movevalues from one register to another, test Boolean conditions, and so on. As opposed to high levellanguages , whose basic design goals are generality and power of expression, the goal of machinelanguage’s design is direct execution in, and total control of, a given hardware platform.

COMMANDS IN MACHINE LANGUAGE :

COMMANDS IN MACHINE LANGUAGE Arithmetic and logic commands: Every computer is required to perform basic arithmetic operations like addition and subtraction as well as basic Boolean operations like bit-wise negation, bit shifting, Memory Access commands : Memory access commands fall into two categories. First, as wehave just seen, in some cases arithmetic and logical commands are allowed to operate on selected memory locations . Direct addressing : The most common way to address the memory is to express a specificaddress or use a symbol that refers to a specific address

APPLICATIONS OF MACHINE LANGUAGE:

APPLICATIONS OF MACHINE LANGUAGE Some embedded systems -- which have very limited resources such as memory and CPU -- often cannot support the resource requirements of a high-level language. Not so much these days, but historically, these devices would require you to write the programs in assembly code. Also, hard real-time systems need fastest possible execution -- that's assembly language. The main use of Assembly Language is for direct hardware manipulation ie device drivers. AL is also used when speed and reliability are the over riding factor like small footprint realtime operating systems.

PRESENT BY RAVIRAJ COIMBATORE:

PRESENT BY RAVIRAJ COIMBATORE