Micro Process Lab 1
Micro Process Lab 1
Abstract:
Main purpose of this experiment was study about emulator EMU8086 and microprocessor
8086.Four codes are implemented with EMU8086 to study its operation. After that it was
complied with MASM software. MASM converts source code to object code. The object code
was introduced to the microprocessor 8086 using MTS-86C.
Introduction:
Equipments:
2. EMU8086
Precautions:
1. Programs:
The following codes were written down in source code and the MASM software compiled and
gave an output of object code:
MOV CX,AX
0006 8B C8
MOV AX, BX
0008 8B C3
MOV BX,CX
000A 8B D9
HLT
000C F4
CODE ENDS
000D
END
P2: Here ,AX=1234H; BX=5678H
MOV AX,1234H
0000 B8 1234
MOV BX,5678H
0003 BB 5678
HLT
000CF4
CODE ENDS
000D
END
P3: Here ,BX=1234H ; CX=5678H ; BX=(1234+5678)H=68ACH
Source Code
Object code
CODE SEGMENT
0000
ASSUME CS:CODE,
DS:CODE
MOV BX,1234H
0000 BB 1234
MOV CX, 5678H
0003 B9 5678
ADD BX,CX
0006 03 D9
HLT
000E F4
CODE ENDS
END
P4: Here ,BX=1234H ; CX=5678H ; CX=(5678-1234)H=4444H
MOV BX,1234H
0000 BB 1234
MOV CX, 5678H
0003 B9 5678
SUB CX,BX
0006 2B CB
HLT
000E F4
CODE ENDS
000F
END
P5: Print “Hello World” in assembly.
3. For a memory location with physical address 1256Ah, Calculate the address in
segment offset from for segments 1256Ah and 1240h.
Ans: Let X be the offset in segment 1256h and Y the offset in segment 1240h. We have:
000Ah
016Ah 1256h
1240h
4. What are the different data addressing modes available in 8086? Briefly explain
each of them with examples.
1. Register mode – In this type of addressing mode both the operands are registers.
XOR AX, DX
ADD AL, BL
2. Immediate mode – In this type of addressing mode the source operand is a 8 bit or 16 bit
data. Destination operand can never be immediate data.
MOV CL, 0A
ADD AL, 45
MOV CS, AX
3. Register indirect mode – In this addressing mode the effective address is in SI, DI or BX.
4. Displacement or direct mode – In this type of addressing mode the effective address is
directly given in the instruction as displacement.
5. Based indexed mode – In this the effective address is sum of base register and index
register.
Base register: BX, BP Index register: SI, DI
6. Indexed mode – In this type of addressing mode the effective address is sum of index
register and displacement.
7. Based mode – In this the effective address is the sum of base register and displacement.
8. Based indexed displacement mode – In this type of addressing mode the effective address
is the sum of index register, base register and displacement.
All codes are written in microprocessor 8086 and MTS-86C and we got the same results.