KEMBAR78
Microprocessor Mini Project | PDF | Office Equipment | Computer Hardware
0% found this document useful (0 votes)
10 views7 pages

Microprocessor Mini Project

This mini project report details the implementation of a program to right shift eight-bit data by four bits using an 8085 microprocessor. It outlines the instructions used, the flowchart of the process, and the source code for the program. The project was conducted by students as part of their coursework under the supervision of Prof. Dr. Gajendra Sharma.

Uploaded by

sanusankalp2003
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)
10 views7 pages

Microprocessor Mini Project

This mini project report details the implementation of a program to right shift eight-bit data by four bits using an 8085 microprocessor. It outlines the instructions used, the flowchart of the process, and the source code for the program. The project was conducted by students as part of their coursework under the supervision of Prof. Dr. Gajendra Sharma.

Uploaded by

sanusankalp2003
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/ 7

Kathmandu University

Department of Computer Science and Engineering

Dhulikhel, Kavre

Mini Project Report

on

“Right Shifting of Data in Microprocessor”

[Course Code: COMP 231]

(For partial fulfillment of II Year/ II Semester in Computer Engineering)

Submitted By
Sankalp Acharya(02),Safal Gautam(19),Aviyan KC(24),Aayush Neupane(39)

Submitted To
Prof. Dr. Gajendra Sharma
Department of Computer Science and Engineering

Submission Date
24th​ Jan, 2025
Problem / Task

Write a program to shift an eight bit data four bits right. Assume that data is in
register C.
Instructions Used

1. MOV:
This instruction is used to copy the data from one place to another.

Examples:
MOV Rd, Rs​ (This instruction copies the content of Rs to Rd)
MOV M, Rs (This instruction copies the content of register Rs to memory
location pointed by HL Register)
MOV Rd, M (This instruction copies the content of memory location pointed
by the HL register to the register Rd)

2. RAR:
Each binary bit of the accumulator is rotated right by one position through the
Carry flag. Bit D0 is placed in the Carry flag, and the Carry flag is placed in
the most significant position D7. CY is modified according to bit D0.

3. HLT:
Terminate program execution.
Flow Chart

Figure 1: Project Flowchart


Procedure and Methods

To test out the working of our program we searched for an online simulator of 8085
microprocessor. We decided to use this website (​https://www.sim8085.com/​) to test
out our code and make sure if what we did was working correctly or not.

After studying and trying out the instructions for 8085 microprocessor, we observed
how instructions were being executed. So, then we finally got to a point when the
problem or task assigned to us was worked out.
Source Code

MOV A, C - Get the number in accumulator from register C


RAR - Rotate one bit of data to right
RAR - Rotate one bit of data to right
RAR - Rotate one bit of data to right
RAR - Rotate one bit of data to right
MOV C, A - Store the result in register C
HLT - Terminate program execution
Assembler Output

1 79 MOV A, C
2 1F RAR
3 1F RAR
4 1F RAR
5 1F RAR
6 4F MOV C, A
7 76 HLT

You might also like