0% found this document useful (0 votes)
65 views1 page

Midterm2 PDF

This document provides instructions for a midterm assignment for an ECE2560 class due on April 12th. It describes two subroutines that students must write in assembly language: 1) ABS that returns the absolute value of a signed number, and 2) LIMIT that returns a value between two inputs depending on where a third input falls. All variables must be handled on the stack. Students must submit pseudocode and assembly code screenshots on Carmen by the due date.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views1 page

Midterm2 PDF

This document provides instructions for a midterm assignment for an ECE2560 class due on April 12th. It describes two subroutines that students must write in assembly language: 1) ABS that returns the absolute value of a signed number, and 2) LIMIT that returns a value between two inputs depending on where a third input falls. All variables must be handled on the stack. Students must submit pseudocode and assembly code screenshots on Carmen by the due date.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

MT02  ECE2560 Page1 of 1

MT02 ECE2560 Sp 2020
Due date: Sunday April 12, 11:59pm
Collaboration with other students is not allowed

Write the following two subroutines:

Subroutine 1: name ABS

This subroutine returns the absolute value of a signed number
Input: N
Output: Absolute value of N

Subroutine 2: name LIMIT
Input1: N1
Input2: N2
Input3: N
      Subroutine assumes that N1 > N2
Output: M

M = N1 if N >= N1
M = N    if   N > N2 and N < N1
M = N2 if N <= N2

All input, output and local variables should be handled on the stack.

Use the word template and instructions contained on our web site to submit your 
screenshots to Carmen. Do not email directly to your TA or me. Files emailed to the TA 
or me will not be accepted. Include the following in your submission:
i) Pseudo code of the two subroutine
ii) Assembly language source code of the two subroutines

Midterm2 Page 1

You might also like