HSC Science (Computer Science) 12th Board ExamMaharashtra State Board
Share

Explain the following instructions of 8085 Microprocessor with one example of each : PUSH PSW - HSC Science (Computer Science) 12th Board Exam - Computer Science 2

ConceptInstruction Set and Programming of 8085

Question

Explain the following instructions of 8085 Microprocessor with one
example of each : PUSH PSW

Solution 1

PUSH PSW : [PUSH ACCUMULATOR AND FLAG REGISTER ON STACK]
Format: [[SP] - 1] ←[A]
[[SP]- 2]0 ←[Cy], [[SP]-2]1 ←x,
[[SP]-2]2 ←[P], [[SP]-2]3 ←x,
[[SP]-2]4 ←[Ac], [[SP]-2]5 ←x,
[[SP]-2]6 ←[Z], [[SP]-2]7 ←S ,
[SP]←[SP]-2 (x -Undefined)
Bytes : 1 byte
Flag : None

Comment:
(1) The content of accumulator are moved to the memory location, whose address is one less than the content of stack pointer.
(2) The content of processor status word (flag register) are moved to the memory location, whose address is two less than the content of stack pointer.
(3) The stack pointer is decremented by 2

Example: Let [A] = 33 H and Flag Register = 25 H, [SP] = D015
Instruction: PUSH PSW
After execution : [D014] = 33 H, [D013] = 25H
[SP] = D013 H

Solution 2

PUSH PSW : [PUSH ACCUMULATOR AND FLAG REGISTER ON STACK]
Format: [[SP] - 1] ←[A]
[[SP]- 2]0 ←[Cy], [[SP]-2]1 ←x,
[[SP]-2]2 ←[P], [[SP]-2]3 ←x,
[[SP]-2]4 ←[Ac], [[SP]-2]5 ←x,
[[SP]-2]6 ←[Z], [[SP]-2]7 ←S ,
[SP]←[SP]-2 (x -Undefined)
Bytes : 1 byte
Flag : None

Comment:
(1) The content of accumulator are moved to the memory location, whose address is one less than the content of stack pointer.
(2) The content of processor status word (flag register) are moved to the memory location, whose address is two less than the content of stack pointer.
(3) The stack pointer is decremented by 2

Example: Let [A] = 33 H and Flag Register = 25 H, [SP] = D015
Instruction: PUSH PSW
After execution : [D014] = 33 H, [D013] = 25H
[SP] = D013 H

Is there an error in this question or solution?

APPEARS IN

2016-2017 (March) (with solutions)
Question 3.1.2 | 3.00 marks
Solution Explain the following instructions of 8085 Microprocessor with one example of each : PUSH PSW Concept: Instruction Set and Programming of 8085.
S