Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Translate the following code into assembly language. Assume that X, Y, Z and i are 16-bit signed integers and X = 1, Y = 8,

image text in transcribed

image text in transcribed

image text in transcribed

Translate the following code into assembly language. Assume that X, Y, Z and i are 16-bit signed integers and X = 1, Y = 8, Z= 9, and i = 0. Also assume that val2, val3, and val4 are 16-bit signed integers and Val2 = 3, Val3 = 2, val4 = 11. while ((i 0) if (x = z) { X = x + 2 3 else X = X + i = i + 1 Here are the tables for conditional jumps. Jump based on flags. Mnemonic Description Flags JZ Jump if zero ZE=1 JNZ Jump if not zero ZE=0 JC Jump if carry CF = 1 JNC Jump if not carry CF=0 JO Jump it overflow OF =) JNO Jump if not overflow OF=0 JS Jump il signed SE=1 JNS Jump if not signed SF=0 JP Jump if panty (eren) PFT JNP Jump if not parity (oddy PF = 0 Jump based on Equality: Mnemonic JE JNE Description Jump if equal (leftOp = rightOp) Jump if not equal (leftop # rightOp) Jump if CX = 0 Jump if ECX = 0 Jump if RCX = 0 (64-bit mode) JCXZ JECXZ JRCXZ Jump based on Unsigned comparison. Mnemonic Description JA Jump if above (if leftop > righrop) JNBE JAE Jump if not below or equal (same as JA) Jump if above or equal (if leftop >= rightop) Jump il not below (same as JAE) JNB JB Jump if below if leftop 0) if (x = z) { X = x + 2 3 else X = X + i = i + 1 Here are the tables for conditional jumps. Jump based on flags. Mnemonic Description Flags JZ Jump if zero ZE=1 JNZ Jump if not zero ZE=0 JC Jump if carry CF = 1 JNC Jump if not carry CF=0 JO Jump it overflow OF =) JNO Jump if not overflow OF=0 JS Jump il signed SE=1 JNS Jump if not signed SF=0 JP Jump if panty (eren) PFT JNP Jump if not parity (oddy PF = 0 Jump based on Equality: Mnemonic JE JNE Description Jump if equal (leftOp = rightOp) Jump if not equal (leftop # rightOp) Jump if CX = 0 Jump if ECX = 0 Jump if RCX = 0 (64-bit mode) JCXZ JECXZ JRCXZ Jump based on Unsigned comparison. Mnemonic Description JA Jump if above (if leftop > righrop) JNBE JAE Jump if not below or equal (same as JA) Jump if above or equal (if leftop >= rightop) Jump il not below (same as JAE) JNB JB Jump if below if leftop

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

The Ultimate Guide To Make Money Online

Authors: Max Lane

1st Edition

1913397262, 978-1913397265

More Books

Students also viewed these Finance questions

Question

a. What is the immediate effect on the balance sheet? LOP8

Answered: 1 week ago

Question

What role(s) does your HR department take on?

Answered: 1 week ago

Question

Have they worked with a facilitator before, with what result?

Answered: 1 week ago