Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem In assembly write a protected-mode, flat memory model program that compu

ID: 3531032 • Letter: P

Question

Problem In assembly write a protected-mode, flat memory model program that computes the following. 1. Generate a set of 15 unique random integers in the range [19,79]. 2. Display the original set with an annotation 3. Arrange the set in ascending order using a bubble sort algorithm as shown below 4. Display the sorted set with an annotation. Notes 1.You may use any of the technology including functions from Irvine32. Directives, such as .IF, .WHILE, etc .2. You must write global procedures that you call from main. 3. Part of the program will be graded on the basis of program style. I reserve the right to judge style as I deem fit for this assignment. 4. Your program will be graded using the Microsoft Visual C++ Express Edition environment. Bubble sort algorithm Please use the following algorithm to implement your sort. Bubble-Sort (A) for i ? 1 to length[A] for j ? length[A] downto i + 1 if A[j] < A[j-1] Swap A[j] ? A[j-1]

Explanation / Answer

1)unsigned randperm(string key, unsigned bits, unsigned index) {

The bubble sort is generally considered to be the simplest sorting algorithm. Because of its simplicity and ease of visualization, it is often taught in introductory computer science courses. Because of its abysmal O(n2) performance, it is not used often for large (or even medium-sized) datasets.

The bubble sort works by passing sequentially over a list, comparing each value to the one immediately after it. If the first value is greater than the second, their positions are switched. Over a number of passes, at most equal to the number of elements in the list, all of the values drift into their correct positions (large values "bubble" rapidly toward the end, pushing others down around them). Because each pass finds the maximum item and puts it at the end, the portion of the list to be sorted can be reduced at each pass. A boolean variable is used to track whether any changes have been made in the current pass; when a pass completes without changing anything, the algorithm exits.

This can be expressed in pseudocode as follows (assuming 1-based indexing):

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote