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

MPI Mid IMP Question

The document outlines various topics related to the 8085 microprocessor, including its internal architecture, pin diagram, programming model, bus architecture, and control signals. It provides detailed explanations of the flag register, pin descriptions, interrupts, and a series of assembly language programs for data manipulation. Additionally, it includes video links and references to PowerPoint presentations for further learning resources.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

MPI Mid IMP Question

The document outlines various topics related to the 8085 microprocessor, including its internal architecture, pin diagram, programming model, bus architecture, and control signals. It provides detailed explanations of the flag register, pin descriptions, interrupts, and a series of assembly language programs for data manipulation. Additionally, it includes video links and references to PowerPoint presentations for further learning resources.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

MPI mid

QUE-1: 8085 Internal Architecture


Video Link:https://youtu.be/w2oXhH02GSU?si=P-t2KZbgH73XQ7R3
MPI mid
QUE-2: 8085 Pin Diagram
Video Link:https://youtu.be/llh4rkvj2OA?si=T0XKlA0pbC5_WAwU

Also refer the ppt name: pin-diagram-of-8085


which I sent in my group
MPI mid
QUE-3: 8085 Programming Model
MPI mid
MPI mid
MPI mid
QUE-4: 8085 bus architecture
MPI mid
MPI mid

QUE-5: 8085 DeMultiplexing of Multiplexed Bus


MPI mid
MPI mid

QUE-6: 8085 Generation of Control Signal


(Demultiplexing of control signal)
MPI mid

QUE-7: memory classification


MPI mid

QUE-8: 8085 Flag Register


Video Link:https://youtu.be/rlcBbFa9A6M?si=cp4KdCxc5KpRCwSQ

1. Sign Flag (S) – After any operation if the MSB (D(7)) of the result
is 1, it indicates the number is negative and the sign flag becomes
set, i.e. 1. If the MSB is 0, it indicates the number is positive and the
MPI mid
sign flag becomes reset i.e. 0. from 00H to 7F, sign flag is 0 from
80H to FF, sign flag is 1 1- MSB is 1 (negative) 0- MSB is 0
(positive)
Example: MVI A 30 (load 30H in register A) MVI B 40 (load 40H in
register B) SUB B (A = A – B) These set of instructions will set the
sign flag to 1 as 30 – 40 is a negative number. MVI A 40 (load 40H
in register A) MVI B 30 (load 30H in register B) SUB B (A = A – B)
These set of instructions will reset the sign flag to 0 as 40 – 30 is a
positive number.
2. Zero Flag (Z) – After any arithmetical or logical operation if the
result is 0 (00)H, the zero flag becomes set i.e. 1, otherwise it
becomes reset i.e. 0. 00H zero flags is 1. from 01H to FFH zero flag
is 0 1- zero-result 0- non-zero result Example: MVI A 10 (load
10H in register A) SUB A (A = A – A) These set of instructions will
set the zero flag to 1 as 10H – 10H is 00H
3. Auxiliary Carry Flag (AC) – This flag is used in the BCD number
system(0-9). If after any arithmetic or logical operation D(3)
generates any carry and passes it on to D(4) this flag becomes set
i.e. 1, otherwise, it becomes reset i.e. 0. This is the only flag
register that is not accessible by the programmer 1-carry out from
bit 3 on addition or borrows into bit 3 on subtraction 0-otherwise
Example: MVI A 2BH (load 2BH in register A) MVI 39H (load 39H
in register B) ADD B (A = A + B) These set of instructions will set
the auxiliary carry flag to 1, as on adding 2B and 39, the addition of
lower-order nibbles B and 9 will generate a carry.
4. Parity Flag (P) – If after any arithmetic or logical operation the
result has even parity, an even number of 1 bit, the parity register
becomes set i.e. 1, otherwise it becomes reset i.e. 0. 1-accumulator
has an even number of 1 bits 0-accumulator has odd parity
Example: MVI A 05 (load 05H in register A) This instruction will
set the parity flag to 1 as the BCD code of 05H is 00000101,
which contains an even number of ones i.e. 2.
5. Carry Flag (CY) – Carry is generated when performing n bit
operations and the result is more than n bits, then this flag
becomes set i.e. 1, otherwise, it becomes reset i.e. 0. During
MPI mid
subtraction (A-B), if A>B it becomes reset, and if (A<B) it becomes
set. Carry flag is also called the borrow flag. 1-carry out from MSB
bit on addition or borrow into MSB bit on subtraction 0-no carry
out or borrow into MSB bit.
Example: MVI A 30 (load 30H in register A) MVI B 40 (load 40H in
register B) SUB B (A = A – B) These set of instructions will set the
carry flag to 1 as 30 – 40 generates a carry/borrow. MVI A 40 (load
40H in register A) MVI B 30 (load 30H in register B) SUB B (A = A
– B) These set of instructions will reset the carry flag to 0 as 40 –
30 does not generate any carry/borrow.

QUE-9: 8085 Pin Description


See Question no: 2

QUE-10: explain Interrupts in detail


Refer the PPT name: Interrupt

Which I sent in my group


MPI mid

This is first page of that ppt

QUE-11: Instruction Explanation


NOTE: this is only sort explanation of every instruction
for more Detail refer PPT name: Instruction-set-8085

Which is sent in my group

-Instruction:
MOV Rd,Rs: it transfer the data from regiset source to registe destination
-type: 1-Byte

MVI Rd,8-bit data: it tranfer 8 bit data to register destination


-type: 2-Byte

LXI Rp,16-bit data: lxi B,2000 => BC, LXI D,3300 => DE,
-type: 3 byte

# LDA and STA both are Direct addresing method


LDA 16-bit address: it load the data from 16 bit address into accumeletor
-type: 3-Byte
MPI mid
STA 16-bit address: it store data from accumeletor to 16 bit address
-type:3-Byte

# LDAX and STAX both are indirect addresing method


LDAX Rp: it store the data which point by register pair into accumeletor
-type: 1-Byte
STAX Rp: it store the data from accumeletor to the address which point by
register pair
-type: 1-Byte

INR Rd: Rd=Rd+1 B ,C ,A,D,E,H,L 8-bit


-type: 1-Byte
DCR Rd: Rd =Rd-1 B ,C ,A,D,E,H,L
-type: 1-Byte

INX Rp: Rp=Rp+1 BC,DE,HL


-type:1-Byte
DCX Rp: Rp= Rp-1 BC,DE,HL
-type:1-Byte

ADD Rs: AC=AC+Rs


-type: 1-Byte

ADI 8bit-data: AC=AC+8-bit data


-type: 2-Byte

ADC Rs: AC=AC+Rs+CY


-type: 1-Byte
ACI 8-bit data: AC= AC+ 8-bit data+CY
-type: 2-Byte

SUB Rs: AC=AC-Rs


-type: 1-Byte
SUI 8-bit data: AC = AC- 8-bit data
-type: 2-Byte

SBB Rs: AC = AC-Rs-CY


-type: 1-Byte
MPI mid
SBI 8-bit data: AC = AC- (8-bit data) - CY
-type: 2-Byte

CMP Rs: Ac-Rs but resutl is not store only flage is affected
-type: 1-Byte

CPI 8-bit data: AC- 8-bit data but resutl is not store only flage is affected
-type: 2-Byte

DAA : convert the result into BCD form


-type: 1-Byte

DAD Rp: addition of 16-bit data


- hl=hl+Rp
-type: 1-Byte

RAR: Rotate accumulater Right


-if we use 9 time RAR command then original value is paachi mali jase
-type:1-Byte
RRC: rotate accumulater right without carry
- if we use 8 time RRC command then juno data paacho mali jase
-type:1-Byte

RAL: rotate accumulater Left


if we use 9 time RAL command then juno data paacho mali jase
-type: 1-Byte
RLC: rotate accumulater left without carry
if we use 8 time RLC command then juno data paacho mali jase
-type: 1-Byte

JC: if CY=1 then jump to the given name


JNC: if CY=0 then jump to the given name

JZ: if Z=1 then jump to the given name


JNZ: if Z=0 then jump to the given name

JP: jump if positive


JM: jump if minus

JPE: jump if parity even


MPI mid
JPO: jump if parity odd

JMP: jump unconditionally

QUE-12: Data transfer Program AND Arithmetic


Program
Program-1: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data less then 30H needs to copy into memory location
3000H onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
CPI 30
JNC NEXT
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT
MPI mid
Program-2: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data less then or equals to 30H needs to copy into memory
location 3000H onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
CPI 31 H (30 + 1)
JNC NEXT
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT

Program-3: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data greater then 30H needs to copy into memory location
3000H onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
CPI 31 (30H +1)
JC NEXT
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT
MPI mid
Program-4: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data greater or equals to 30H needs to copy into memory
location 3000H onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
CPI 30
JC NEXT
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT

Program-5: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data in the range [30, 33] needs to copy into memory
location 3000H onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
CPI 30
JC NEXT
CPI 34 (33 + 1)
JNC NEXT
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT
MPI mid
Program-6: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data in the range (30, 33) needs to copy into memory
location 3000H onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
CPI 31 (30+1)
JC NEXT
CPI 34
JNC NEXT
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT

Program-7: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only even data needs to copy into memory location 3000H
onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
RAR
JC NEXT
MOV A, M
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT
MPI mid
Program-8: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only odd data needs to copy into memory location 3000H
onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
RAR
JNC NEXT
MOV A, M
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT

Program-9: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only Positive data needs to copy into memory location 3000H
onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
RAL
JC NEXT
MOV A, M
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT
MPI mid
Program-10: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only Negative data needs to copy into memory location 3000H
onwards.

LXI H,2000
LXI D,3000
MVI C,0A

BACK: MOV A, M
RAL
JNC NEXT
MOV A, M
STAX D
INX D

NEXT: INX H
DCR C
JNZ BACK
HLT

Program-11: Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and count
the number of data less then 80H and store your result on
memory location 3000H.

LXI H,2000
MVI C,0A
MVI B,00
BACK: MOV A, M
CPI 80
JNC NEXT
INR B
NEXT: INX H
DCR C
JNZ BACK

MOV A, B
STA 3000
HLT
MPI mid
Program-12: Write an ALP to Add the content of memory location 2000H to
2009H and store your result on 3000H (Lower byte) and 3001H
(higher byte).

LXI H,2000
MVI C,0A
MVI B,00
MVI A,00

BACK: ADD M
JNC NEXT
INR B

NEXT: INX H
DCR C
JNZ BACK
STA 3000
MOV A, B
STA 3001
HLT

Program-13: Write an ALP to multiply the content of memory location 2000H


with 2001H and store your result on 3000H (Lower byte) and
3001H (higher byte).

LXI H,2000
MVI B,00
MVI A,00
MOV D, M
INX H
MOV C, M

BACK: ADD D
JNC NEXT
INR B

NEXT: INX H
DCR C
JNZ BACK
STA 3000
MOV A, B
STA 3001
HLT
MPI mid
Program-14: Write an ALP to divide the content of memory location 2000H by
the content of memory location 2001H and store your result on
3000H (quotient) and 3001H (Reminder).
LXI H,2000
MVI B,00
MOV A, M
INX H
MOV C, M

BACK: INR B
SUB C
JP BACK

DCR B
ADD C
STA 3001
MOV A, B
STA 3000
HLT

QUE-14: Memory interfacing AND I/O interfacing

તમારા નજીક ના friend ને કેજો સિખાવાદી દે

કેમ કે આનો કોય ફિક્સ્ડ answer નથી આના િમ પ ૂછાય છે .

You might also like