Assembler Directives
Assembler Directives
Assembler Directives
)
ASSUME DB DD DQ DT DW Defined Byte. Defined Double Word Defined Quad Word Define Ten Bytes Define Word
M. Krishna Kumar
MAM/M2/LU6/V1/2004
M. Krishna Kumar
MAM/M2/LU6/V1/2004
M. Krishna Kumar
MAM/M2/LU6/V1/2004
M. Krishna Kumar
MAM/M2/LU6/V1/2004
M. Krishna Kumar
MAM/M2/LU6/V1/2004
M. Krishna Kumar
MAM/M2/LU6/V1/2004
M. Krishna Kumar
MAM/M2/LU6/V1/2004
EQU This EQU directive is used to give a name to some value or to a symbol. Each time the assembler finds the name in the program, it will replace the name with the value or symbol you given to that name. Example: FACTOR EQU 03H ; you has to write this statement at the starting of your program and later in the program you can use this as follows ADD AL, FACTOR ; When it codes this instruction the assembler will code it as ADDAL, 03H ;The advantage of using EQU in this manner is, if FACTOR is used many no of times in a program and you want to change the value, all you had to do is change the EQU statement at beginning, it will changes the rest of all.
M. Krishna Kumar MAM/M2/LU6/V1/2004 8
M. Krishna Kumar
MAM/M2/LU6/V1/2004
M. Krishna Kumar
MAM/M2/LU6/V1/2004
10
Originate
M. Krishna Kumar
MAM/M2/LU6/V1/2004
11
M. Krishna Kumar
MAM/M2/LU6/V1/2004
12
M. Krishna Kumar
MAM/M2/LU6/V1/2004
13
M. Krishna Kumar
MAM/M2/LU6/V1/2004
14
M. Krishna Kumar
MAM/M2/LU6/V1/2004
15
M. Krishna Kumar
MAM/M2/LU6/V1/2004
16
Assembler Directives
TYPE TYPE operator instructs the assembler to determine the type of a variable and determines the number of bytes specified to that variable. Example: Byte type variable assembler will give a value 1 Word type variable assembler will give a value 2 Double word type variable assembler will give a value 4 ADD BX, TYPE WORD_ ARRAY ; hear we want to increment BX to point to next word in an array of words.
M. Krishna Kumar
MAM/M2/LU6/V1/2004
17
M. Krishna Kumar
MAM/M2/LU6/V1/2004
18