Complete the following tasks for the trial program. 1. Display your full name. 2. Display your...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Complete the following tasks for the trial program. 1. Display your full name. 2. Display your MMU student ID. 3. Allow user input with four decimal digits in a range of 0000 to 2500. The digits signify energy consumed in a certain month in kWh. 4. Calculate the charges according to the following tariff rate: Tariff Category First 1000 kWh 1001kWh and beyond 5. Display the bill amount. Rate RM0.01/kWh RM0.20/kWh EXAMPLE 1 semulator screen (65x9 chars) Name: John Smith. Student ID: 12345678 Energy usage in kWh (enter decimal digits 0000 to 2500): 1500 Bill amount: RM110.00 Calculation: Bill amount = 1000 (1 cent) + 500 (20 cents) = 11000 cents = RM110.00 EXAMPLE 2 emulator screen (63x7 chars) Name: John Smith Student ID: 12345678 Energy usage in kWh (enter decimal digits 0000 to 2500): 2041 Bill amount: RM218.20 clear screen change font EXAMPLE 3 Calculation: Bill amount = 1000 (1 cent) + 1041 (20 cents) = 21820 cents = RM218.20 change font clear screen emulator screen (63x8 chars) Name: John Smith. Student ID: 12345678 Energy usage in kWh (enter decimal digits 0000 to 2500): 0385 Bill amount: RM3.85 change font Calculation: Bill amount = 385 (1 cent) = 385 cents = RM3.85 Additional material: Following is a code snippet to perform hexadecimal to decimal conversion and store the result in ASCII. You may use / modify it or use your own code. 1500 1500 = 5DCH CONT: FINISH: MOV AX DX, Hex decimal Stort in memory in ASCII format 700:0200 MOV CX.R. MOV MOV 88.10 D1:200H 30H [61].DL CMP_AX.0. INISH MOV OX 0 JMP CONT Final memory content: Random Access Memory A screenshot halfway through first iteration: update 0700:0200 30 30 1 2 Initialize offset for memory location Initialize start of memory location Initialize divider to perform hex to dec conversion Quotient AX,Remainder = DX Convert to ASCII format Save ASCII code in memory 3 4 ¡Check if quotient is zero ¡Ensure DX=0 for the next iteration 05 ES SPIFFE P ASCII Character 0 table 31 00 teavitual devices Hex 30 31 32 33 34 00000h 00000h ASCII Character 5 6 7 8 9 0051 Hex 35 36 37 38 39 Complete the following tasks for the trial program. 1. Display your full name. 2. Display your MMU student ID. 3. Allow user input with four decimal digits in a range of 0000 to 2500. The digits signify energy consumed in a certain month in kWh. 4. Calculate the charges according to the following tariff rate: Tariff Category First 1000 kWh 1001kWh and beyond 5. Display the bill amount. Rate RM0.01/kWh RM0.20/kWh EXAMPLE 1 semulator screen (65x9 chars) Name: John Smith. Student ID: 12345678 Energy usage in kWh (enter decimal digits 0000 to 2500): 1500 Bill amount: RM110.00 Calculation: Bill amount = 1000 (1 cent) + 500 (20 cents) = 11000 cents = RM110.00 EXAMPLE 2 emulator screen (63x7 chars) Name: John Smith Student ID: 12345678 Energy usage in kWh (enter decimal digits 0000 to 2500): 2041 Bill amount: RM218.20 clear screen change font EXAMPLE 3 Calculation: Bill amount = 1000 (1 cent) + 1041 (20 cents) = 21820 cents = RM218.20 change font clear screen emulator screen (63x8 chars) Name: John Smith. Student ID: 12345678 Energy usage in kWh (enter decimal digits 0000 to 2500): 0385 Bill amount: RM3.85 change font Calculation: Bill amount = 385 (1 cent) = 385 cents = RM3.85 Additional material: Following is a code snippet to perform hexadecimal to decimal conversion and store the result in ASCII. You may use / modify it or use your own code. 1500 1500 = 5DCH CONT: FINISH: MOV AX DX, Hex decimal Stort in memory in ASCII format 700:0200 MOV CX.R. MOV MOV 88.10 D1:200H 30H [61].DL CMP_AX.0. INISH MOV OX 0 JMP CONT Final memory content: Random Access Memory A screenshot halfway through first iteration: update 0700:0200 30 30 1 2 Initialize offset for memory location Initialize start of memory location Initialize divider to perform hex to dec conversion Quotient AX,Remainder = DX Convert to ASCII format Save ASCII code in memory 3 4 ¡Check if quotient is zero ¡Ensure DX=0 for the next iteration 05 ES SPIFFE P ASCII Character 0 table 31 00 teavitual devices Hex 30 31 32 33 34 00000h 00000h ASCII Character 5 6 7 8 9 0051 Hex 35 36 37 38 39
Expert Answer:
Answer rating: 100% (QA)
PART A and PART B both these parts basically require a string being printed so they have been made ... View the full answer
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these programming questions
-
Complete the following tasks for the trial program. 1. Display your full name. 2. Display your MMU student ID. 3. Allow user input with four decimal digits in a range of 0000 to 2500. The digits...
-
Complete the following tasks from the description given below: a) Using the fact summary, create a use case diagram that shows the actors and business processes that take place when an incoming...
-
1. The scalar potential and the vector potential are as follow. Find electric field, magnetic field, electric charge, and current distribution. V(rst)=0 1 A (rt)=- qt 4or 2. Find the self-inductance...
-
The task in this design project is to design an actuation system to power the ram's reciprocating motion in a small-size shaper. The power source of the actuation system is an AC motor with 0.75 hp...
-
Win32 does not have signals. If they were to be introduced, they could be per process, per thread, both, or neither. Make a proposal and explain why it is a good idea.
-
In a criminal trial, the prosecution seeks to prove that the defendant, Calvin Broadus robbed a store. There was a witness named Christopher Wallace who told a police officer named Jermaine Cole that...
-
Describe the hiring decision of a perfectly discriminating monopsonist and of a nondiscriminating monopsonist. In what sense do monopsonists exploit workers?
-
Consider the data shown in Table 12E.1. The target value for this process is 200. (a) Set up an integral controller for this process. Assume that the gain for the adjustment variable is g = 1.2 and...
-
Complete a regression analysis to determine total annual fixed and variable costs using the sales revenue and wage costs shown below. Sales Revenue Wage Costs January 24,900 11,300 February 24,200...
-
[5] A marksman is firing a pistol at a 5 cm diameter, circular bullseye some distance away. The center of the target is considered (0, 0). This marksman pulls a little to the right (positive x) and a...
-
1. Two banks want to trade a 6x24 month forward rate agreement. The continuously compounded spot rates are: 6 months: 5%, one year: 5.1%, 18 months: 5.4%, and two years: 5.5%, all stated as annual...
-
Before reading the analysis of Table 9.2, calculate the contribution made by each product, work out the break-even point of each, and then explore the effect on the break-even point of: (a) changes...
-
Write down two products or services where the pricing might be based on cost plus a percentage to cover profits. Write down two products or services where the prices are determined in a highly...
-
The following features are advertised by SAGE as being available within its job costing software module. Is this right for me? l Keep track of job-specific information including job and customer...
-
Compare the control account of Table 7.5 with the wages account of Table 7.3 to satisfy yourself that they are the same. Then satisfy yourself that the separate job accounts in Table 7.5 add up to...
-
Clorox is the global leader in the production of bleach. Clorox also makes laundry and cleaning items (Formula 409, Pine-Sol, Tilex), cat litter (Fresh Step), car-care products (Armor All, STP), the...
-
We want to make an industrial flashlight to be used in the salt water of the Dead Sea with a refractive index ne = 1.375. This lamp must be designed with a plano-convex lens made of glass with an...
-
Write out the formula for the total costs of carrying and ordering inventory, and then use the formula to derive the EOQ model. Andria Mullins, financial manager of Webster Electronics, has been...
-
Is it possible to use both a WHERE clause and a HAVING clause in the same SQL SELECT statement? If so, what are the different purposes of these two clauses?
-
What is the average Read score for all students? What are the minimum and maximum Read scores? Based on the relations shown in Figure 6-12. The database tracks an adult literacy program. Tutors...
-
Contrast the following terms: a. Transient data; periodic data b. Data warehouse; data mart; operational data store c. Reconciled data; derived data d. Fact table; dimension table e. Star schema;...
-
To what amount will the following investments accumulate? a. $6,000 invested for 12 years at 12 percent compounded annually b. $7,500 invested for 8 years at 8 percent compounded annually c. $6,400...
-
What is the present value of the following future amounts? a. $805 to be received 10 years from now discounted back to the present at 10 percent b. $376 to be received 5 years from now discounted...
-
At what annual rate would the following have to be invested? a. \($820\) to grow to \($1,988.12\) in 13 years b. \($320\) to grow to \($423.10\) in 6 years c. \($57\) to grow to \($290.30\) in 18...
Study smarter with the SolutionInn App