Assembler
Assembler:- Assembler is a program that converts assembly language program into
machine language.Thus input to an assembler is a program written in assembly language
and the output of program is machine language.
Assembly language:-Assembly language is low level programming language and machine
dependent. It makes use of symbols and mnemonic to represent instructions and address
because of this reason assembly language is also known as symbolic language.
Assembly language statements:-
- Imperative statements
3. Assembler directives
Imperative statements:- An imperative statement indicates that what action to be performed
during the execution of assembly language program . Examples of imperative statements
are MOVER , MOVEM , ADD , SUB , MULT etc .
Declarative statements:- Declarative statements are used to declare a storage space or
declare a constant or variable . There are two declarative statements : DC and DS
DS : - DS stands for declare storage . It reserves blocks of memory.
Syntax : [ label ] DS < constant >
Eample :- A DS 1 , This statement reserves the memory area of one word and attaches
name A with it.
Example :- A DS 100 , this statement reserves memory block of 100 memory words and
name A is associated with first word of the block .
DC : - DC stands for declare constant . It constructs the memry block containing constants.
Syntax : [ label ] DC <value>
Example :- Two DC ' 2' , This statement constructs a memory words containing value 2
and associates the name Two with it .
Assembler directives :- Assembler directives direct or instruct the assembler to perform
a particular action during the assembly of the program.
Note : No memory space is reserved for any assembler directives during the processing of
assembler directives.
List of assemler directives :-
1. START
2. END
3. ORIGIN
4. EQU
5. LTORG
6. USING
7. DROP
8. BALR
No comments:
Post a Comment