Académique Documents
Professionnel Documents
Culture Documents
217021
14.10.2015
Week2 Lab2
Lab Report
Introduction:
In this experiment, we will conduct unsigned multiplication in assembly language with
different size data in registers and we will pursuit changes in registers. We will see what
happens when data is over flowed to register size after multiplication.
Observation should be like below;
byte X byte will use only AX register to write result.
byte X word will use both AX and DX register to write result.
word X word will use both AX and DX register to write result.
Equipment:
emu8086 software program.
Body (Code & Explanation):
DTSEG SEGMENT
DATA1 DB 230 ;Define byte1
DATA2 DB 100 ;Define byte2
RESULT1 DW ?
RESULT2 DW ?
RESULT3 DW ?
DTSEG ENDS
SUB AX,AX
MOV AL,DATA1 ;
MOV BL,DATA2 ;
MUL BL
MOV RESULT1,AX
SUB AH,AH
14.10.2015
MOV RESULT2,AX ;
Move AX to RESULT2
MOV [RESULT2]+2,DX;
MOV CX,[RESULT2]+2 ;
to check result at DX
DATA4 DW 300 ;
Define word1
MOV AX,DATA3 ;
MOV RESULT3,AX;
Move Result3 AX
MOV [RESULT3]+2,DX ;
Results:
Byte X Byte
AL=DATA1=E6H
BL=DATA2=64H
Result:
AH=59H, AL=D8H
Word X Byte
AL=DATA1=E6H
DATA3=270EH
*AH is cleared before multiplication
Result:
14.10.2015