![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx4d1GXrchDkQUNqnzA2v_k4KwF6R4zb9LgwHoPpkO9xEKqeqD0NhIklKh6WnRzPgi7pW3tmbTQJHgeFs9zzd8hsfi5rGZ80Pa6M1WpcWyZAzlsTDJY3PcD61zfNg-rFIE32CocWMJA3g/s320/0503001331.jpg)
In my Introduction to Microprocessors class my group and I was given a project in our lab to simulate a Casino Slot Machine Game. The slot machine was programmed using Code Warrior Software in assembler language. We used a MCU Projectboard with a MC9S12DT256B Microprocessor and a Freescale 'S12 Microcontroller Module to execute the program downloaded from the PC for demonstration.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiSqpWSVm2UqZz8fiJutQ7SqWYfecbZ4szmnrAEGJ0FJAcWbqAtf9EOsTdfpASv7aWOyp3vuoSYF2UV6WMzrLw0zE4bsxLjP6ayv458l45G9j1gvBvA6e_E00MMFrnrLlRZK0gsg48gb4/s320/0503001347.jpg)
Input: Prompt the user to place a bet (push button 1 of 4), one monetary unit is added at a time.
Processes: Check to see if the cash reserve is greater than the bet placed if so pull the lever (push button 1 of 4) to randomly generate numbers on each of the three wheels. If cash reserve is not greater than the bet placed, the game forces you to re-place a bet. Then pull the lever to randomly generate numbers on each of the three wheels. If the three wheels align to the jackpot value increment monetary units placed in the bet from the cash reserve. If the three wheels don’t align to the jackpot value then decrement the monetary units placed in the bet from the cash reserve.
Output: Display the randomly generated number for each wheel. If the cashing out (push button 1 of 4) is pressed then display the value of the cash reserve.
No comments:
Post a Comment