Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Work Write an assembly program (x8086) which is able to play a number game. The objective of the game is to guess the closest

Lab Work Write an assembly program (x8086) which is able to play a number game. The objective of the game is to guess the closest number to a random number chosen by the program. You must do all your work in an infinite loop. You can find the screenshots of possible outputs in the next page. 1. First you must get a number between 0-9 from user via emulator screen. If the input key is not a number then program must ask a number again. 2. In the game, there are two players. U is for user and C is for computer. The value of U is assigned by the entered value which is taken from user via Emulator Screen. The value of C is assigned by the program with a random number between 0-9. U and C values must be displayed on Seven Segment Display Output on the Emulation Kit. Hint: You can check INT 1Ah / AH = 00h to produce a random number. 3. There must be a second random number (R) to assign the winner that guesses the closest number to R. Random number must be displayed on ASCII LCD Display Output. 4. Then the program decides the winner and prints the result on Dot Matrix Display Output as U WINS or C WINS or ITS TIE. You can find the sample code for number values to use on Seven Segment Display Output and character values to use on Dot Matrix Display Output below: NUMBERS DB 00111111b, 00000110b, 01011011b, 01001111b, 01100110b, 01101101b, 01111101b, 00000111b, 01111111b, 01101111b DOTS_U_WINS DB 01111111b, 01000000b, 01000000b, 01000000b, 01111111b ;U DB 00000000b, 00000000b, 00000000b, 00000000b, 00000000b ; DB 01111111b, 00100000b, 00011000b, 00100000b, 01111111b ;W DB 00000000b, 00000000b, 01111111b, 00000000b, 00000000b ;I DB 01111111b, 00000100b, 00001000b, 00010000b, 01111111b ;N DB 01001111b, 01001001b, 01001001b, 01001001b, 01111001b ;S DB 00000000b, 00000000b, 00000000b, 00000000b, 00000000b ; DB 00000000b, 00000000b, 00000000b, 00000000b, 00000000b ; DOTS_C_WINS DB 00111110b, 01000001b, 01000001b, 01000001b, 00100010b ;C DB 00000000b, 00000000b, 00000000b, 00000000b, 00000000b ; DB 01111111b, 00100000b, 00011000b, 00100000b, 01111111b ;W DB 00000000b, 00000000b, 01111111b, 00000000b, 00000000b ;I DB 01111111b, 00000100b, 00001000b, 00010000b, 01111111b ;N DB 01001111b, 01001001b, 01001001b, 01001001b, 01111001b ;S DB 00000000b, 00000000b, 00000000b, 00000000b, 00000000b ; DB 00000000b, 00000000b, 00000000b, 00000000b, 00000000b ; DOTS_TIE DB 00000000b, 00000000b, 01111111b, 00000000b, 00000000b ;I DB 00000001b, 00000001b, 01111111b, 00000001b, 00000001b ;T DB 01001111b, 01001001b, 01001001b, 01001001b, 01111001b ;S DB 00000000b, 00000000b, 00000000b, 00000000b, 00000000b ; DB 00000001b, 00000001b, 01111111b, 00000001b, 00000001b ;T DB 00000000b, 00000000b, 01111111b, 00000000b, 00000000b ;I DB 01111111b, 01001001b, 01001001b, 01001001b, 01000001b ;E DB 00000000b, 00000000b, 00000000b, 00000000b, 00000000b ;

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 Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

What is the difference between partial and full mediation?

Answered: 1 week ago

Question

A 300N F 30% d 2 m Answered: 1 week ago

Answered: 1 week ago