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 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