Assembly Language Lab 5 Compress
Assembly Language Lab 5 Compress
MOV AL,5H
MOV BL,10H
MUL BL ; CF=0
Example 1
• Program to multiply two 8 bit numbers.
DIV/IDIV Instructions
• The division operation generates two elements - a quotient and a remainder.
• The DIV instruction is used or unsigned data and the IDIV is used or signed
data.
DIV/IDIV Instructions (Example)
• Divide 8003h by 100h, using 16-bit operands:
SS
ESP stack
segment
memory
Example 3
• Program to swap the content of AX and BX.
Procedures
• The procedure start with the name of the procedure followed by PROC
(reserved word), at the end of procedure write RET, also the procedure
name followed with ENDP.
name PROC
.
.
RET
name ENDP