
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
Question
generate an masm x86 assembly language

Transcribed Image Text:-
BX=-val2 + 7- (- val3 + val1) + (5/4)*3
Assume that vall, val2, and val3 are 8-bit integer variables
Initialize vall with 12, val2 with 9, and val3 with 2
You are only allowed to use 16-bit registers to hold intermediate results, whenever needed.
Use mov, add, sub, movzx, movzx, or neg instructions whenever needed.
Use the debugger to verify your answer.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 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
- NAND2TETRIS HARDWARE SIMULATOR (HARDWARE DESCRIPTION LANGUAGE (HDL)) implement simplified Z80 Arithmetic and Logic Unit using the skeleton program below , also using the predifined gates which are in the images attached CHIP ALUcore { IN a[4], b[4], carryIn, sums, ands, xors, ors; OUT out[4], carryOut; PARTS: }arrow_forwardCompile the RISC-V assembly code for the following C code.arrow_forwardShow the assembly instruction for the following machine code, given in hexadecimal. Explain all fields in detail. 03A2F023arrow_forward
- Write a function in MIPS Assembly Language that computes the next state of a linear feedback shift register (LFSR) given the current state of the LFSR. The LFSR should satisfy the taps given by the following polynomial: x^15 + x^14 +1 Your function should take the state as a 32-bit input parameter and return a 32-bit output value. Your main program for the function should call your LFSR function for the following input states and print the output state: 0x00000001 0xdeadbeef 0x200214c8 0x00000000arrow_forwardFor a function with prototype long decode2(long x, long y, long z); GCC generates the following assembly code: 1 decode2: 2 subq %rdx, %rsi 3 imulq %rsi, %rdi 4 movq %rsi, %rax 5 salq $63, %rax 6 sarq $63, %rax 7 xorq %rdi, %rax 8 ret Parameters x, y, and z are passed in registers %rdi, %rsi, and %rdx. The code stores the return value in register %rax. Write C code for decode2 that will have an effect equivalent to the assembly code shown.arrow_forwardWhat is wrong with a MOV [BX],[DI] instruction?arrow_forward
- Please complete this on assembly lenguage. (irvine library x86) Read in x,y calculate 3x + 2y + xy – 10 = sum Data and variables product1, prodcuct2 ,.tproduct3 ,x,y, sum Calculate multiply 3 by x, 2 by y, and x by y Add procuct1 + product2 + product3, then subtract 10. Put result into sum Print product1, plus, product2, plus,product3, minus, 10, equals , sum Dw string dw string dw string dw string dwarrow_forwardDesign and implement the following Boolean functions: F=AC +BC' G=(A+B+C). (A' + C) using: a) Programmable Read Only Memory (PROM)arrow_forward
arrow_back_ios
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