There is a need to write a program which computes the cube of the number entered...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
There is a need to write a program which computes the cube of the number entered from the keyboard. The number can be any number between 0 and 9. For example, if the number entered from the keyboard is 4, the result should be computed as 43-64. If the entered character is not in between 0 and 9, the program should recheck the key press. The computation should be based on the LOOK-UP TABLE approach. The program should also store the result into the data segment area with variable named as "Output", Interrupt services 01 and 00 should be used to check key press and get the character, respectively. The ASCII codes of numbers 0, 1, ..9 are 30H, 31H, 39H, respectively. Service 01: MOV AH, 01 Service 00: MOV AH, 00 INT 16H INT 16H Service 01: When a key is pressed, ZF=0. Otherwise, ZF=1. Service 00: The ASCII code of key is stored into AL. Complete the following program to achieve this task. MODEL SMALL .DATA DATA1 DB DATA2 DW 0, 1, 8, 27, 64, 125, 216, 343, 512, 729 OUTPUT DB MOV DS, AX Time left 0:46:17 Again: INT 16H JZ Again MOV AH, O JB Again CMP AL, 39H There is a need to write a program which computes the cube of the number entered from the keyboard. The number can be any number between 0 and 9. For example, if the number entered from the keyboard is 4, the result should be computed as 43-64. If the entered character is not in between 0 and 9, the program should recheck the key press. The computation should be based on the LOOK-UP TABLE approach. The program should also store the result into the data segment area with variable named as "Output", Interrupt services 01 and 00 should be used to check key press and get the character, respectively. The ASCII codes of numbers 0, 1, ..9 are 30H, 31H, 39H, respectively. Service 01: MOV AH, 01 Service 00: MOV AH, 00 INT 16H INT 16H Service 01: When a key is pressed, ZF=0. Otherwise, ZF=1. Service 00: The ASCII code of key is stored into AL. Complete the following program to achieve this task. MODEL SMALL .DATA DATA1 DB DATA2 DW 0, 1, 8, 27, 64, 125, 216, 343, 512, 729 OUTPUT DB MOV DS, AX Time left 0:46:17 Again: INT 16H JZ Again MOV AH, O JB Again CMP AL, 39H
Expert Answer:
Answer rating: 100% (QA)
MODEL SMALL DATA DATA1 DB 0123456789 DATA2 DW 01827641252163435... View the full answer
Related Book For
Posted Date:
Students also viewed these computer engineering questions
-
There is a need to write a program which computes the cube of the number entered from the keyboard. The number can be any number between 0 and 9. For example, if the number entered from the keyboard...
-
There is a need to write a program which computes the cube of the number entered from the keyboard. The number can be any number between 0 and 9. For example, if the number entered from the keyboard...
-
There is a need to develop a software for tracking library loan records. Library barrowers may barrow library items once they have registered to the system by providing their name. address and phone...
-
Solve the following initial value problem. y" + 2y + 17y=0; y(0) = 1, y'(0) = -1
-
Find the 90% confidence interval for the variance and standard deviation of the ages of seniors at Oak Park College if a sample of 24 students has a standard deviation of 2.3 years .Assume the...
-
Two steel tubes are shrink-fitted together where the nominal diameters are 1.50, 1.75, and 2.00 in. Careful measurement before fitting revealed that the diametral interference between the tubes to be...
-
Internal auditors focuson-;external auditors are more concerned with -.(Fill in the blanks.) a. financial statements; risk assesment b. company policies and procedures; financial statements C....
-
Shelby Corporation purchases 90% of the outstanding stock of Borner Company on January 1, 2011, for $603,000 cash. At that time, Borner Company has the following stockholders equity balances: common...
-
The adjusted trial balance of Personal Financial Planners appears below. Using the information from the adjusted trial balance, you are to prepare for the month ending December 3 1 , 2 0 2 0 : 1 . an...
-
Lamson Sauces produces a hot sauce using tomatoes and chili peppers. Lamson developed the following standard cost sheet: On March 2, Lamson produced a batch of 32,000 ounces with the following actual...
-
In this exercise, you will compute the correlation function for Random Processes that contain sinusoidal functions of time. X(t) = Acos( t) - Bsin(wit) where A and B are two random variables. Find...
-
Derive Equation 2.27. \(\begin{aligned} & Q_{11}=\frac{S_{22}}{S_{11} S_{22}-S_{12}^2}=\frac{E_1}{1-v_{12} v_{21}} \\ & Q_{12}=-\frac{S_{12}}{S_{11} S_{22}-S_{12}^2}=\frac{v_{12} E_2}{1-v_{12}...
-
Derive Equation 3.59. \(G\left[\frac{\partial^2 w}{\partial x^2}+\frac{\partial^2 w}{\partial y^2} ight]=0 \tag{3.59}\)
-
When is a duty to disclose fraud to parties other than the client's senior management and its audit committee most likely to exist? a. When the amount is material. b. When the fraud results from...
-
Audit evidence can come in different forms with different degrees of reliability. Which of the following is the most persuasive type of evidence? a. Bank statements obtained from the client. b....
-
Derive Equation 3.47. \(\frac{1}{G_{12}}=\frac{v_{\mathrm{f}}}{G_{\mathrm{f} 12}}+\frac{v_{\mathrm{m}}}{G_{\mathrm{m}}} \tag{3.47}\)
-
Create a training program. It should cover the following: Needs Assessment Learning Objectives Learning Style Delivery Style Audience Consideration Timeline Communication of Training Measuring...
-
Access the Federation of Tax Administrators Internet site at www. taxadmin.org/state-tax-forms and indicate the titles of the following state tax forms and publications: a. Minnesota Form M-100 b....
-
In problem, graph the function f by starting with the graph of y = x 2 and using transformations (shifting, compressing, stretching, and/or reflection). If necessary, write f in the form f(x) = a(x ...
-
Without solving, determine the character of the solutions of each equation in the complex number system. 3x 2 3x + 4 = 0
-
Evaluate the expression.
-
Typical accounting specialists with designations include all of the following except: a. Certified Financial Analyst (CFA) b. Certified Public Accountant (CPA) c. Certified Bookkeeper (CB) d....
-
The Financial Accounting Standards Board is the: a. Governmental group that sets financial accounting principles. b. International group that identifies preferred international accounting principles....
-
Generally accepted accounting principles do not aim to make information in financial statements: a. Reasonable b. Relevant c. Reliable d. Comparable
Study smarter with the SolutionInn App