
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
Concept explainers
Question
Implement the following pseudocode in assembly language. Use short-circuit evaluation
and assume that val1 and X are 32-bit variables.
if( val1 > ecx ) AND ( ecx > edx )
X = 1
else
X = 2;
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
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
- write in intel 8086arrow_forwardImplement the following expression in masm x86 assembly language: ECX = –(val3 - val1) + (-val4 + val2) + 3 a screenshot is needed - Assume that val1 is 16-bit variable, val2 is 32-bit variable, val3 is 8-bit variable, and val4 is 8-bit variable. - You need to implement the expression the way it is provided, you cannot do any reduction on the expression while implementing it.- Initialize val1 with 12 (decimal), val2 with 9 (decimal), val3 with 2 (decimal), val4 with 20 (decimal),- You are NOT allowed to update the values stored in val1, val2, val3 and val4- Use mov, add, sub, movsx, movzx, or neg instructions whenever needed.- Use the debugger to verify your answer the format should be .data .code main proc main ENDP END mainarrow_forwardwrite an assembly program that defines two arrays of bytes that contain 4 elements each, one array will store odd number and the other will store even number . read eight elements from the user and store them based on whether they are odd or even p.s: program is coded in 8086arrow_forward
- Implement the following expression in assembly language: EDX = (val3 + val4) - (val2 - val1) - (5/3)*7 Assume that val1, val2, val3 and val4 are 16-bit integer variables You need to implement the expression the way it is provided, you cannot do any reduction on the expression while implementing it. Initialize val1 with 120 (hexadecimal), val2 with 39 (hexadecimal), val3 with 20 (hexadecimal) and val4 with 27 (hexadecimal) You are NOT allowed to update the values of any variables. Use ONLY mov, add, sub, movzx, movsx, or neg instructions whenever needed. Use the debugger to verify your answer.arrow_forwardGiven the following code segment in C++, please write its corresponding 68K assembly code. 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_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
- computer fundamental-hack assembly languagearrow_forwardIn this implementation, each instruction is provided with its own data independently of how other instructions acquire theirs. We insert a(n): A Multiple Input/Output B The Case of Many Pieces of Information or Directions C Unique Information Only One D Several Insts From Onearrow_forwardImplement the following expression in assembly language: result = (val3 + val4) - (val1 – val2) – (30*4)/55- Assume that result,val1, val2, val3 and val4 are 16-bit integer variables- You need to implement the expression the way it is provided, you cannot do any reduction on theexpression while implementing it.- Initialize val1 with 134 (hexadecimal), val2 with 139 (hexadecimal), val3 with 67(hexadecimal) and val4 with 47 (hexadecimal)- You are NOT allowed to update the values of any variables.- Use ONLY mov, add, sub, movzx, movsx, or neg instructions whenever needed.- Use the debugger to verify your answerarrow_forward
- Implement the following expression in assembly language: result = (val3 + val4) (vall - val2) (30*4)/55 Assume that result, vall, val2, val3 and val4 are 16-bit integer variables You need to implement the expression the way it is provided, you cannot do any reduction on the expression while implementing it. - Initialize vall with 134 (hexadecimal), va12 with 139 (hexadecimal), val3 with 67 (hexadecimal) and val4 with 47 (hexadecimal) -arrow_forwardWrite an assembly language program which takes two integers, A and B, and computes the following expressions. You must use the same variables for A and B throughout all three expressions. Using GNU Assembler x86 AT&T Syntax. Include a MakeFile and document all code. 1) A * 5 2) (A + B) - (A / B) 3) (A - B) + (A * B)arrow_forwardE In the following code block(Reference:Q11), you will a set of assembly instructions with corresponding line numbers (line numbers are for informational purpose only and they are not part of the source code). 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 mov edx, 5 dec ecx jmp LABEL1 mov eax, 1 LABEL1: mul edx jmp ecx mov edx, 0678h sub edx, eax jmp DWORD PTR [edx] neg ebx add ecx, ebx mov eax, 0 For each of the conditions/scenario listed below, indicate the corresponding line number (that cause or is associated with the condition/scenario). Enter 0 (Zero) if the condition is not caused by the block of code. 1) Memory indirect jump: type your answer... type your answer... type your answer... type your answer... 2) Register indirect jump: 3) Relative short jump: type your answer... 5) Two's complement type your answer... 4) Relative near jump: 6) Unreachable codearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education