Professional Documents
Culture Documents
Assembler Directvs PDF
Assembler Directvs PDF
M. Krishna Kumar
ASSUME
DB
DD
DQ
DT
DW
Defined Byte.
Defined Double Word
Defined Quad Word
Define Ten Bytes
Define Word
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
END
ENDP
ENDS
EQU
EVEN
EXTRN
M. Krishna Kumar
End Program
End Procedure
End Segment
Equate
Align on Even Memory Address
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
M. Krishna Kumar
MAM/M2/LU6/V1/2004
M. Krishna Kumar
MAM/M2/LU6/V1/2004
10
GROUP LABLE
NAME
OFFSET
ORG
-
M. Krishna Kumar
Originate
MAM/M2/LU6/V1/2004
11
M. Krishna Kumar
MAM/M2/LU6/V1/2004
12
M. Krishna Kumar
PROC
PTR
PUBLC
SEGMENT
SHORT
TYPE
Procedure
Pointer
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
AH
AH
AH
AH
AH
AH
INT
M. Krishna Kumar
00H
01H
02H
08H
09H
0AH
21H
: Terminate a Program
: Read the Keyboard
: Write to a Standard Output Device
: Read a Standard Input without Echo
: Display a Character String
: Buffered keyboard Input
: Call DOS Function
MAM/M2/LU6/V1/2004
18