Homework13

Homework13 - Example: ...set up parameters for first call...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ELEC 2220 Computer Systems Homework #13 Due: Friday, July 2 PROGRAM #1: Write a subroutine that will sort an array of unsigned 8-bit numbers into ascending order. The subroutine should be capable of sorting an array of any size, and starting at any address in memory. Pass the starting address of the array and the size of the array to the subroutine via the stack. To test the subroutine, use the following arrays: Array1: dc.b 30,55,129,18,5,20,200,4,220,100 Array2: dc.b 200,100,50,128,70 Write one "main" program that calls your subroutine twice, once to sort each of the given arrays.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Example: ...set up parameters for first call ...call subroutine ...set up parameters for second call ...call subroutine Turn in printouts of your source program and the memory window from the debugger after running the program. In the memory window, show and highlight the two sorted arrays in memory. PROGRAM #2: Repeat Program #1, but this time assume the arrays are signed 16-bit numbers. Test the subroutine with the following arrays: Array1: dc.w 30,-55,129,-18,-5,20000,-3200,4,220,-100 Array2: dc.w -200,10000,-25000,128,70...
View Full Document

Ask a homework question - tutors are online