Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
bartleby
Concept explainers
Question
Im having trouble with this problem in writing a masm code for assembly language.
Transcribed Image Text:A- Write an assembly code to check if a number is falling within the range j...k (inclusive).
Ask the user to enter both ranges j, K and the number num you want to check. Output
the suitable message based on the situation
Within the range
Outside the range
Always prompt the user to enter a value using a suitable message.
For example (multiple runs)
Enter J - beginning of the range: 3
Enter K – end of the range: 15
Enter the value you want to check: 6
6 is within the range 3 to 15
Enter J - beginning of the range: 6
Enter K – end of the range: 15
Enter the value you want to check: 6
6 is within the range 6 to 15
Enter J - beginning of the range: 6
Enter K – end of the range: 15
Enter the value you want to check: 16
16 is outside the range 6 to 15
Activate Windo
Go to Settings to act
Italic is the output, red is the user's input.
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
This is a popular solution
bartleby
Trending nowThis is a popular solution!
bartleby
Step by stepSolved in 3 steps with 2 images
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Assume we are using an unknown assembly language, without finding out what assembly language it is, try to figure out what these codes are going to do by GUESSING, and express them in high-level language such as Java or C. Code group 1: MOV R1, 0 LABLE1 ............ ADD R1, 1 CMP R1, 5 JLE LABLE1 Code group 2: MOV R1, 1 LABEL2 ................... CMP R1, 10 JGE LABEL2 Code group 3: JMP LABEL3 LABEL4 ................. LABEL3 CMP R1, 1 JE LABEL4arrow_forward8. Write the following code segment in MARIE's assembly language: if X <= Y then Y = Y - 1; else if X != Z then Y = Y + 1; else Z = Z - 1;arrow_forwardWhich of VLIW and superscalar is more challenging for compilers to implement? What kind of architecture makes it hardest for compilers to function? Why?arrow_forward
- Convert just the following routine into PEP/9 assembly language: void adjust(int& num, int value) { if (num < 0) { num += value; } else { num -= value; } }arrow_forwardComputer Science Please answer this question in assembly language with .asm extension. The code given in 99Heater.asm file is: ; ===== Heater and Thermostst on Port 03 ==========================; ===== 99Heater.asm ==============================================; ===== Heater and Thermostst on Port 03 ========================== MOV AL,0 ; Code to turn the heater off OUT 03 ; Send code to the heater IN 03 ; Input from Port 03 AND AL,1 ; Mask off left seven bits JZ Cold ; If the result is zero, turn the heater on HALT ; Quit Cold: MOV AL,80 ; Code to turn the heater on OUT 03 ; Send code to the heater END; ================================================================= Fix the program 99Heater.asm so that the temperature will stay at 21 oC. Please solve the question in assembly language. I will definitely give you THUMBS UP.arrow_forwardIs it conceivable for a compiler to generate output for the micro architecture level instead of for the ISA level? Discuss the pros and cons of this proposal.arrow_forward
- Take two numbers as input, multiply them, print the message "The product is" and then display the result in the next line. Please complete it with assembly language that can run on "emu8086". Sample Execution 1 (1st input) 2 (2nd input) The product is 2arrow_forwardWrite a short program that demonstrates the use of MOV instruction in assembly language?arrow_forwardConvert this following C++ code below to easy68k assembly language: int sum = 0; int c =1; for (unsigned short i = 0; i <= 10; i++) { if (c == 1 ) { sum += i; c = 0; } else { c = 1; } }arrow_forward
- On modern processors, what proportion of the time can a good compiler produce better code than an assembly language programmer? What is the purpose?arrow_forwardWrite a code segment in MARIE assembly language to do the following: If X<Y, then X=16*X; Else Y=16*X+Y. To call a subroutine which will do TEMP=16*X, and try to minimize the number of instructions when you write the subroutine.arrow_forwardwrite an assembly language code for Tic tac toe using emu8086 and its documentationarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education