Provide a pseudo code to design an application that accepts

Provide a pseudo code to design an application that accepts 10 numbers and displays them in descending order. Write an assembly program that updates the data memory D as D[0] = D[0] + D[1] using 3 instruction instruction set. Explain the operation of each instruction used.

Solution

Q2)

Pseudo code:

         Start

           Declarations

                num SIZE = 10

                num number[SIZE]

                string temp

                num x

                num y

               fileArray( )

               sortArray( )

              displayArray( )

      stop

     fileArray( )

       x = 0

        while x<SIZE

             output<<”Enter numbers:”

             input number [x]

             x = x+1

      endwhile

return

sortArray( )

     y = 0

       while y<COMPS

          x = 0

          while y<COMPS  

               if number [x] < number [x+1]

                   swap( )

              endif

              x = x+1

      endwhile

      y = y+1

    endwhile

return

swap( )

   temp = number [x+1]

   number[x+1] = number [x]

   number [x] = temp

return

displayArray( )

   x = SIZE-1

   while x >= 0

     output number [x]

     x = x-1

endwhile

return

 Provide a pseudo code to design an application that accepts 10 numbers and displays them in descending order. Write an assembly program that updates the data m
 Provide a pseudo code to design an application that accepts 10 numbers and displays them in descending order. Write an assembly program that updates the data m

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site