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

Lab 4

This document provides information about jump instructions in 8085 microprocessors for a lab assignment. It lists unconditional and conditional jump instructions, including JMP, JC, JNC, JZ, JNZ, JP, JM, JPE, and JPO. It gives examples of programs using conditional jump instructions to check results and jump to a label to output values to different ports depending on conditions. Students are asked questions about using jump instructions to check sums and outputs based on flags.

Uploaded by

abcdef
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)
103 views

Lab 4

This document provides information about jump instructions in 8085 microprocessors for a lab assignment. It lists unconditional and conditional jump instructions, including JMP, JC, JNC, JZ, JNZ, JP, JM, JPE, and JPO. It gives examples of programs using conditional jump instructions to check results and jump to a label to output values to different ports depending on conditions. Students are asked questions about using jump instructions to check sums and outputs based on flags.

Uploaded by

abcdef
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/ 1

Computer Architecture - Lab 4

For this lab assignment, you will learn about Jump Instructions (Unconditional Jump and Conditional Jump) in 8085
microprocessors.
Jump instructions specify the memory locations explicitly – 3-byte instruction – one byte for operation code, followed
by 16-bit memory address.

Instructions Description

JMP 16-bit Jump to 16-bit address unconditionally

JC 16-bit Jump on Carry (if result generates carry and CY = 1)

JNC 16-bit Jump on No Carry (CY = 0)

JZ 16-bit Jump on Zero (if result is 0 and Z =1)

JNZ 16-bit Jump on No Zero (Z = 0)

JP 16-bit Jump on Plus (if D7 = 0, and S = 0)

JM 16-bit Jump on Minus (if D7 = 1, and S = 1)

JPE 16-bit Jump on Even Parity (P = 1)

JPO 16-bit Jump on Odd Parity (P = 0)

Questions
1. What is the output on output port 1, when the following instructions are executed? Justify your answer.

MVI A,8FH MVI A,8FH


ADI 72H SUI 67H
JC DISPLAY JC DISPLAY
OUT 01H OUT 01H
HLT HLT
DISPLAY: XRA A DISPLAY: XRA A
OUT 01H OUT 01H
HLT HLT

2. Load the hexadecimal numbers 9BH and A7H in registers D and E, respectively, and add the numbers. If
the sum is greater than FFH, display 01H at output port 0; otherwise, display the sum. Use JNC
instruction.
3. Rewrite the above program using JC instruction.
4. Load the hexadecimal numbers 42H and 69H in registers B and C, respectively. Subtract C from B. If the
result is negative display its 2’s complement at PORT01; if the result is positive display it at PORT02.

Reference

 “Microprocessor Architecture, Programming, and Applications with the 8085”, Ramesh S. Gaonkar, 6th
Edition, Penram International Publishing (India) Private Limited, 2013.

You might also like