Social Sciences, asked by alok3558, 1 year ago

What is the difference between assembly language instruction and assembler directive?

Answers

Answered by RaviKumarNaharwal
6
Assembler instruction generates machine code, thus contributes towards the size of the program .e.g for OS/370 assembler, MVC instruction generates machine code and takes 6 bytes.
MVC A,B  ( Opcode Length Base Disp Base Disp)
Assembler directive does not create any machine code,thus does not contribute to program size.It directs the assembler to perform certain actions during assembly phase.
It indicate  how  an  operand  is  treated  by  the  assembler  and  how  assembler  handles  the program. It  also  directs  the  assembler  how  program  and  data  should  be  arranged  in  the memory.e,g 
USING is directive which tells about the base register to be used from a particular location or for a particular DSECT.No Machine code is generated and thus directive does not contribute to program size.
Similarly, EQU directive tells to replace the symbol used in EQUATE with the value mentioned in EQU. Again it does not take any memory.(similar to #define in C)
Answered by ItzDazzingBoy
5

Answer:

Assembler instruction generates machine code, thus contributes towards the size of the program .Assembler directive does not create any machine code,thus does not contribute to program size.It directs the assembler to perform certain actions during assembly phase.

Similar questions