Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Complete the following tasks for the trial program. 1. Display your full name. 2. Display your MMU student ID. 3. Allow user input with
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
Step by Step Solution
★★★★★
3.51 Rating (151 Votes )
There are 3 Steps involved in it
Step: 1
PART A and PART B both these parts basically require a string being printed so they have been made ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started