Professional Documents
Culture Documents
Organization of The IBM PC Assembly Language
Organization of The IBM PC Assembly Language
Organization of The IBM PC Assembly Language
Assembly Language
Lecture#09
Few Basic Instruction
MOV INSTRUCTION
The instruction used to move an operand from one
location to another one is MOV. It can be used to
address general purpose register or to address
memory locations. Its format is:
Mov D, S
Mov ax,15 ;put 15 into ax
Mov ax, bx ;put the content of bx into ax
XCHG Instruction
The XCHG (exchange) operation is used to
exchange the contents of two registers, or a register
& a memory location. The syntax is
SUB Instruction
This instruction is used to subtract the contents of two
registers. The syntax is
SUB AX,BX
INC, DEC Instruction
Increment is used to add 1 to the contents of a
register or memory location & DEC subtract 1 from
a register or memory location. The syntax is:
INC destination
DEC destination
Example:
INC WORD1 ;add 1 to the contents of WORD1
Example:
LEA DX, MSG
;Put the offset address of the variable MSG into
DX
.MODEL SMALL
.STACK 300
.DATA
MESSAGE DB "HELLO WORLD!","$"
.CODE
MAIN PROC
MOV AX, @DATA
MOV DS,AX
MOV AH,09
LEA DX,MESSAGE
INT 21H
MAIN ENDP
END MAIN