COMP 231 Microprocessor and Assembly Language
COMP 231 Microprocessor and Assembly Language
[email protected]
Course description
• General study of both hardware and software
included in the microcomputer systems.
• Intel 8085/8086/8088, and its associated
supporting devices and software.
• Assembly programming language.
Objectives
• Introduction to different types of
microprocessors and their applications.
• Different hardware/software that is supported
by microprocessors.
• Assembly language programming and their
applications.
Internal evaluation
• First Internal: 10
• Second Internal: 10
• MCQ: 10
• Assignment: 15
• Mini Project: 5
Total: 50 marks
Your responsibilities
• Understand the lecture slides and do
assignments
• Uphold academic honesty in completing your
assignments, projects, and exams.
• Plagiarism, cheating, and other forms of
academic dishonesty will not be tolerated.
• Class discipline
• Mobile Switch OFF
• No written assignment solutions or reports
will be accepted late (extreme emergencies
will be dealt with on a case by case basis).
• Attendance
Text book
1. John Uffenbeck, The 80x86 Family design,
programming and Interfacing.
2. Microprocessor Architecture, Programming,
and Application with the 8085- Ramesh
Gaonkar.
3. Microprocessor Systems: The 8086/8088
Family architecture, Programming, and Design -
Yu-cheng Liu, Glenn A. Gibson.
Syllabus
Chapter 1: Introduction and history of
Microprocessors, Basic block diagram of a
microcomputer, Stored program computer (Von
Neumann Architecture) and related
terminologies, Bus system architecture.
Chapter 2: Introduction of 8085 microprocessor
and its Functional Block Diagram and pin
configuration, 8085 Programming Model.
Timing and control unit, Registers, data and
Address Bus, Instructions, operation code and
operands, Addressing Modes, Interrupts.
Chapter 3: 8086/8088 CPU architecture &
operation, Programming model, Pins & signals,
Memory segmentation, Processor bus cycle
(Timing diagram),
Assembly instruction format Instruction types,
simple sequence programs.
Chapter 4: Stacks and sub Routines
Instruction Cycle, Fetch Operation and
timing diagram Execution Operation and timing
Diagram, Machine cycle and states.
Chapter 5: Operating modes. Support chips for
8086/8088 : 8288 bus controller, 8284 clock
generator, Latches 8282, Bus transceiver 8286 of
Connections, Instruction set & programming,
Basic I/O and Memory R/W, Addressing Modes.
Chapter 6: Interrupt types, Interrupt processing
sequence, Interrupt controller 8259.
Chapter 7: Communication Interfaces (serial and
Parallel 8254 programmable interval timer.
Chapter 8: DMA operation, DMA controller
Mini Project
• Form groups of six people and choose any one of the
Following tasks as a mini-project for the course.
• No more than two groups may work on the same task.
Each group is supposed to develop a visual
demonstration of the solution.
• The submission of the Project would include a report
containing the codes of the implementation,
documentation on the code, Relevant screenshots of the
demo application.
.
Mini Project Task
1. Store the data byte 32H into memory location
4000H.
2. Write a program to shift an eight bit data four
bits right. Assume data is in register C.
3. Add the contents of memory locations
4000H and 4001H and place the result in
memory location 4002H. Also write program
description.
4. Find the square of the given numbers from
memory location 6800H and store the result from
memory location 8000H.
5. Search the given byte in the list of 50 numbers
stored in the consecutive memory locations and
store the address of memory location in the
memory locations 2800H and 2801H. Assume
byte is in the C register and starting address of
the list is 2500H. If byte is not found store 00 at
2800H and 2801H.
6. Write an assembly language program to
separate even numbers from the given list of
50 numbers and store them in the another list
starting from 2200H. Assume starting address
of 50 number list is 2100H.
7. Write a program to shift a 16 bit data, 1 bit
right. Assume that data is in BC register pair.
8. Write a program to find smallest of two 8-bit
numbers.
9. Write a program to subtract two 16 bit
numbers with Borrow.
10. Write a program to add Two 16 bit numbers
with carry.
• Mini-Project selection deadline: April 25, 2019
• Mini-Project submission deadline: July 10,
2019
Introduction and history of
Microprocessors
Development of computer
• Computer is the most efficient and versatile
electronic machine is a development of a
calculator.
• The development & enhancement in the
calculator leads to the development of
computer.
• First mechanical computer named ‘Difference
engine’ and ‘Analytical engine’.
• The ‘Difference engine’ could perform the
arithmetic operations like add & subtract.
• But it could run only single algorithm and
output system was incompatible.
• The ‘Analytical engine’ provided more
advanced features.
• Four components:
1. The store (memory)
2. The mill (Computation unit)
3. Input Section
4. Output Section
• Store: hold the variables and results.
• Mill: accepts operands from the store, add,
subtract, multiply or divide and return a result
back to the store.
- Reads the instruction and data
- Fetches the data from the store
- Write the data to punched card
First Gen (1940-56)
• Vacuum tubes
• First general purpose electronic digital
computer was Electronic Numerical Integrator
and Calculator (ENIAC).
• Enormous in size and consumed very high
power.
• Faster than mechanical computer
• ENIAC was a decimal machine
• Memory consisted of 20 ‘accumulator’ each
capable of holding 10 digit decimal numbers.
• Programmed manually
Second Gen (1956-63) Transistors
• Transistors replaced Vacuum tubes
• Smaller, faster, cheaper, energy efficient and
reliable computers.
• But generated more heat
• Moved from binary machine to symbolic or
assembly language.
• Fortran COBOL were also being developed.
Third Gen (1964-71)
• Development of integrated circuit (IC)
• Transistors were placed on silicon chips.
• Drastically increased the speed and efficiency.
• Users interacts with keyboards and monitors
with user interactive OS.
Fourth Gen (1971-present)
• Microprocessor (µP or MP) was developed
• Thousand of IC on a single silicon chips.
• Intel 4004 was first 4 bit µP (1971).
• Intel 4004 was followed by 8-bit µP 8008 (1972)
• 8080 was introduced. 8-bit µP (1973)
• Motorola introduced the 8-bit 6800 processor
(1974)
• Intel developed 8085, 8086, 80186, 80286,
80386, 80486 and Pentium
• Motorola produced 6802, 68000, etc.
• Home user computer in 1981 by IBM µP.
Apple introduced Macintosh in 1984.
Fifth Gen (present onwards)
• Will be based on AI, in development phase.
• Voice recognition developed already.
• Parallel processing grid computing are in
practice today.
• Will be used on Quantum computation,
molecular and nano technology, natural
language processing.
Calculator
❑ Advantages:
✓ Faster as compared to programs written using high-level languages
✓ Efficient memory usage
✓ Control down to bit level
❑ Disadvantages:
Need to know detail hardware implementation
Not portable
Slow to development and difficult to debug
Label
Instruction Format
❑ General Format of Instructions
— Specifies the segment register (segment Register) that will be used to calculate the effective
addresses for all labels and variables defined under a given segment or group name (segment Name).
library
Assembler Linker
Source files
Syntax check OBJ
Translate source files
files into
machine code Executable
OBJ files
files
❑ Assemblers
➢ Microsoft ML, LINK, & DEBUG
➢ 8086 Emulator
➢ A86
➢ MASM32 package
➢ •••••••
Microsoft MASM and Debug
❑ Microsoft MASM and Link Programs
Syntax check;
ML /c /Fl numoff.asm Translate assembly instructions into machine codes
7-61
Difference Between EXE and Binary Files
❑ EXE file
❑ Binary file