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

 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,

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!