Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hello sir , i just want the final answer i dont full answer, i promise to comment and like your solution, please answer all of

hello sir , i just want the final answer i dont full answer, i promise to comment and like your solution, please answer all of the question because theres no time post the qusteions anathoer time and i dont want the full answer,only the last answer but please solve all of question ,thank u image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

39 Naty Ed Marked out at 4.00 question 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 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, .... are 30H, 311, 39H, respectively. Service 01: MOV AH,01 Service 00 MOV AH,00 INT 16H INT 16H Service 01: When a key is pressed, ZP=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 AX, ODATA MOV DS, AX Again INT 16H JZ IZ Again MOV AHD 1 :00 JB Again CMP AL 39H Lut: MOV BX, CX CMP AL BX + Offset DATA1 , JAE Exit Exit MOV AX, BX + Offset DATA2] MOV AH, ACH , 4CH 10 DUP (?) INT 10H JA Again MOV CX 9 LOOP Lut 0,1,2,3,45,6,7,8,9 CMP AL,30H .CODE MOV OUTPUT, AX MOV AH 01 SUB AL 30H Question 39 Not yet answered Marked out of 4.00 Flag question 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 DATA2 DW 0, 1,8, 27, 64, 125, 216, 343, 512, 729 OUTPUT DB MOV AX, @DATA MOV DS, AX Again: INT 16H JZ Again MOV AH, O JB Again CMP AL, 39H Lut: MOV BX, CX CMP AL, [BX + Offset DATA1] JAE Exit Exit: MOV AX, [BX + Offset DATA2] MOV AH, 4CH 10 DUP (?) INT 16H JA Again MOV CX, 9 LOOP Lut 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 CMP AL, 30H .CODE MOV OUTPUT, AX MOV AH,01 SUB AL, 30H

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions