0% found this document useful (0 votes)
36 views

MT02 ECE2560 Page1 of 1

This document provides instructions for a midterm assignment that requires students to write two subroutines in assembly language. The first subroutine called ABS returns the absolute value of a signed number. The second subroutine called LIMIT returns a value M based on comparing an input value N to input values N1 and N2, where N1 is greater than N2. Students must submit pseudocode and assembly code for both subroutines and include it in their submission on Carmen by the due date.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

MT02 ECE2560 Page1 of 1

This document provides instructions for a midterm assignment that requires students to write two subroutines in assembly language. The first subroutine called ABS returns the absolute value of a signed number. The second subroutine called LIMIT returns a value M based on comparing an input value N to input values N1 and N2, where N1 is greater than N2. Students must submit pseudocode and assembly code for both subroutines and include it in their submission on Carmen by the due date.
Copyright
© © All Rights Reserved
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