Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This project is assembly. What I need In this project, you are to write a HCS12 Assembly Language program which implements the bouncing bll game

This project is assembly. image text in transcribed
image text in transcribed
image text in transcribed
What I need
image text in transcribed
In this project, you are to write a HCS12 Assembly Language program which implements the "bouncing bll game with the IO.LED and IT keyboard components. The IO LED simulates an one-dimensional track, and the IT keyboard allows one to start, play and reset the game through the nterrupt mechanis An nterrupt IRQ) is generated when a key on the IT keyboard is pressed with a proper set-up 1 Components The IOLED component has eight LED's (7, 6, 5, 4, 3, 2, 1, 0) each of which is a possible ball location o the track. When the ball is at a certain location, the corresponding LED is lit red. At any time, no or only one LED must belt red. The left-most LED (7) and right-most LED (0) represent the left-end and right-end of track, respectively The keys in the IT keyboard are used to play/control the game. The keys 0 through 7 are the play keys. The key 8 is the start key, the key 9 is the stop key, the key A is the rsume key, and the key Bis the reset key. How these keys are to be used is described in Section 2 2 Operation Initially (after the execution of your program starts and before any key is pressed), all of the 8 LED's should be (stay) green. Once the start key is pressed, the ball starts from the location 4 and moves to the right. The initial speed of the ball is the base speed, So. Unless a key is pressed (after the ball starts to move), the ball continues to move at the base speed, being automatically bounced back fronm both ends (locations 0 and 7) of the track You may bounce back the b using a play key. When the bl is moving to the left and currently at the location K where 0 K), you must press the key K+1 before the ball reaches the location K+1 to bouce back the bal to the right. Similarly, when the ba is moving to the right and currently at the location K where 1 K7, you must press the key K-1 before the ball reaches the location K-1 to bound back the ball to the left. Whenever the bal is successfully bounced back by you, the speed of the ba is immediately increased by 50% of the base speed. . When you successfully bounce back the ball 8 times i a row, the bal speed is immediately reset back to the base speed. That is, the ball speed never becomes 5 times faster than the base speed. If you fail to bounce back the ba .e., press a play key too early or too late, the ball continues to move at the same (current) speed as if nothing happened. In this case, the ball speed is reset back to the base speed when the ball reaches either end (locations 0 or 7) of the track. When you miss (fail to bounce back) the b, you may try again (any number of times) before the ball reaches an end of the track In this project, you are to write a HCS12 Assembly Language program which implements the "bouncing bll game with the IO.LED and IT keyboard components. The IO LED simulates an one-dimensional track, and the IT keyboard allows one to start, play and reset the game through the nterrupt mechanis An nterrupt IRQ) is generated when a key on the IT keyboard is pressed with a proper set-up 1 Components The IOLED component has eight LED's (7, 6, 5, 4, 3, 2, 1, 0) each of which is a possible ball location o the track. When the ball is at a certain location, the corresponding LED is lit red. At any time, no or only one LED must belt red. The left-most LED (7) and right-most LED (0) represent the left-end and right-end of track, respectively The keys in the IT keyboard are used to play/control the game. The keys 0 through 7 are the play keys. The key 8 is the start key, the key 9 is the stop key, the key A is the rsume key, and the key Bis the reset key. How these keys are to be used is described in Section 2 2 Operation Initially (after the execution of your program starts and before any key is pressed), all of the 8 LED's should be (stay) green. Once the start key is pressed, the ball starts from the location 4 and moves to the right. The initial speed of the ball is the base speed, So. Unless a key is pressed (after the ball starts to move), the ball continues to move at the base speed, being automatically bounced back fronm both ends (locations 0 and 7) of the track You may bounce back the b using a play key. When the bl is moving to the left and currently at the location K where 0 K), you must press the key K+1 before the ball reaches the location K+1 to bouce back the bal to the right. Similarly, when the ba is moving to the right and currently at the location K where 1 K7, you must press the key K-1 before the ball reaches the location K-1 to bound back the ball to the left. Whenever the bal is successfully bounced back by you, the speed of the ba is immediately increased by 50% of the base speed. . When you successfully bounce back the ball 8 times i a row, the bal speed is immediately reset back to the base speed. That is, the ball speed never becomes 5 times faster than the base speed. If you fail to bounce back the ba .e., press a play key too early or too late, the ball continues to move at the same (current) speed as if nothing happened. In this case, the ball speed is reset back to the base speed when the ball reaches either end (locations 0 or 7) of the track. When you miss (fail to bounce back) the b, you may try again (any number of times) before the ball reaches an end of the track

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 Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago