Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NOTE: The given code is in assembly and modfiy it in assembly language not to copy paste from chegg. Thank you and provide comments with

NOTE: The given code is in assembly and modfiy it in assembly language not to copy paste from chegg. Thank you and provide comments with each modification Thank you

image text in transcribed

image text in transcribed

Modify the above code as per given instructions below.

  1. Rename all code labels in upper case (it is mandatory otherwise marks will be deducted)
  2. Use array of DWORD type instead of BYTE type.
  3. Instead of generating multiples of 3 between 30 and 90, generate even numbers between 20 and 100 including 20 and 100 and store them in even location. And generate odd numbers between 30 and 90 and store them in odd locations.
  4. Make sure no number is repeated in the array.
  5. While storing the numbers in array make sure that no repeated number is stored. Add the piece of code in above code that checks for number repetition in array.
  6. Remove all directives of .WHILE and .IF and replace them with simple loops (using loop keyword and code labels) and cmp commands (cmp commands along with code labels and conditional jumps.). if your codes too large for jumps you can use procedures.
  7. Merge code from l1 and l4 into a single user defined function named as DISPLAY. And call this function instead of l1 and l4 labels (HINT: copy any one code label code in function and call the DISPLAY function simply).

Thank you provide me same code with this modifications

The Code given below generates random multiples of 3 between 30 to 90 and sort them using bubble sort algorithm ; bubble sort include irvine32.inc .data len dword? num dword ar byte 100 dup(?) msg byte "enter length of array:",0 msgl byte "Generating Random Multiples of 3 b/w 30 to 90 Please Wait",0 msg2 byte "numbers after sorting: 0 msg3 byte "numbers after sorting: 0 temp byte? .code main proc call clrscr lea eder, mag call writestring call crlf call readint movlen, eax lea eds, mag1 call writestring call crlf call randomize movesi, mov ecx, len 10 mov eax, 90 call randomrange mov num, eax cmp eax, 30 JB 10 JAE 111 111: moveax, num mov edx, 0 mov ebx, 3 divebox cmp eds, 0 INE 10 JE 12 12: mov eax, num mov arr[esi), al addesi, 1 loop 10 lea eds, mag2 call writestring call crlf movesi, movecx, len 11: moval, arr[esi] call writedec call crlf addesi, 1 loop 11 les prix mo? loop 11 SECOND IMAGE lea eds, magz call writestring call crlf mov ecx, 0 while ecx

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

What is American Polity and Governance ?

Answered: 1 week ago