Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write legibly. LAB 2 -Directives, Addressing Modes and Basic Arithmetic Programming The purpose of this lab is to introduce you to basic programming with

Please write legibly.

image text in transcribed

image text in transcribed

LAB 2 -Directives, Addressing Modes and Basic Arithmetic Programming The purpose of this lab is to introduce you to basic programming with the 68HCS12 using assembler directives and arithmetic instructions. You will need to study the directives and arithmetic operation instructions. PRE-LAB: (This must be completed before coming to the lab and shown to the lab instructor at the start of the lab session) 1- Prepare the instruction sequence and the first draft of the program 2- Calculate the expected results (Sum, Average, and Difference) by hand. PROGRAMMING ASSIGNMENT: Write a fully-commented program for the HC12 board, including appropriate directives and labels for memory operands and constants, called Arith.asm. The program should do the following: .The program should start execution at address $1000. stored in contiguous memory at locations S2000->$2004 Calculate the unsigned Sum of the five numbers and store this word at memory location $2010 $2011. Calculate the unsigned Average of the 5 numbers and store this byte in memory after the sum. Subtract the Average from the Sum and store the unsigned Difference (word) in memory after the Average. LAB 2 -Directives, Addressing Modes and Basic Arithmetic Programming The purpose of this lab is to introduce you to basic programming with the 68HCS12 using assembler directives and arithmetic instructions. You will need to study the directives and arithmetic operation instructions. PRE-LAB: (This must be completed before coming to the lab and shown to the lab instructor at the start of the lab session) 1- Prepare the instruction sequence and the first draft of the program 2- Calculate the expected results (Sum, Average, and Difference) by hand. PROGRAMMING ASSIGNMENT: Write a fully-commented program for the HC12 board, including appropriate directives and labels for memory operands and constants, called Arith.asm. The program should do the following: .The program should start execution at address $1000. stored in contiguous memory at locations S2000->$2004 Calculate the unsigned Sum of the five numbers and store this word at memory location $2010 $2011. Calculate the unsigned Average of the 5 numbers and store this byte in memory after the sum. Subtract the Average from the Sum and store the unsigned Difference (word) in memory after the Average

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago