MT02 ECE2560 Page1 of 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy