Question: Inline Assembly, MASM Program 3 : Inline Assembly In this assignment we will be using high - level language, C + + , with inline
Inline Assembly, MASM
Program : Inline Assembly
In this assignment we will be using highlevel language, C with inline assembly to complete specific tasks. One purpose of doing this is to help optimize code more efficiently, if possible. This also allows us to use highlevel language for input, output, and more. Most of the time compilers can optimize your code efficiently, but there may be cases where it does not.
Requirements: i
Create a constant variable for holding the size of the array using C
Type: Integer
Name and Value: arrSize
Create the following predesigned array using C
Type: Integer
Name and Value: numArrAarrSize
Create a void function in C to sort the array using Bubble Sort algorithm
Function Name: bubbleSort
# of Parameters: numArrA, arrSize constant
Display the unsorted array using C
Display the sorted array using C
Problem:
Create a C program with inline assembly to do Bubble Sort on an unsorted predesigned array with the values between and unique Your program must use highlevel language to do display and function calling. The Bubble Sort function must use assembly to sort the array. The algorithm in Pseudocode for Bubble Sort is as follows: it
WHILE FLAG IS NOT EQUAL TO
SET INDEX TO
SET FLAG TO
WHILE INDEX IS LESS THEN ARRAYSIZE
IF ARRAYINDEX IS GREATER THEN ARRAYINDEX
SET TEMP TO ARRAYINDEX
SET ARRAYINDEX TO ARRAYINDEX
SET ARRAYINDEX TO TEMP
SET FLAG TO
ENDIF
INCREMENT INDEX
ENDWHILE
ENDWHILE
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
