You are on page 1of 12

emu8086

Eng.Ghada Al-hamdo
:

8bit
0030h , 0031h
0100h
]Mov Al,[0030H
]Add Al,[0031H
Mov [0100H],Al
HLT

2
:
16bit
,
0200h , 0202h
. 0204h
]Mov AX,[0200H
]Add AX,[0202H
Mov [0204H],AX
HLT

3
:
16bit
20300h ,
20500h
Mov Ax,2000h
Mov Ds,Ax
]Mov AX,[0500H
]Add AX,[0300H
HLT

4

AL= 35H BL= 39H

:
MOV AL ,35H
MOV BL ,39H
ADD AL,BL
AAA
HLT

[2f018h]=0400h DS=2f00h SI=0018h
[SI] 03f8h
:
MOV SI, 0018H
MOV AX,2F00H
MOV DS ,AX
MOV [SI],0400H
SUB [SI],03F8H
HLT

5
0200H 0205H
0300H
.loop label
MOV BX,0300H
MOV SI,0200H
MOV DI,0205H
MOV CX,0005H
CLC
] NEXT: MOV AL,[ SI
ADC AL,[ DI]
MOV [BX],AL
INC SI
INC DI
INC BX
LOOP NEXT
HLT
MUL

Mul Source
Source
2

:
.1 Source
. AX
.2 Source 2
DX:AX
.3 Flags 0 CF,OF

, 9
MUL
when operand is a byte:
AX = AL * operand.
when operand is a word:
(DX AX) = AX * operand.
Example: MOV AL, C8h; (200)
MOV BL, 04h
MUL BL ; AX = 0320h (800)
CF=OF=0 when high section of the result is
zero.

10
IMul
.
IMul Source
when operand is a byte:
AX = AL * Source.
when operand is a word:
(DX AX) = AX * Source.
Example: MOV AL, -2
MOV BL, -4
IMUL BL ; AX = 8
.
11
1

, 16bit 300h
, 302h
]mov Bx,[300H . 310h
]Mov Ax,[302H
Mul Bx
Mov [310H],Ax
Mov [312H],DX
Hlt

You might also like