0% found this document useful (0 votes)
67 views

Exercise-0 Intro-Lab

This document provides information about microprocessors and microcontrollers. It discusses that a microprocessor is an integrated circuit that incorporates the core functions of a computer's CPU. It then provides details about the 8086 microprocessor including its features, pin diagram, architecture, and manufacturers. It also discusses microcontroller differences compared to microprocessors. Finally, it gives an example of assembly language code to print "Hello World" and steps to execute assembly language programs.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Exercise-0 Intro-Lab

This document provides information about microprocessors and microcontrollers. It discusses that a microprocessor is an integrated circuit that incorporates the core functions of a computer's CPU. It then provides details about the 8086 microprocessor including its features, pin diagram, architecture, and manufacturers. It also discusses microcontroller differences compared to microprocessors. Finally, it gives an example of assembly language code to print "Hello World" and steps to execute assembly language programs.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

PRESIDENCY UNIVERISTY, BENGALURU

School of Engineering

Department of Computer Science & Engineering

Microprocessors and Microcontroller Lab


CSE 254

IV Semester 2019-20
MICROPROCESSOR

• A microprocessor is an integrated circuit (IC) which


incorporates core functions of a computer’s central
processing unit (CPU).
• It is a programmable multipurpose silicon chip, clock
driven, register based, accepts binary data as input and
provides output after processing it as per the
instructions stored in the memory.
8086 Microprocessor features

• Single +5V power supply


• Clock speed range of 5-10MHz
• capable of executing about 0.33 MIPS (Millions instructions
per second)
• 8086 microprocessor is a 40 pin IC.
• It is 16-bit processor having 16-bit ALU, 16-bit registers,
internal data bus, and 16-bit external data bus resulting in
faster processing.
• It uses two stages of pipelining, i.e. Fetch Stage and Execute
Stage, which improves performance.
• Fetch stage can pre-fetch up to 6 bytes of instructions and
stores them in the queue.
• It has 256 interrupts.
8086 PIN DIAGRAM
8086 Architecture
Processor Manufacturers/Designers
• Intel
• AMD
• Qualcomm
• NVIDIA
• IBM
• Samsung
• Motorola
• Hewlett-Packard (hp)
• Dell
• Acer
• VIA
• Marvell
• Global Foundries
• Media Tek
Microprocessor Programming
• Microprocessor programming languages can typically be divided into
three main types:
o machine language
o assembly language
o high-level language
• Microprocessors are typically programmed using semi-English-
language statements (assembly language)
• An assembly language is a low-level programming language for
microprocessors and other programmable devices. It is not just a
single language, but rather a group of languages. An assembly language
implements a symbolic representation of the machine code needed to
program a given CPU architecture.
• Assembly language is also known as assembly code.
• An assembly language is the most basic programming language
available for any processor. With assembly language, a programmer
works only with operations that are implemented directly on the
physical CPU.
Assembler

• An assembler is a program that converts assembly language


into machine code. It takes the basic commands and
operations from assembly code and converts them into binary
code that can be recognized by a specific type of processor.

Assembler Examples:
• Flat Assembler (FASM)
• GNU Assembler (GAS)
• High Level Assembly (HLA)
• Microsoft Macro Assembler (MASM)
• Netwide Assembler (NASM)
• Turbo Assembler (TASM)
• Open Watcom Assembler (WASM)
Microcontroller
Microprocessor vs Microcontroller

Microprocessor Microcontroller
CPU is stand alone, RAM, ROM, CPU, RAM, ROM, I/O & Timer all
I/O & Timer are separate are on the chip
Designer can decide amount of Fixed amount of On-Chip RAM,
RAM, ROM & I/O Ports ROM & I/O Ports

High Processing Power Low Processing Power

High Power Consumption Low Power Consumption

Typically 32 / 64 bit Typically 8 / 16 bit

General purpose Single purpose (Control Oriented)

Less Reliable Highly Reliable

Ex: 8085, 8086 Ex: 8031, 8051


Print “ HELLO WORLD” Message
.model small ;defines the memory model to be used for the ALP

.data ;data segment begins here

msg db 10d,13d,"Hello World$“ ;String Hello World gets stored in msg

.code ;code segment begins here

mov ax,@data ;moving base address of data to ax

mov ds,ax ;moving contents of ax into ds

;data section now gets initialized

lea dx,msg ;load the offset address of msg

mov ah,09h ;to display contents at dx

int 21h ;call the kernel

mov ah,4ch ;to terminate the program

int 21h ;call the kernel

End ;end of program


Steps to Execute Assembly Language programs
1) Install DOSBOX 0.74

2) Launch DOSBOX, By default it will be in Z drive <Z:\>


3) Change the drive to that, in which MASM is installed
mount c c:\
4) C:
5) C:\> cd masm
6) C:\:masm> Edit filename.asm
7) C:\:masm> Masm filename.asm;
8) C:\:masm> Link filename.obj;
9) C:\:masm> CV filename.exe
THANK YOU

You might also like