You are on page 1of 17

CSE2006 MICROPROCESSOR & INTERFACING

ELA: CLASS - 1
Introduction to 8086

 40-pin DIP, 5V supply


 29,000 transistors
 20 bit address to access memory
 (memory space = 220 = 1MB)
8086 Architecture
8086 - Registers
 “General Purpose” & “Special Purpose”
 16 bit registers
 GP Registers:
 Can be used as 8 bit or 16 bit
 Used for holding data, variables, and intermediate results temporarily
 SP Registers:
 Used as segment registers, pointers, index registers or as offset storage registers for
some addressing modes
Register Groups

 General data registers


 Segment registers
 Pointers & index registers
 Flag registers
General Data Registers
 X, H, L ?
 AX - Accumulator
 CX – Default counter in string and loop
operations
 BX – Offset storage for forming physical
address
 DX – Implicit operand/ destination in few
instructions
Segment Registers
 8086 addresses segmented memory
 Total 1MB is divided into 16 logical segments; each
segment having 64KB memory
 4 segment registers
 CS – used for addressing a memory location in the code
segment of the memory
 DS – points to the data segment of the memory
 ES – Another data segment
 SS – used to address stack segment, memory to store
stack data
Why assembly language?

 Assemble language is a low-level programming language.


 Assembly language makes it possible to manipulate hardware directly, address
critical issues concerning performance and also provide access to special
instructions for processors.
 Uses of assembly language include coding device drivers, real-time systems, low-
level embedded systems, boot codes, reverse engineering and more.
 Assembly language has Complete control over a system’s resources
Required Tools

 DOS Box
 MASM611 (Microsoft Macro Assembler)
MASM Advantages

 MASM contains a macro language that has features such as looping, arithmetic,
and text string processing.
 MASM also gives you greater control over the hardware because it supports the
instruction sets of the 386, 486, and Pentium processors.
 By using MASM, you also can reduce time and memory overhead.
Step by Step Procedure to do experiment (1)
(1) Open DOSBox
Step by Step Procedure to do experiment (2)
(2) Type the following in the command prompt

 mount c c:\masm611
 c:
 cd bin
 edit <filename>.asm
Step by Step Procedure to do experiment (3)

(3) Type the code and save the file (remember to

save it with .asm extension)


Step by Step Procedure to do experiment (4)

(4) Type the following in the command prompt to run and


execute the file

 masm <filename>.asm
 link <filename>.obj (Press ‘enter’ key 4 times)
 debug <filename>.exe
Step by Step Procedure to do experiment (5)
(5) Type ‘u’ to generate the unassembled code

(6) Type ‘g’ followed by address of the HLT instruction to get the output
Step by Step Procedure to do experiment (6)
(7) To check the results that are stored in respective registers, just look the screen to find out all the
registers’ contents, after typing ‘g’

(6) Typing ‘t’ after typing ‘debug’ would give you line by line execution and its corresponding output.
Procedure to maintain lab record

 Have a separate 80 pages notebook (With your name & reg.no. written)
 Write the date of experiment, aim and code in the book (on the RHS)
 Name your program files with your team no. followed by
the experiment title
 Get the output verification signature from research scholars/ lab technician/ faculty
members (Mandatory for each experiment)
 Take a snapshot of your code, print and paste it in your notebook
 Get the record signed by the faculty member during the very next lab class (Marks will
be reduced for Late submissions)
 Maintain a proper index and ensure mark entry in it!

You might also like