lab4_s10 - University of Florida Department of Electrical...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
University of Florida EEL 4744 Dr. Gugel Department of Electrical and Computer Engineering Spring, 2010 Page 1/2 2/1/10 - 20:02 A2/P2 Lab #4: Elementary Assembly Programming & Adding a Keypad Purpose The purpose of this lab is to give students more practice in writing and debugging elementary assembly routines. In addition to this, students will learn how to add a simple keypad to their F28335 dev board and use it to send out a corresponding number on their LED display attached in an earlier lab. Part I. Writing Assembly - Sort Routine You will be given a vector containing 2’s complement 16 bit numbers. You task is to write a routine that copies these numbers over to a new vector (in RAM) in order of magnitude. The smallest number should be written first in the new vector and the largest number should be last. 1. You are not allowed to corrupt the original vector that you are sorting. You are also not allowed to use F28335 Max & Min functions or other code authored by others on the web. Write your own using conditional branches. 2. You should test your routine with a test vector of data (created by you). 3. In lab your TA will give you the address of the vector to be sorted (orig_addr), the length of this vector (orig_len) and the new sorted vector’s address (sorted_addr). 4. All code should be easily relocate-able in memory. You should write your sort routine as a subroutine and call it from your main program. 5. Pass parameters to your subroutine via the stack. Parameters should be placed on the stack (in the main program) in the following order: 1. orig_addr 2. orig_len 3. sorted_addr 6. Your sort subroutine does not pass any values
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/24/2010.

Page1 / 2

lab4_s10 - University of Florida Department of Electrical...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online