Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) 2) 3) (4 marks) Write a sequence of directives for an HCS12 assembly language program that performs the following: a) Define an array called

image text in transcribed

1) 2) 3) (4 marks) Write a sequence of directives for an HCS12 assembly language program that performs the following: a) Define an array called Temperatures starting from memory location $2000 and initialize it with $FF, SB2, and $9. Each element is stored in a byte. b) Define a word variable called Counter and initialize it to zero. c) Define an uninitialized array, called "Speed, in the next 14 bytes. Each element is a byte. d) Define a string called Error_Msg and initialize it with "Please enter a number below 10". [1 marks] Write an instruction to set the content of the memory location $3000 to $3A. [3 marks] Write an instruction sequence to add 15 to the byte at the memory location $1000, and store the result at the memory location $3000. [3 marks) Write an instruction sequence to swap the 16-bit word stored at $3000 and $ 3001 with the 16-bit word stored at $2100 and $2101. [3 marks] Write an instruction sequence to subtract the byte number stored at $2000 from the byte number stored at $2001 and store the difference at $2002. [4 marks) Write an instruction sequence to add the content of the accumulator A to the 16- bit word stored at memory locations $2000 and $2001, and store the result at the memory locations $3000 and $3001. The number stored in B is signed. 4) 5) 6) 1) 2) 3) (4 marks) Write a sequence of directives for an HCS12 assembly language program that performs the following: a) Define an array called Temperatures starting from memory location $2000 and initialize it with $FF, SB2, and $9. Each element is stored in a byte. b) Define a word variable called Counter and initialize it to zero. c) Define an uninitialized array, called "Speed, in the next 14 bytes. Each element is a byte. d) Define a string called Error_Msg and initialize it with "Please enter a number below 10". [1 marks] Write an instruction to set the content of the memory location $3000 to $3A. [3 marks] Write an instruction sequence to add 15 to the byte at the memory location $1000, and store the result at the memory location $3000. [3 marks) Write an instruction sequence to swap the 16-bit word stored at $3000 and $ 3001 with the 16-bit word stored at $2100 and $2101. [3 marks] Write an instruction sequence to subtract the byte number stored at $2000 from the byte number stored at $2001 and store the difference at $2002. [4 marks) Write an instruction sequence to add the content of the accumulator A to the 16- bit word stored at memory locations $2000 and $2001, and store the result at the memory locations $3000 and $3001. The number stored in B is signed. 4) 5) 6)

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 Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

55. Show that g(t) tet cannot be a moment generating function.

Answered: 1 week ago