Create a new project to run the following program. Declare an array in the data segment: arrayB WORD 1,2,3,4 Write code to Rearrange the array as follows: 3,4,1,2
Added by Jennifer W.
Step 1
Sure! Let's go through the steps to create a project that rearranges the array `arrayB` from `1, 2, 3, 4` to `3, 4, 1, 2`. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 98 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write an assembly program that defines the following array 10 25 56 80 3 then create procedure reverse to display the array in reverse
Akash M.
i. Write a program in Assembly language that reads the numbers from memory num1: dw 1,2,3,4,5,6,7,8,9,10,11,12) and performs the following operations on them: - Separates the odd numbers and stores the result odd numbers in consecutive memory locations in an array named odd. - Finds the sum of numbers from the odd array and stores it in an array named sum: dw 0. - Sorts the numbers from the given array num2: dw 9,8,7,6,5,4,3,2,1,0 in ascending order. Stores the result in consecutive memory locations in an array (dw) named sort. There should be separate subroutines for each mentioned task like odd, sum, sort. Also, implement the stack concept within each subroutine.
Text: Windows 32 assembly language code 80x86 Question 1 (50 points): Write a procedure arrMix that starts with two doubleword integer arrays arr1 and arr2 and builds a third array arr3. In positions 0-7 and 17-23, each element of arr3 gets the corresponding bits from the same element of arr1, and in positions 8-16 and 24-31, the corresponding bits from the same element from arr2. Follow the cdecl protocol. A C/C++ header for the arrMix looks like: void arrMix(int[] arr1, int[] arr2, int[] arr3, int count) // For i = 0, 1, ..., count - 1, bits 0-7 and 17-23 of arr3[i] come from arr1[i], and bits 8-16 and 24-31 come from arr2[i].
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD