Question
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.
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 codeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started