0% found this document useful (0 votes)
7 views27 pages

Index: Sr. No Experiment Title Page No Date of Performance Date of Assessmen T Marks (Out of 20) Sign From To

The document is a lab manual for a Computer Organization and Architecture course, focusing on the Intel 8085 microprocessor and its simulator, GNUsim8085. It outlines various experiments related to the 8085 architecture, instruction set, and assembly language programming, with specific objectives and outcomes for each experiment. Additionally, it provides detailed information on the 8085 microprocessor's architecture, registers, and operational features.

Uploaded by

vileci2462
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)
7 views27 pages

Index: Sr. No Experiment Title Page No Date of Performance Date of Assessmen T Marks (Out of 20) Sign From To

The document is a lab manual for a Computer Organization and Architecture course, focusing on the Intel 8085 microprocessor and its simulator, GNUsim8085. It outlines various experiments related to the 8085 architecture, instruction set, and assembly language programming, with specific objectives and outcomes for each experiment. Additionally, it provides detailed information on the 8085 microprocessor's architecture, registers, and operational features.

Uploaded by

vileci2462
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/ 27

ComputerOrganizationandArchitecture

Lab Manual (303108254) 2024-2025

INDEX

Page No Marks
Sr. Date of Date of
Experiment Title (out of Sign
No Performance Assessmen
From To 20)
t

Write the working of 8085


1 Simulator and basic 30-11-2024 07-12-2024
architecture of 8085 along
with small introduction.

Study the complete instruction


set of 8085 and write the
2 instructions in the instruction 21-12-2024 04-01-2025
set of 8085 along with
examples.

Write an assembly code in


3 8085 simulator to 11-01-2025 18-01-2025
implement Data
Transfer Instruction.
Write an assembly language
code in 8085 simulator to
4
store numbers in reverse
order in memory location.
Write an assembly language
code in 8085 simulator to
5 implement arithmetic
instruction.
Write an assembly language
code in 8085 simulator to find
6
the smallest number from two
numbers.
Write an assembly language
code in 8085 simulator to
7 add two 8 bit numbers stored
in memory and also storing
the carry.
Write an assembly language
8 code in 8085 simulator to store
numbers in reverse order in
memory location.
Write an assembly language
9 code in 8085 simulator to
implement Sorting
(Descending).
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Write an assembly language


10 code in 8085 simulator to
convert BCD to Binary.
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

EXPERIMENTNO.1

Objective(s):

Introduction to microcontroller and case study of 8085 simulator

Outcome:

The students will be able understand concept of GNU 8085 simulator

Problem Statement:

Write the working of 8085 simulator GNUsim8085 and basic architecture of 8085 along with small introduction

Background Study:

GNUSim8085 is a graphical simulator, assembler and debugger for the Intel 8085 microprocessor in Linux
and Windows. It is among the 20 winners of the FOSS India Awards announced in February 2008.
NUSim8085 was originally written by Sridhar Ratna kumar in fall 2003 when he realized that no proper
simulators existed for Linux. Several patches, bug fixes and software packaging have been contributed by
the GNUSim8085 community.

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Code (Student Work Area):

Aim:- Write the working of 8085 simulator GNUsim8085 and basic architecture of 8085 along with small
introduction.
What is 8085 Microprocessor?
⮚ The general purpose means the 8085 microprocessor has to be relatively simple and
inexpensive to implement many small to medium computation tasks.
⮚ It follows the von Neumann architecture that uses one memory space for both
instructions and data.
⮚ It is capable of executing arithmetic, logical, and control operations and is designed to
interact with external devices like memory, I/O ports, and other peripherals.

Introduction to 8085 Microprocessor

⇒GNUSim8085 is a graphical simulator, assembler and debugger for the Intel 8085 microprocessor in
Linux and Windows.

⮚ A simple editor component with syntax highlighting.

⮚ A keypad to input assembly language instructions with appropriate arguments.

⮚ Easy view of register contents.

⮚ Easy view of flag contents.

⮚ Hexadecimal 🡨🡨 Decimal converter.

⮚ View of stack, memory and I/O contents.

⮚ Support for breakpoints for program debugging.

⮚ Stepwise program execution.

⮚ One click conversion of assembly program to opcode listing.

⮚ UI translated in various languages.

The features of 8085


⮚ It is an 8-bit microprocessor i.e. it can accept, process or provide 8-bit data simultaneously.

⮚ It operates on a single +5V power supply connected at Vcc

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

⮚ It operates on clock cycle with 50% duly cycle.

⮚ It operates on clock cycle with 50% duly cycle.

⮚ It has on chip clock generator this internal clock generator requires tuned circuit like LC, RC or crystal. The
internal clock generator divides oscillation frequency by 2 and generates clock signal, which can be used
for synchronizing external devices.

⮚ It can operate with 3 MHz clock frequency.

⮚ It has 16 address buses, hence it can access 216 64 bytes of memory.

⮚ It provides 8 bit I/o address to acce4ss (28 ) 256 I / o ports.

⮚ In 8085, the lower 8-bit address bus (A0-A7) and data bus (D0-D7) are multiplexed to reduce number of
external pins. But due to this, external hardware is required to separate address lines and data lines.

⮚ It supports 74 instructions with following addressing modes. (a) Immediate, (b) Register, (c) Direct (d)
Indirect (e) Implied.

⮚ The Arithmetic logic unit of 8085 performs a) 8 bit binary addition with or without carry. (b) 16 bit binary
addition (c) 2 digit BCD addition (d) 8-bit binary subtraction with or without borrow (e) 8-bit logical
AND, OR, EX-OR, complement (NOT) and bit shift operations.

⮚ It has 8-bit accumulator, flag register, instruction, register, six 8-bit general purpose. Registers (B, C, D, E,
H and C) and five 16-bit registers (SP and PC)

⮚ It provides five hardware interrupts: TRAP, RST 7.5. RST 6.5, RST 5.5 and INTR.

⮚ It has serial I/O control which allows serial communication

⮚ It provides control signals (IO /M, RD, WR) to control bus cycles.

⮚ The external hardware (another microprocessor or equivalent master) can detect which machine cycle
microprocessor is executing using status signals (IO/M, S0, S1) This feature is useful when more than one
processor are using common system resources (memory & I/O devices).

⮚ The 8085 has an ability to share system bus with direct memory access controller. This feature allows to
transfer large amount of data from I/O device to memory or from memory to I/O device with high speeds.

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Registers in GNUSIM 8085


Figure :- 1

FLAG REGISTER

⮚ In the 8085 microprocessor, the Flag Register is a kind of 8-bit register comprising five flags that
indicate the results from arithmetic and logical operations. These flags include:
⮚ The Sign flag, indicating whether the result is negative;

⮚ The Zero flag, set in case the result is zero;

⮚ The Auxiliary Carry flag used in BCD operations;

⮚ The Parity flag, which indicates whether the result has an even number of 1s

⮚ The Carry flag, set in case a carry or borrow occurs.

⮚ In essence, these flags assist the microprocessor in decision-making based on the result of
operations.

SPECIAL PURPOSE REGISTER


⮚ Accumulator: The accumulator is an 8-bit register, which is part of the Arithmetic Logic Unit
(ALU). This is identified as register A or ACC. It is used to store 8-bit data and perform arithmetic
as well as logic operations. The final The result of an operation performed in the ALU is also
stored in the accumulator.

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

⮚ Program Counter (PC): The program counter is a 16-bit special-purpose register. This is used
to hold the memory address of the next instruction which will be executed. This register keeps
track of memory locations of the instructions during execution of program. The microprocessor
uses this register to execute instructions in sequence. For this, the microprocessor increments the
content of the program counter.

⮚ Stack Pointer (SP): The stack pointer is a 16-bit register, which is used to point the memory
location called the stack. The stack is a sequence of memory locations in the R/W memory. The
starting of the stack is defined by loading a 16-bit address into the stack pointer. Generally, the
programmers use this register to store and retrieve the contents of the accumulator, flags, program
counter as well as general-purpose registers during the execution of a program.

⮚ PSW: The PSW is a 16-bit register that contains the contents of the 8-bit flag register and the 8-
bit Accumulator register. The PSW contains eight status flags that indicate the state of the
processor after an instruction is executed. These flags include carry, auxiliary carry, zero, sign,
parity,
overflow, unused, and interrupt. Conditional jump instructions can be used to check the status
flags in the PSW to conditionally execute code.

⮚ Interrupt register: The interrupt register can be used to check if interrupts are enabled or not.

Architecture of 8085 Microprocessor


Figure :- 2

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

The architecture of the 8085 microprocessor consists of several key components:

⮚ Accumulator: The accumulator is an 8-bit register that is used to store arithmetic and logical
results. It is the most commonly used register in the 8085 microprocessor and is used to perform
arithmetic and logical operations such as addition, subtraction, and bitwise operations.

⮚ Registers: The 8085 microprocessor has six general-purpose 8-bit registers, including B, C, D,
E, H, and L, which can be combined to form 16-bit register pairs.

⮚ B and C registers can be combined to form the BC register pair


⮚ D and E registers can be combined to form the DE register pair
⮚ H and L registers can be combined to form the HL register pair.

⮚ These register pairs are commonly used to store memory addresses and other data.

⮚ Registers W and Z are reserved registers and can’t be used in arithmetic operations. It is reserved
for microprocessors and works as temporary registers for internal operations like swapping two
16-bit numbers.

⮚ Program counter: The program counter is a 16-bit register that contains the memory address of
the next instruction to be executed. The program counter is incremented after each instruction is
executed, which allows the microprocessor to execute instructions in sequence.

For Example: Suppose current value of Program Counter: [PC] = 4000H (It means that next executing
instruction is at location 4000H. After fetching, program Counter(PC) always increments by
+1 for fetching of next instruction.)

⮚ Stack pointer: The stack pointer is a 16-bit register that is used to manage the stack. The stack
is a section of memory that is used to store data temporarily, such as subroutine addresses and
other data. The stack pointer is used to keep track of the top of the stack.

⮚ Instruction registers: The instruction register is an 8-bit register that contains the current
instruction being executed. The instruction register is used by the microprocessor to decode and
execute
instructions.

⮚ Flags register: The flags register is an 8-bit register that contains status flags that indicate the
result of an arithmetic or logical operation. These flags include:

⮚ carry flag: The carry flag is set when an arithmetic operation generates a carry
⮚ zero flag: The zero flag is set when the result of an arithmetic or logical operation is zero
⮚ sign flag: The sign flag is set when the result of an arithmetic or logical operation is negative
⮚ parity flag: The parity flag is set when the result of an arithmetic or logical operation has an even
number of 1 bit.

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

⮚ Data bus: The data bus is an 8-bit bus that is used to transfer data between the microprocessor
and memory or other devices. The data bus is bidirectional, which means that it can be used to
read data from
memory or write data to memory.

⮚ Address bus: The address bus is a 16-bit bus that is used to address memory and other devices.
The address bus is used to select the memory location or device that the microprocessor wants to
access, thus, allowing the 8085 to access up to 65,536 memory locations.

⮚ Control bus: The control bus is a set of signals that controls the operations of the microprocessor,
including the read and write operations. The control bus includes signals such as:

⮚ Read signal: The read signal is used to read data from memory or other devices
⮚ Write signal: The write signal is used to write data to memory or other devices
⮚ Interrupt signal: The interrupt signal is used to signal the microprocessor that an interrupt has occurred
⮚ Reset signal: The reset signal is used to reset the microprocessor to its initial state.

⮚ Instruction registers and decoder: It is an 8-bit register that holds the instruction code that is
being decoded. The instructions are fetched from memory.

⮚ Timing and control unit: The timing and control unit comes under the CPU section, and it
controls the flow of data from the CPU to other devices. It is also used to control the operations
performed by the microprocessor and the devices connected to it. Timing and control signals
include Control signals, DMA Signals, RESET signals and Status signals.

⮚ Interrupt control: Whenever a microprocessor is executing the main program and if suddenly
an interruption occurs, the microprocessor shifts the control from the main program to process
the incoming request. After the request is completed, the control goes back to the main program.
There are 5 interrupt signals in 8085
⮚ microprocessors: INTR, TRAP, RST 7.5, RST 6.5, and RST 5.5.

⮚ Priorities of Interrupts: TRAP > RST 7.5 > RST 6.5 > RST 5.5 > INTR

⮚ Serial Input/output control: It controls the serial data communication by using Serial input data
and Serial output data.

⮚ Serial Input/Output control in the 8085 microprocessor refers to the communication of data
between the microprocessor and external devices in a serial manner, i.e., one bit at a time.

⮚ The 8085 has a serial I/O port (SID/SOD) for serial communication.

⮚ The SID pin is used for serial input and the SOD pin is used for serial output.

⮚ The timing and control of serial communication is managed by the 8085’s internal circuitry.

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

⮚ The 8085 also has two special purpose registers, the Serial Control Register (SC) and the Serial
Shift Register (SS)

The flow of an Instruction Cycle in 8085 Architecture


⮚ Execution starts with Program Counter. It starts program execution with the next address field.
it fetches an instruction from the memory location pointed by Program Counter.

⮚ For address fetching from the memory, multiplexed address/data bus acts as an address bus and
after fetching instruction this address bus will now acts as a data bus and extract data from the
specified memory location and send this data on an 8-bit internal bus.

⮚ For multiplexed address/data bus Address Latch Enable(ALE) Pin is used. If ALE = 1
(Multiplexed bus is Address Bus otherwise it acts as Data Bus).

⮚ After data fetching data will go into the Instruction Register it will store data fetched from
memory and now data is ready for decoding so for this Instruction decoder register is used.

⮚ After that timing and control signal circuit comes into the picture. It sends control signals all over
the microprocessor to tell the microprocessor whether the given instruction is for READ/WRITE
and whether it is for MEMORY/I-O Device activity.

⮚ Hence according to timing and control signal pins, logical and arithmetic operations are
performed and according to that data fetching from the different registers is done by a
microprocessor, and mathematical
⮚ operation is carried out by ALU. And according to operations Flag register changes dynamically.

⮚ With the help of Serial, I/O data pin (SID or SOD Pins) we can send or receive input/output to
external devices in this way execution cycle is carried out.

⮚ While execution is going on if there is any interrupt detected then it will stop execution of the
current process and Invoke Interrupt Service Routine (ISR) Function. Which will stop the current
execution
⮚ and do execution of the current occurred interrupt after that normal

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

EXPERIMENTNO.2

Objective(s):

To familiarize the students with GNU 8085 instructions

Outcome:

The students will be able to understand instructions of 8085 simulators

Problem Statement:

Study the complete instruction set of 8085 and write the instructions in the instruction set of 8085 along
with examples
.
.

Background Study:

The various techniques to specify data for instructions are:


1. 8-bit or 16-bit data may be directly given in the instruction itself.
2. The address of the memory location, I/O port or I/O device, where data resides, may be given
in the instruction itself.
3. In some instructions, only one register is specified. The content of the specified register is one
of the operands.
4. Some instructions specify two registers. The contents of the registers are the required data.
5. In some instructions, data is implied. The most instructions of this type operate on the content
of the accumulator.

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Code (Student Work Area):


Aim:- Study the complete instruction set of 8085 and write the instructions In the instruction set
of 8085 along with examples

Instruction set of 8085

⮚ We know that an instruction set is a group of instruction that executes the desired operation
on the data specifically described by the microprocessor 8085.
⮚ An instruction is a binary pattern designed inside a microprocessor to perform a specific
function.
⮚ The entire group of instructions that a microprocessor supports is called Instruction Set.
⮚ 8085 has 246 instructions
⮚ Each instruction is represented by an 8-bit binary value.
⮚ These 8-bits of binary value is called Op-Code or Instruction Byte.
⮚ Each instruction requires some data on which it has to operate. There are different techniques
to specify data for instructions. These techniques are called addressing modes. Intel 8085
uses the following addressing modes.

Classification of Instruction set

Figure :- 3

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

1) Data Transfer Instruction

Definition: Data transfer instructions in computer architecture are specific assembly-


level commands used to move data between different storage locations within a system. These
locations can include registers, memory locations, and I/O devices. These instructions do not per
form arithmetic or logical operations; their sole purpose is to copy or move data.

⮚ Purpose: These instructions facilitate transferring data:


From one register to another.
From a memory location to a register.
From a register to a memory location.
Between an I/O device and the accumulator.

⮚ The primary goal of data transfer instructions is to facilitate efficient and accurate data
movement within a computer system. This is essential for executing programs and
handling operations involving memory, registers, and I/O devices.

Table :

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

2) Arithmetic Instruction
Arithmetic Instructions are the instructions which perform basic arithmetic
⮚ Addition: Any 8-bit number or the contents of a register or the contents of a
memory location can be added to the contents of the accumulator and the sum is stored
in the accumulator. No two other 8-bit registers can be added directly
⮚ Example- the contents of register B cannot be added directly to the contents of register C

⮚ Subtract: Any 8-bit number, or the contents of a register, or the contents of a


memory location can be subtracted from the contents of the accumulator and the results
stored in the accumulator
⮚ The subtraction is performed in2’s complement, and there sults if negative, are expressed
in 2’s complement. No two other registers can be subtracted directly.

⮚ Increment Decrement: The8-bit contents of a register or a memory location


can be incremented or decremented by 1. Similarly, the 16-bit contents of a
register pair(such as BC)can be incremented or decremented by 1. These
increment and decrement operations differ from addition and subtraction in an
important way. Table : 2

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Examples:-

Ex.1) ADC:
MVI A, 05H ;
MVI B, 03H ;
CMC ;
ADC B ;
Result: 05H + 03H + 1 = 09H
HLT ;

Ex.2) ADI:
MVI A, 05H ;
ADI 03H ;
HLT

Ex.3)ACI:
MVI A, 45H ;
STC ;
ACI 55H ;
HLT

Ex.4) DAD K
LXI H,1234
LXI D,4321
DAD D
HLT

Ex.5) SUB K
SUB K
MVI A,45
MVI B,25
SUB B
HLT

Ex.6) SUB M
SUB M
LXI H,2000
MVI A,45
MOV M,
MVI A,50
SUB M
HLT

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Ex.7) SBB B
MVI A,50
MVI B,30
CPI 00
SBB B
HLT

Ex.8) SUI 55K


MVI A,80
SUI 55
HLT
80H - 55H (128- 85) = 2BH (43 in decimal)

Ex.9) SBI 10H


MVI A, 60H ;
MVI B, 20H ;
SBI 10H ;
HLT ;
60H - 20H = (96-32) = 40H (64 in decimal)
40H - 10H = (64-10)=30H (48 in decimal)

3) Control Instructions

⮚ Microprocessors are electronic devices that process digital information using instructions
stored in memory. Machine control instructions are a type of instruction that control
machine functions such as Halt, Interrupt, or do nothing. These instructions alter the
different type of operations executed in the processor. In this article, we will discuss the
various types of machine control instructions found in microprocessors and their
significance in controlling Thee microprocessor's operations.

Types of Machine Control Instructions:

The following are the types of Machine control instructions:

⮚ 1.NOP (No operation): NOP is used when no operation is performed. It is commonly used to fill
in time delay or to delete and insert instructions while troubleshooting. During the execution of
NOP, no flags are affected.

⮚ 2. HLT (Halt):HLT is used to stop the execution of the program temporarily. The microprocessor
finishes executing the current instruction and halts any further execution. The contents of the
registers are unaffected during the HLT state. HLT can be used to enter a wait state in which the
microprocessor waits for a specific event to occur before resuming execution.

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

⮚ 3. DI (Disable interrupts):DI is used when the execution of a code sequence cannot be


interrupted. For example, in critical time delays, this instruction is used at the beginning of
the code and the interrupts are enabled at the end of the code. The TRAP interrupt cannot
be disabled.

⮚ 4. EI (Enable interrupts):EI is used to enable interrupts after a system reset or the


acknowledgement of an interrupt. The Interrupt Enable flip-flop is reset, thus disabling the
interrupts.

⮚ 5. SIM (Set interrupt mask):SIM is used for the implementation of different interrupts of
8085 microprocessor like RST 7.5, 6.5, and 5.5 and also serial data output. It does not affect
the TRAP interrupt.

⮚ 6. RIM (Reset interrupt mask):RIM is a multipurpose instruction used to read the status
of 8085 interrupts 7.5, 6.5, 5.5, and to read serial data input bit.

Table : 3

4) Logical Instruction

⮚ Logical instructions in the 8085 microprocessor are a set of instructions that perform logical
operations on data in registers and memory. Logical operations are operations that
manipulate the bits of data without affecting their numerical value. These operations include
AND, OR, XOR, and NOT.

The logical instructions in the 8085 microprocessor include:

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

⮚ ANA – Logical AND: This instruction performs a logical AND operation between the
accumulator and a specified register or memory location, and stores the result in the
accumulator. For example, the instruction “ANA B” performs a logical AND operation
between the contents of the accumulator and the contents of the B register.

⮚ ORA – Logical OR: This instruction performs a logical OR operation between the
accumulator and a specified register or memory location and stores the result in the
accumulator. For example, the instruction “ORA C” performs a logical OR operation
between the contents of the accumulator and the contents of the C register.

⮚ XRA – Logical XOR: This instruction performs a logical XOR operation between the
accumulator and a specified register or memory location, and stores the result in the
accumulator. For example, the instruction “XRA M” performs a logical XOR operation
between the contents of the accumulator and the contents of the memory location pointed
to by the HL register.

⮚ CPL – Logical Complement: This instruction performs a logical complement operation on


them contents of the accumulator. This operation flips all the bits of the accumulator,
effectively reversing its value.

⮚ CMA – Complement Accumulator: This instruction performs a bitwise complement


operation on the contents of the accumulator. This operation flips all the bits of the
accumulator,
effectively reversing its value.

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Table : 4
Ex.1) CMP
LXI H,2000
MVI A,50
MVI M,45
CMP M
HLT
Ex.2) CPI
MVI A,50
CPI 45
HLT

Ex.3) ANA
LXI H,2000
MVI A,55
MOV M,A
MVI A,AA
ANA M
HLT

Ex.4) ANI
MVI A,AAH
ANI55H
HLT

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Ex.5) XRA
LXI H,2000
MVI A,5A
MOV M,A
MVI A,A3
XRA M
HLT

Ex.6) XRI
MVI A,AAH
XRI 55H
HLT

5) Branching Instruction
● Branching instructions refer to the act of switching execution to a different
instruction sequence as a result of executing a branch instruction. The three types
of branching instructions are:

● Jump (unconditional and conditional)

● Call (unconditional and conditional)

● Return (unconditional and conditional)

Branching instructions refer to the act of switching execution to a different instruction sequence
as a result of executing a branch instruction.

The three types of branching instructions are:


Jump (unconditional and conditional)
Call (unconditional and conditional)
Return (unconditional and conditional)

⮚ 1.Jump Instructions – The jump instruction transfers the program sequence to the
memory address given in the operand based on the specified flag. Jump instructions are 2
types: Unconditional Jump Instructions and Conditional Jump Instructions.

(a) Unconditional Jump Instructions: Transfers the program sequence to the described memory
address.

(b) Conditional Jump Instructions: Transfers the program sequence to the described memory
address only if the condition in satisfied.

⮚ 2.Call Instructions – The call instruction transfers the program sequence to the memory
address given in the operand. Before transferring, the address of the next instruction after
CALL is pushed onto the stack. Call instructions are 2 types: Unconditional Call

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Instructions and Conditional Call Instructions.

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

(a) Unconditional Call Instructions: It transfers the program sequence to the memory address given
in the operand.

(b) Conditional Call Instructions: Only if the condition is satisfied, the instructions executes.

⮚ 3.Return Instructions – The return instruction transfers the program sequence from the
subroutine to the calling program. Return instructions are 2 types: Unconditional Jump
Instructions and Conditional Jump Instructions.
(a) Unconditional Return Instruction: The program sequence is transferred unconditionally from
the subroutine to the calling program.
⮚ Conditional Return Instruction: The program sequence is transferred unconditionally
from the subroutine to the calling program only is the condition is satisfied

Table : 5

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

EXPERIMENTNO.3

Objective(s):

To familiarize the students with moving data through instruction in GNU8085

Outcome:

The students will be able to implement and use data transfer program in GNU 8085 simulator

Problem Statement:

Write an assembly language code in GNUsim8085 to implement data transfer instruction

Background Study:

Data transfer instructions are the instructions that transfer data in the microprocessor. They are also called
copy instructions. Here is the following is the table showing the list of logical instructions:

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Code (Student Work Area):


Aim: Write an assembly code in GNU sim 8085 to implement data

Code:

LDA 2011
MOV B,A
LDA 2010
ADD B
STA 3010
HLT
#ORG 2010
#DB 04H,05H

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Figure : 4

EnrollmentNo:2403031087106
ComputerOrganizationandArchitecture
Lab Manual (303108254) 2024-2025

Timing Diagram:

Figure : 5
Instruction: -
● LDA : The contents of a memory location, specified by a 16-bit address in the operand, are copied
to the accumulator.
● MOV : This instruction copies the contents of the source register into the destination register
without any alteration.
● STA : The contents of the accumulator are copied into the memory location specified by the
operand.
● HTL : The CPU finishes executing the current instruction and stops further execution. An interrupt
or reset is necessary to exit from the halt state.

EnrollmentNo:2403031087106

You might also like