MPMC Aakash
MPMC Aakash
EXAMINATION
SIXTH SEMESTER [FEB. 2016]
(B.TECH]
MICROPROCESSOR AND
Time: 14 hrs.
MICROcONTROLLER (ETEE-310]
Note: Attempt Q. No. 1 1which is M.M.:30
91 Attempt any five. compulsory and any two more questions
from remaining.
Q.1Attempt any five:
Q.1. (a) State the priority of execution of (5x2)
signals. HOLD, RESET and INTERRUPT
Ans. Priority of execution are:
1 HOLD
2. INTERRUPT
3. RESET
Q.1. 6) Write a set of instructions to transfer
8085 microprocessor. logic 1 from the SOD line of
Ans. MVI A, OCOH
SIM
HLT
Q.1. (c) How much time is taken by the
microprocesser 8085 to
conditional CALL Instruction of 8085
microprocessor if condition is execute
Assume Microprocessor is running at 2MHZ? not true?
Ans. CALL instruction-9/18 T states
T-1/P-05microsee
Time is taken by the microprocessor 8085=0.5*9 => 4.5 microsec
Q1. (d) State the function of TEST and LOCK signals of the 8086
microprocessor.
Ans.1 (d) Refer Q.9. (c) of End Term Exam 2016.(Page No. 48-2016)
Q1 e) Exrplain the LOOP instruction of microporcessor 8086 with suitable
ezamples.
Ans.
LOOP label Decrease CK. jump to label if CX not zero
Algorithm:
CX-CX-1
ifCX-Othen
junp
else
nojump, continue LP
Example:
University-(B Tech)-AB Publisher 2016-3
9.2.(e) Write and explain a soflware
delay routine for 8085. (4)
include 'emu8086.inc Ans. To know how many T-States an
a T-State is one clock instruetion requires, and keeping in mind that
#make_COM# cycle long, we can caleulate the time
using the following formula:
Delay No. of T-States / Frequeney
ORG 100h
Example: If the speed of your microprocessor is 2 MHa then
MOV CX, 5 uses 7 T-States. Therefore the for a "MVIT instruction
instruction would require 3.5 u Seconds
label1: Now we can use a loop to produce a to complete
certain amount of tima delay
PRINTN T0op! See an example of a delay loop: in aprogram
LOOP labell MVI C, FFH 7 T-States
RET LOOP: DCRC 4 T-States
Q1. What are Logical and JNZ LOOP 10 T-States
Physical addresses? lHow the physical
are generated?
addrese
esses Here the first instruction
see
initializes the loop counter and is
Ans. Logical address is
contained in the 16 bit IP, BP, SP, BX, SI or requiring only 7 T-States. executed only once
known as the offset address or DI. It is als.
the effective address. also The following two instructions which is
The base inaide a loop that requires 14
segment address is contained in one of the 16 bit execute and is repeated 255 times until C becomes 0 T-States to
registers cS, DS, ES, SS. contents of the
segmentat We need to keep in mind though that in the last rotation of the
The physical address or the real address instruction will not loop, JNZ
jump to the address and so it requires only 7 TStates
the
base is formed by combining the offset
segment addresses. This address is 20 bit and rather than
the memory. is primarily used for the and the 10.
accessing of .Therefore, we must deduet 3 T-States from the total delay
get an
Physical Address Base delay calculation.
to
accurate
Q1. (g)Which among the Address *10OH + Logical Address.
To calculate the delay, we use the following formula:
and why?
MOVAX, [1000H] and following two instructions will be
Ans. Both instruction will MOVAX, [1001H]. executed faster TaiayTo.T
take
9.2. (a) Write a program for equal
time for Taeiaytotal delay: To= delay outside the loop; T= delay of the loop
8085 to generate
execution.
Ans. MVID, fibonacci series. Now using these formulas, we can caleulate the time delay for the above mention
COUNT; (4)
MVI B, 00; Initialize Initialize counter
example:
variable to store To-7TStates Delay ofthe MVI instruction
MVI C, 01; Initialize
variable to store
previous number
T=(14 x 255)-3 = 3567 TStates (14 TStates for the 2 instructions repeated
MOVA, B;: [Add two numbers] current number 255 times)
BACK: ADD C ; [Add two Now your microprocessor speed is 2 MHz. So we know
numbers]
MOVB, C; Current
number
MOV C, A; Save result
is now
previous number T (time for one T state) = VF
as a new current = h x 10 sec
DCRD;Decrement count number
= 5psec
JNZ
BACK;if count 0 go to BACK So now we have 3567 T-state so we will get 3567 x 5 p sec = 1.7835m sec of delay
HLT; Stop.
Q.3. (a) Explain the Align and DUP assembler directives. (2)
9.2 6) Write an intra
y15 address location5. segment direct JUMP instruetion tojump Ans. EVEN directive: This directive is used to Align the word boundary to
ds_segment, then:
JMP NEAR Label
DSsegment SEGMENT:
Shortjump rangel-127 <de 128) Numl db 05h
Long jump range(-32767<de+32768 Word1 dw 1234h
Microcontroller
4-2016 Sixth Semester, Microprocessor and
I.P. University-(B.Tech)-AB Publisher 2016-5
Char db x; Location counter will point to 0004 when assembler reads no
statement.
next 1ORC, IOWC are /O read command and I/O write command signals respectively
These signals enable an 10 interface to read or write the data from or to the addressed
Prices DB5 DUP(?): An array of 5 bytes, after executing this LC will point to 0qu
h port. The MRDC, MWTC are memory read command and memory write command
which is an odd address.
EVEN: increment location counter to 000AH i.e. an even address signals respectively and may be used as memory read and write signals. All these
command signals instruct the memory to accept or send data from or to the bus. For
MyData DW 50 DUP(0): Array of 50 words will start from an even address. both of these write command signals, the advanced signals namely AIOWC and AMWTC
are available. They also serve the same purpose, but are activated one clock cycle
DS-segment ENDS:
earlier than the IOWC and MWTC signals, respectively
DB Defined Byte: DB declares a variable of type byte and reserves one locationin
memory for the variable of type byte. Q.3. (c) Design a microprocesser 8086 system having two 4K x 8 EPROM
and four 8K x 8 RAM. Avoid any foldback address. (4)
Example: num1 DB 15h, Char1 db A'
Ans. A system requires 16kb EPROM and 16kb RAM. Also the system has
numbers db 100 dup(0); Reserve an array of 50 words of memory and initialize All
one number of 8279, one number of 8251 and one number of 8254.
bytes with 00. 2 numbers of 8255,
The 8kb memories require 13 address lines. Hence the address lines A0-A12 are
T TI T T used for selecting the memorylocations,
decoder 74LS138
CLK UUUUL The unused address lines A13, A14 and Al5
are used as input to
to FEFFFH.
space from C000
ADD/DATA
A-AXDataout D-D The RAM is mapped at the end ofmemory
ADS AD interfaced to the system. The chip-select
There are five peripheral IC's to be
AMWCor
AlOWcor
signals for these IC's are given through
another 3-to-8 decoder
74LS138 (/O decoder).
A13
decoder is A11, A12 and
The input to this
MWICor
Towcor and A15 are logically ORed and applied
to low enable
The address lines A13,A14
High of /O decoder.
DT/R
decoder is tied to
10/Mlow) signal of 8085, so that
DEN The logic high enable of I/O
read/write operation.
enabled for I/O
this decoder is
AMN MX Data
buttors
74245
DIR
CSo
T CS ORC
RAIA RD
ROM IFO
RO WR
wR
MRDC MWTC MRDC
iOwc
D-D19
Fig. Maximum Mode 8086
The
significance of the
System.
pin. If IOB is MCE/PDEN* output depends
it acts as grounded, it acts as
master cascade enable to upon the status of the IOB
peripheral data enable used in the
used to issue two
control cascaded 8259A; else
multiple
interrupt acknowledge pulses to the bus
configurations.
INT pin is
interrupting device. interrupt controller or to an
EIRST TE
FIRST TERM EXAMINATION (FEB. 2017]
eg SIXTH SEMESTER [B.TECH]
as MICROP CROPROCESSOR AND MICROCONTROLLER
to
ETEE-310]
Hrs.
M.M.130
ime:
1;
mto
m to No I is compulsory. Attempt anytwo from the remaing
Q.1.AttemptAny five.
1 Dy L)What istransparent latch and why is it necessary to use a lateh with
ernal such as LEDs? (2)
f bittpuAns.devices
wtput Atransparent latch is a storage element. It has an input, an output, and an
is active, the output transparently follows the
When the enable
e
lenes nabl or gate pin.
When the enable becomes inactive, the output freezes.
s o m e small del
delay).
(with
asaput result will
latch is necessary for output devices to return the result otherwise the
m
0.1.(6) The memory address of the last location of a 1K byte memory/chip is
tosappear
(2)
as FBFFH. Specify the starting address.
last location of 1Kbyte = FBFFH
mt Ans. As given
Number of register= 1K= 1*1024
Starting Address =FBFFH-03FFH=> F800H.
RET instruction is requires 4T states to
Q.1.c) Explain why unconditional 6T states for fetch. (2)
by bitch whereas conditional RET instruction requires
from Subroutine Unconditionally
Ans. RET: Return
subroutine to the calling program
Wit The program sequence is transferred from the
described below. The two bytes from the top of
othesed on the specified flag of the PSW as
program execution begins at the
new
usee stack are copied into the program counter, and
dress. RNZ
RET conditionally: RC, RNC, RP, RM, RPE, RPO, RZ,
is transferred to a
Example RC:-(Return if Carryis set) The program sequence
articular level or a 16-bit address if C=1 (or carry is 1)
Unconditional RET requires 4T states to fetch the calling address of the program.
doesn't require to check any condition. address of the
Whereas conditional RET requires 6T states to fetch the calling
fulfill. If condition is not true, it
grain, as it has to be wait till the conditionT-isstates.
ntinuesthe and thus requires fewer
sequence
directives used in 8086.
Q.1.d) Explain ASSUME and OFFSET assembler
(2)
to tell the assembler
Ans. ASSUME Directive The ASSUME directive is used
used for a specified segment. The 8086
at the name of the logical segment should bea Code
segment, a data segment, a stack
rks directly with only 4 physical segments:
ment, and an extra segment.
CS:coDE This tells the assembler that
the logical segment
Example: ASUME
the and should be treated
ed CODE contains the instruction statements for program
a code segment.
instruction which refers to
ASUME DS:DATA : This tells the assembler that for any
segment DATA.
d1n the data segment, data will found in the logical
0 Available
1=Marked
I
M i e r o c o n t r o l l e r
LP. University
Mieroprocessor
and
The
sity-[B.Tech. -AB Publisher 2017-5
MOD 111
instruction.
Semester,
Sixth (BXI, DL (4)
4-2017 code for
the MOV CS:
RM W 0 W-1 RM
Effeetive Address Caleulation
Construct
the binary
AL AX
MOD =00 MOD = 001
MOD 10
9.2.0b) MOV is
100010 000 O00 CBX+(5D
opcode
for
001 CL CX 001 (BX0+(DD (BX0+(SID D, (BXD+(6D+D16
Ans.
Converting Assembly Language 010 DL DX 010 (BP+(SI) BX+DD+D (BX0+(DID+Dis
Code
011 BL BX 011 (BP (DID (BP)+(SID+D, CBP)+(SD-D
Instructionsto Machine 100 AH SP 100 (SI
(BP)+(D) +D, (BP)+{DD+ Ds
REORM
OPCODE OW MOD 101 CH BP 101 (D1)
(SI) D (SD)+D16
110 DH SI 110 Direct Address
(DI)+D (DD D16
1 to 6 bytes 111 BH DI (BP) +
D, (BP)+ D 16
be coded with 111 (BX)
An
instruction can
three k i n d s ofinformation:
such as add,
subtract,
or
move
BX)+D (BX)+ D16
Byte 1
contains
operation Segment override prefix
specifies the Byte 1 Byte 2
field (6 bits) operand code format
Opcode destination
-
D i r e c t i o n Bit (D bit)
2 is
source
or
1
Opcode MOD REG RM
-
Register REG field in byte
operand in 100010DW
Tells the
register
operation
Specified whether the
0:8 bits
Q.2.(c) Explain the difference between LEA and
Ans. The MOV instruction
MOV instruction (2)
1:16 bits
two fields The MOV instruction is the most
Byte 2 has(MOD) - 2 bits important command in the 8086 because it moves
data from one location to another. It also has the widest
- Mode field (REG)-3 bits assembler programmer can use MOV vartety of parameters; so it the
Register field field) - 2
bits operand
understand. effectively, the rest of the. commands are easier to
field (R/M the f i r s t
-
Register/memory
the register for format:
is u s e d to
identify W 1
R E G field
W AX MOV destination,source
REG
AL CX MOV copies the data in the source to the
000 or a word. Sometimes
destination. The data can be either a byte
CL DX this has to be
determine from the operands whether a explicitly
001 stated when the assembler cannot
DL BX byte or word is being referenced.
010 BL The MOV instruction has a few
011 SP limitations:
AH An immediate value
100 BP
ds, 10)
cannot be moved into a segment register directly
(i.e. mov
CH SI
101
DH Segment registers cannot be copied directly Gi.e.
110
BH
DI A memory location cannot be
mov
es, ds)
the second operand copied into another memory location
111 field together specify aNumber, aDigit) i.e. mov
and 3-bit R/M
2-bit MOD field
Explanation CS cannot be copied to (i.e. mov cs,ax)
Code These limitations can be overcome
no displacement follows. using
purpose register as illustrated in the generalindirect
data
Memory mode, movement through a general
format given above.
00 Memory mode-8 bit Each of the possible values for the destination and
01 source is called a n address.
displacement follows The LEA instruction
Memory Mode., 16-bit format:
10 LEA register,.memory
displacement follows
Load Effective Address loads the
Register Mode no displacement specified register with the offset of a
memory
location.
R/M= 110, then 16-bit displacement follows The following two lines of code are identical:
Except when
and
Microcontroller
L.P. University-{B.Tech.-AB Publisher
Microprocessor
2017-7
Sixth Semester, Mnemonics
6-2017
MVI D, 03H T-States
OFFSET aMessage
mov ax,
OFFSET is an
assemble Loop2:
LXI B, FFFFH
lea ax,aMessage indexed
because
DCXB 10
cannot be Loop1:
instruction
MOV to say 6
However, the would be impossible MOVA, C
directive, not an
instruction. It
hand, it is ORAB
aMessage+[BX]
On the other
mov ax,OFFSET is done at
assembly-time. JNZ Loop1
offset
calculation
10/7
since the DCRD
command
possible to issue the JNZ
leaax,aMessage[BX] Loop2 10/7
example:
Time delay given by Loopl (td1) =0.314568 second
lea dx,aMessage Approx. Total time delay (td)=3° tdl- 1 second
0.3.(c) Describe the effects on the Flags when the
Before each instruction, assuming all Flagsfollowing instructions
mov ah,09h
a rxecuted.
screen
a string to the e 0 (reset) and register
ofthe
=
int 21h outputting are:A DAH; B=
is the s a m e
standard
method of
situations,
making
ofisetting
contents
=
06H; C=9CH
that this in such MOV B,A
Notice to use the
LEA i n s t r u c t i o n (4)
lt is preferred
future.
DCR C
easier in
string
indicate
the status of various ADD B
which i n the following
Flags variables in the
CPU
among
others, IN 22
a set of used,
The flagsand
are
of the CPU.
Flags are
components
RAL
calculations
t o indicate
the sign ofthe last operations
ADD B;A=B4H&CF=1
t o enable a carry
during arithmetic IN 22; A=XX, as we don't know the content
of input port address 22 data.
state of th.
e RAL; A-01H&CF-0
for debugging certain tasks based
on the current
instructions perform Q4.(a) At a particular instant, the data in certain registers of the 8086 are as
A number of C237. Displacement
=
below: (2)
flags.Determine the effeetive SI 2A9B,
address (if applicable) resulting from the.
(3
=
=
637D, AX=1234H; BX = 3456H; CX= 10 H; SI =5678 H; DI=ABEFH; BP=CDEFH; Cs
Q.3.(a)
Given that: BX e
9087H;
mode: DS=9035 H; ES = 6798H; SS-909THL Ifnow the instruction MOVSBis executed
the addressing
registers and (2) Direct
by the processor state clearly what happens in the memory. Also indicate what
(1) I m m e d i a t e (4) Based Indexed
data are left in the above registers.
BX
(3) Register using Assume D flag is set
address is used
Ans. () No effective instruction itself Ans. MOVSB:copies contentsof byte givenby DS:SI into ES: DI
effective address
is given in the
i )Direct Direction Flag = 0; Forward processing Lot R)
used
(ii)No effective address is DF-1; Backward processing ( Rto L
Giv)BX+SI = 8E18H
produce a delay of 1 second. Consider the 808 Physical Address of source DS:SI =959C8H
ALP to Physical Address of destination ES: DI = 7256FH
9.3.b) Write an
clocked at 5 MHz. Here DF = 1 & CX = 10, That means 10 bytes of data are moved from 959C8H to
cannot be used to generate 1 sectime delay,So wee 7256FH
Ans.In8085 singleregister
a loop within loop
a technique:
to use time delay using and every time DF =1
Given time delay= 1
second Q4.b) Design a microprocessor 8086 based microcomputer system having
8085= 5MHz 4 chips of 4k RAM. 2 chip of 2Kram, 1 input device, and 1 output device. The I0
Frequency af
Time period of 8085= 0.2usec
devices are interfaced in memory mapped 10. The memory map notshould
have any fold back addresses. Give the complete memory map of this
LPto genérate 1 sec delay (6)
mierocomputer system.
Microprocessor
and Microcontroller
Sixth Semester,
8-2017
Ans.
RAM 16 K RAM
Four chips of 4K
=
KRAMM
Two chips of 2K RAM=4
lines: 2 x 210 =Ap-A3
16 K RAM address
lines: 24 x 210 =Ag-Au
4K RAM address
Table Memory MapP
Ap A As A As As A A A
A A Ap As A Au Au Au| A 1 11 t
Address
1 1 11 1 1 1 1 1 111
FFFFF 1 1 1 0 0 016 0 00 0 0 0 0 0 0
POO00 K RAM 1
FBFFF
FB000
A-As CS2
CS,
Odd
16K x 8
Even
16K x 8
Do-D
CSCS, =0 1 1 D,-D
A-A1
Even Odd
4Kx 8 4K x 8
D-D
nservedvariable-declared
A
address withit
at that
or Space reserved for it infor inDB,
a
DW, or DD
RD the .COM fle. directive-has
the .COM But an
Equate doesaddress
Example: an
file. and
until the instruction MV not have anhas space
in the system bus A-Byte EQU THIS address
Here is description of what happens
will explain a generic microprocessor
rather than 8085): DB 10 BYTE
32H is executed (again I address 2000H into the addresSbu
loads the memory A_vword EQU THIS WORD
TheProgram Counter DW 1000
machine cycle.
during Tl of the Op. Code the memory location 2000p
locates and identifies A_ dword EQU THIS
The address decoding system the MEMR-signal (Read) whichlas DD 4294967295 DWORD
Control unit produces
A t T2, the Timing and time the memory places the Opcode 3EH Buffer Size EQU 1024
this window of
during T2 and T3. Duringdata bus. Buffer DB 1024 DUP (0)
location 2000H into the Register then into od
the Opcode in the Iastruction
the Opcode it feede ptr EQU $
system places
The operating
Instruction Decoder.
When the Instruction
Decoder
and Control Unit.
decodes
The fetch operation is completed Q.3.1(a) Explain all;actually
the points to the
addressing next byte after the
decoded signal into the Timing Addressing i1smodes: 1lhe modes of 8086 with suitable
ith
1024th byte in buffer.
T3. method by which address of
instruction called as addressing example.
incremented to 2001H.
Tmmediate source of data is (5)
T h e Program Counter is secondbyte which contai mode of
and Control unit
finds out that a ntam nstruction addressing
is given alongw mode (LAMD: If
gwith instruction, then8/16
source. given
During T4, the Timing address 2001H). the bit data required
the data needs to be read
(i.e. Example: 1. MOV AL, 75H it is for
called immediate executing the
T h e second machine cycle
is Memory Read cycle.
Counter loads the address20018
2. MOV BX,
7506 H; mode. addressing
A t the T1 of
cycle the Program
the 2nd machine o
Direct 7506 H-BH BL
addressing mode (DAM):
into the address bus. the memory location 2001H bitB.A. of
PAof
location teAMD:
memory location
this memory 1s
If8/16 hit data is
If 8/16 bit
locates and identifies mode instructions.5en given alongwith the present in memory
the i 1present alongwith instruction,
a
and 16
The address decoding system MBEMR lasts duringn addressing8
signal which then it is called direct
and control unit produces Example: MOVAL, (9106H]
A t T2 the Timing
the data 32H is placed
into the data bus thenint
and T3. During this window of time 3. Register direct
addressing
the aveeutine (RDAM): If 8/16 bit dats
instruction, mode
the MPU.
the data 32H is stored
into the accumulator. the instruction
the instruction,
is
esent
alongwith in register and f8/16
the name of
data
present register required for
During the rest of T3, directives with
assembler
examplelongwith then it is called RDAM instruetion. register is given
DB, ASSUME and EQU Example: MOV CX, BX
Q2. (b) Explain: 4. Register indirect
BYTE-2-BYTE variable -ABYT and the E.A. is addressing mode (RIAM):
Ans. DB-The DB
directive is used to declare
a
present in a register, then it is called If the data is present in memory
RIAM instruction.
is made up of 8 bits. BA=[BX)/SI) ADI)
Declaration examples: Example: MOV CX, BX
Bytel DB 10h 5. Register relative addressing mode
max. possible for a
BYTE cation and the EA = (RRAM): Data is present in
Byte2 DB 265; OFFh, the
Return, terminator BYTE
[BXVBPVSIVDIJ+
Example: MOV CX, 97H (BPI 8/6 bit displacement. memory
CRLF DB ODh, 0Ah, 24h; Carriage
Sixth Semester, Microprocessor And Microcontroller
4-2018
L.P.
6. Base index addressing mode (BIAM): Data is present in meme
ory location
University-(B.Tech J-Akash Books 2018-5
the EA = [BXVBP] + [SI/DI] The 8085 has fivehardware interrupts
Example: MOV CX, IBX) (SI] d) TRAP (2) RST 7.5 (3) RST 6.5 (4) RST 5.5 (6) INTR
7. Relative base index addressing mode (RBIAM): EA, = [BX/BD
. +8/16 bit displacement Interrupt Vector address
Example: MOV AH, 1907H [BXIDI RST 7.5
MOV DX, 8AH[BPI[SI] is used the relative base, index addressing mode 03CH
8. Implicit addressing mode (IPAM): Ifaddress of source of data as well a RST6.5 0034H
fixed then operand is given alongwith the instd RST5.5 002CH
truction
no
of destination of result, are
And
Microprocessor
of
6.5 and RST
5.5
RST 7.5, RSTand then executing IM instruction RST
7.5 internupt Reset CLR O O03CH
T h e masking
or unmasking
8-bit data to
accumulator
3 RST recognizedhoco
moving a n S.5 O038H
performed by below. O034H
data is shown
T h e format ofthe 8-bit Do And
D D D D,
D, DD R7sMSEM7.5|M6
RST
Oa30H
soD/SDEX 5/M5.5 002CH
RST 5.5 mask Mask
RST6.5 mask E 1- TRA O024H
O028H
D DD DD D D D
S Z X AC X PXCY
All of the three flip flop set and reset according to the stored resultin the acmumuiator
1.Auxilliary carry AC)-If any carry goes from D3 to D4 inthe output then itis sef
otherwise it is reset.
2. Carry (C) - If the result stored in an accumulator generates a carryinits fnal
output then it is set otherwise it is reset.
3. Parity Flag (PF): This flag is used to indicate the parity ofresult. Flower arder
number of 1's, the Parity Flagis set to ane and for add
8-bits of the result contains even reset i.e. zero.
is
number of 1's, the Parity Flag
4.Zero Flag (ZF): It is set to one; if the result of arithmeticor logical operationis
Zero else it is reset. ofnumber is indieated by
5. Sign Flag (SF): sign magnitude format the sign
In
is set to ane
sign flag
MSB bit. If the result of operation negative,
is
and Microcontrollers
2-2019 Sixth Semester,
Microprocessors
I.P.University-(B.Tech -Akash Books 2019-3
and flagStatus
ag Status as
1 . (d) Identify the contents
instructutions are excecuted.
of accumulator following(3) Timing Diagrams for MVIB, 05H. As shown in Fig, the instruction needs tow machine
wcles. The first machine cycle is Opcode fetch. It takes 4 T-states (4 clock
MVIA, 7FH The periods).
ORA A sCond machine cycle is a memory read which takes 3 T-States. Teih instruction
cycle
takes 7-T states.
CPIA2 H
Ans. MVIA, 7FH; A=7FH Here is description of what
A=FEH
happens in the system bus until the instruction
ORA A; MVI B, 05His executed (again I will explain a
CPI A2H; A=5CH
The Program
generic microprocessor rather than 8085):
5CH & Flag status CF=0, AC=0, P=1, S=0 and Z= Counter loads the memory address 2000H into the address bus
Content of Accumulator
=
Label Instruction Comments At T2, the Timing and Control unit produces the
MVIA, 9FH; Loads Accumulator with 9FH
during T2 and T3. During this window of time the MEMR-signal (Read) which lasts
MVI B,5DH; Loads register B with 5DH location 2000H into the data bus. memory places the Opcode 3EH from
Loads register C with 6EH
MVI C, 6EH; The operating system places the
CMP B; Compares B with A the Instruction Decoder.
When the Opcode in the Instruction Register then into
JCjump1:; On no carry jumps tojumpl: the decoded signal into the Instruction Decoder decodes the
MOVA, B Moves content of B to A in T3. Timing and Control Unit. The fetch Opcode
it feeds
microprocessor.
Semester,
diagram of8086
shows the internal block the bus interface
Sixth
6-019 Following figure funetional parts,
is divided into two independent
The 8086 CPU
or EU.
or BIU,
and the execution unit addresses on the
buses for the
unit all data and reads
BIU handles
Interface Unit: The instructions from
memory,
The Bus addresses, fetches
as it sends out
unit such
execution
as writes data
to ports and memory.
and as well instructions
data from ports memory to fetch
RAM unit (EU) tells the BIU where
Unit: The execution
A-A 128 Kx8 The Execution instructions
executes
ODD
or data from,
decodes instructions, and o r system, instruction
evEN micraproceSsor BANK execution unit are control cireuitry
NA The functional parts of the
unit (ALU). decoder in the EU
decoder, and Arithmetic logic operations. A
various internal o r external
circuitry to perform different internal
Control from memory to generate which
translates instructions fetched EU has a 16-bit ALU,
fo- control signals that required performing
the operation. The
subtract etc. and logical
operations
D-D senerate CSE
(chip selectlogic forevenbank) and Xi can perform arithmetic
operations such as add,
with A, to such a s AND, OR, XOR, increnment, decrement ete.
seleet logie for odd bank) 4)
Fisdennded
CSO (chip (b)
Q.3. Compare Procedures and macros using a suitable example
togenerate
decoded with BH5 OR Ans.
diagram explain
the two modesodes of operation Procedure Vs Macros
) W i t h the help of block Procedures
3 Macros
Architecture: The Intel
Microprocessor
ofIntel 8ISS 8086 is a Accessed by CALL and RET mechanism Accessed by name given to macro when
Microprocessor Internal microcomputer
Ans The S086intended to be used as the CPU n a The term 16 during program execution. defined during assembly.
bit microprocessor unit, internal regist Machine code for instructions only put in
b e m e a n s that
its arithmetic logicwords. It has 16-bit databus and 20-hit
uctin memory once
Machine code generated for instructions
binary
16-bit each time called.
are desigmed
to work
locations. If the first hu-yte of a Parameters are passed in registers,
stored in two consecutivememory word ord in one operation. wor Parameters passed as part of statement
Words will be read the entire memory locations or stack
which calls macro.
the 8086 c a n onthefi
i sat a n even address,
address,the 8086 will read
the first byte in Procedures uses stack
Macro does not utilize stack
odd
byteofthe word is atinananother operation
On A procedure can be defined anywhere in
and the second byte program using the directives PROC and
Amacro can be defined anywhere in
program using the directives MACROD
ENDP and ENDM.
Procedures take huge memory for
CALL3 bytes each time CALL is used) Length of code is very huge if macro's are
BU called for more number of tinmes.
Instruction instruction.
Stream
Byte
Queue
B-BUS
Control
system
EU
Anthmatic
logic unit