For the following twenty 32bit sinned integers in the data m
     For the following twenty 32-bit sinned integers in the data memory starting at Address 0times5000.  -10. 9. 20. 32. 45. 2. 5, 7. -90, 10, 89. -200. -2. 945. 152. 50. -17. -190. -10. 989 write assembly codes by using Nios II instruction set to sort and rewrite the data in ascending order. 
  
  Solution
Data Segment arr1 db -10,9,20,32,45,2,5,7,-90,10,89,-200,-2,945,152,50,-17,-190,-10,989 Data Ends Code Segment Assume cs:code, ds:data Begin: mov ax, data mov ds, ax mov es, ax mov bx, OFFSET arr1 mov cx, 5 mov dx, cx L1: mov si, 0 mov ax, si inc ax mov di, ax mov dx, cx L2: mov al, [bx][si] cmp al, [bx][di] jg L4 L3: inc si inc di dec dx cmp dx, 00 je L1 jg L2 L4: mov al, [bx][si] mov ah, [bx][di] mov [bx][si], ah mov [bx][di], al inc si inc di dec dx cmp dx, 00 je L1 jg L2 Exit: mov ax, 4c00h int 21h Code Ends End Begin
