Question

Write the following code segment in MARIE's assembly language: if x <= y then Y =...

Write the following code segment in MARIE's assembly language: if x <= y then Y = Y+1; else if x! =x then Y= Y -1; else z=z+1

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
In MIPS assembly, write an assembly language version of the following C code segment: int A[100],...
In MIPS assembly, write an assembly language version of the following C code segment: int A[100], B[100]; for (i=1; i < 100; i++) { A[i] = A[i-1] + B[i]; }
(MIPS Assembly Language): Write the following sequence of code using *native* MIPS instructions: x = x...
(MIPS Assembly Language): Write the following sequence of code using *native* MIPS instructions: x = x - y[0] + y[1]; In memory x, y are stored beginning at 0x010000cc. Use registers $s1 for x,  and $s2 for the base address of y. Make sure your code includes all necessary declarations such that it could run in SPIM.
Implement the following C++ code in assembly language. Substitute calls to WriteString for the printf() function...
Implement the following C++ code in assembly language. Substitute calls to WriteString for the printf() function calls: double X; double Y; if(x<Y) printf("X is lower\n"); else printf("X is not lower\n");
IV.Translate the following C code fragment to ARM assembly instructions. Assume t, x, y, and z...
IV.Translate the following C code fragment to ARM assembly instructions. Assume t, x, y, and z are stored in registers r0, r1, r2, and r3. unsigned int x, y, z, t; do { x = x + 1; z = t + (z << 1); y = y - x; } while (y != x); V. What does the following sequence of instructions do? Why? RSB r2, r3, r3, LSL #4 RSB r2, r2, r2, LSL #3 VI. Write a...
Machine Language - 1. Which of the following assembly code represents the high-level Java code below?...
Machine Language - 1. Which of the following assembly code represents the high-level Java code below? int x; int i = 5; if (i < 0) x = -1; else x = 1; @5 D=M @i M=D @BRANCH M;JLT @x M=1 @END 0;JMP (BRANCH) @x M=-1 (END) @END 0;JMP @5 D=M @i M=D @BRANCH M;JGE @x M=1 @END 0;JMP (BRANCH) @x M=-1 (END) @END 0;JMP @5 D=M @i M=D @BRANCH M;JLT @x M=1 @END 0;JMP (BRANCH) @x M=-1 (END) @END...
Write an assembly language program that will implement the following: If ( (AX >=BX) || (CX...
Write an assembly language program that will implement the following: If ( (AX >=BX) || (CX < DX) ) goto LoopA Else go to LoopB..
Write an assembly language program that will implement the following:       If ( (AX >=BX) AND (CX...
Write an assembly language program that will implement the following:       If ( (AX >=BX) AND (CX < DX) ) goto LoopA Else go to LoopB (Here I want you to write the whole assembly program that could run in CMD. THANK YOU
Please complete in MASM (x86 assembly language). Use the code below to get started. Write a...
Please complete in MASM (x86 assembly language). Use the code below to get started. Write a program that uses a loop to calculate the first seven values of the Fibonacci number sequence, described by the following formula: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n – 1) + Fib(n – 2). .386 .model flat,stdcall .stack 4096 ExitProcess PROTO,dwExitCode:DWORD .data    ; define your variables here .code main PROC    ; write your assembly code here    INVOKE ExitProcess,0 main...
Write the C55x assembly code for each of the following C snippet code shown below. Assume...
Write the C55x assembly code for each of the following C snippet code shown below. Assume the 8-bit values a, b, c, and d are stored in locations 0x600, 0x601, 0x602, and 0x603 respectively in the memory. Store the result x in location 0x604 and y in location 0x60C. Do not use software to generate the assembly code and comment your code. x = (a - b)3 - (c*d); for (j=0;j<=200;j++)   y = y + (a * b);
Write and test code in MIPS assembly language program to implement algorithms "The Non-Restoring Algorithm "of...
Write and test code in MIPS assembly language program to implement algorithms "The Non-Restoring Algorithm "of an 8-bit integer the user shoud insert the number then by the algo well find the square root