Create the two programs described below. 1.reorder.asm - rearranges the values o
ID: 3791526 • Letter: C
Question
Create the two programs described below.
1.reorder.asm - rearranges the values of the following array into this order: 19, 178, 211, Use only MOV and XCHG to accomplish the desired result. DO NOT use any immediate values. Use only direct offset addressing to accomplish the goal. Be as efficient as you can. Note: You will have to look at memory to see if you have achieved your goal. You may not create other data elements to assist with this problem. arrayD DWORD 211, 178, 19
2. fibonacci.asm - computes the following. a. Compute fib(n) for n = 2, 3, …, 6 using an array. If you so desire, you may declare a variable for fib(0) and fib(1). However, all computation of the remaining elements of the array must be done by your program, no use of immediate values allowed. In other words, you must use the formula shown below (figure 1) to determine the values of the remainder of the required elements. b. Store each computed value in an array of the appropriate size and type. c. Store fib(3) through fib(6) in consecutive bytes of the ebx register starting from the lowest byte; that is, fib(3) is stored in the low byte (bl) of ebx, fib(4) is stored in the next byte (bh), fib(5) is stored in the next byte of ebx and fib(6) is stored in the highest byte. i. Ebx register will look like this 08050302 Figure 1: Information on the
Can someone help me on his problem to write assembly code?
Explanation / Answer
reorder.asm
==========================================================================
fibonacci.asm
===============================================================================
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.