Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introduction Assembly language differentiates between equates (constants) and data definitions (variables) by the use of assembler directives. The EQU directive is used to define constants,

Introduction Assembly language differentiates between equates (constants) and data definitions (variables) by the use of assembler directives. The EQU directive is used to define constants, while DS.B is used to define a byte variable and DS.W is used to define a two byte (word) variable. Constants do not use any memory, while variables use memory to store changing values. It is up to the programmer to decide which is appropriate. Once the program is free of errors, it will be executed using the actual HCS12 microprocessor located on the S12UB hardware.image text in transcribed

PROGRAMMING ASSIGNMENT: This lab will explore assembly language with the use of data definitions as well as equates. The following requirements need to be addressed: o o o o o A non-code specific Flowchart Proper commenting and header A program LISTING Constants stored using EQUATES Variables stored using data definitions Section 1: The following decimal constant values need to be added together in a variable called 'result': -22, 45, 68, -100, 75,-9, -44, 39, -87 Section 2: The following decimal constant values need to be averaged into a variable called 'result': -47, 125, 62, 80, -3, -59, 89, -12 Section 3: The following decimal constant values need to be added together in a variable called 'result: 543,-2449,-5630, 31930, 1045, -20877 Create the above list of constants calling them 'const1 through constx'. Create a variable that reserves memory called 'result'. Create a flowchart and then code for the execution of the above problem. Predict ahead of time the anticipated result, verifying that the program and the prediction match. Once the program is verified to work correctly, use a 'breakpoint' to quickly execute your code. PROGRAMMING ASSIGNMENT: This lab will explore assembly language with the use of data definitions as well as equates. The following requirements need to be addressed: o o o o o A non-code specific Flowchart Proper commenting and header A program LISTING Constants stored using EQUATES Variables stored using data definitions Section 1: The following decimal constant values need to be added together in a variable called 'result': -22, 45, 68, -100, 75,-9, -44, 39, -87 Section 2: The following decimal constant values need to be averaged into a variable called 'result': -47, 125, 62, 80, -3, -59, 89, -12 Section 3: The following decimal constant values need to be added together in a variable called 'result: 543,-2449,-5630, 31930, 1045, -20877 Create the above list of constants calling them 'const1 through constx'. Create a variable that reserves memory called 'result'. Create a flowchart and then code for the execution of the above problem. Predict ahead of time the anticipated result, verifying that the program and the prediction match. Once the program is verified to work correctly, use a 'breakpoint' to quickly execute your code

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 Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions