Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this lab is to program the MC8051 to add multi bytes two signed integers., To simplify our laboratory, we will assume three

image text in transcribed

The purpose of this lab is to program the MC8051 to add multi bytes two signed integers., To simplify our laboratory, we will assume three bytes long (24 bits) signed integers. Each of the three bytes will be defined in three consecutive code memory bytes using the "DB" assembler directive The program will store the answer in three consecutive data memory bytes starting at Ram address 40H. The program will also display the answer on PO, P1, and P2 staring with the LS Byte in PO. Port 3 pin O (P3.0) will be set if an overflow takes place, otherwise it will stay cleared. Three versions of the program will be implemented starting with all code included in one main program. The second implementation will employ two subroutines to make advantage of the repeated code blocks. The final implementation will utilize two Macros to reduce the size of the source program and improve its readability. Steps 1. First, configure your code and data memory. The "MAIN:" program starts at code memory location 30H. The first integer uses code memory locations 100H, 101H, and 102H in the Intel MC8051 little endian format. The second integer uses code memory locations 105H, 106H, and 107H

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How are passive investments classified for accounting purposes?

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago