Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: Learn memory organization/layout, data transfer concepts and instructions, memory access modes, memory allocation, memory size, type and length operators, and single and nested loop

Objective: Learn memory organization/layout, data transfer concepts and instructions, memory access modes, memory allocation, memory size, type and length operators, and single and nested loop instruction . Requirements: 1. ( 5 points) Write an assembly program that does the following: - Define the following value 04080706 h in the .data segment using the 32 - bit unsigned identifier. - Find the sum of its bytes using the PTR operator. The sum should be 19 h. - Store the result in the appropriate N - bit register. - The direction of adding two bytes goes from left to right. o Submit the following: Lastname1.asm 2. (5 points) Use a loop instruction with indirect addressing to reverse the elements of an array in place . - Do not copy the elements to any other array. - Use the SIZEOF, TYPE, and LENGTHOF operators to make the program as flexible as possible if the array size and type should be changed in the future. - Use the XCHG instruction. - The arrays elements are : B , A , D , C , F , E , H , G . - The arrays elements after running the program should look like: A, B, C, D, E, F, G, H . o Submit the following: Lastname2 .asm 3. (5 points) Implement the following expression in assembly language: for (i = 4 ; i > 0; i -- ) { for( j = 2 ; j > 0; j -- ) { y = i + j ; } } - Assume I and j are 32 - bit registers and y is a list . o Submit the following: Lastname3 .as

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions