/* Midterm practice #6. Implement the following function according to * the specification. Follow the C-assembly interface conventions of * the lab's compiler and assembler. * * In: l - lower bound * u - upper bound * s - step amount * rv - pointer to where to write result * Out: -1 - if overflow occurred * 0 - if no error * Computes * l + (l + s) + (l + 2s) + ... + (l + ks), where l + (k+1)s > u * For example, asum(-3, 4, 2, &x) computes * -3 + -1 + 1 + 3 * and writes the sum to the location of x. */ short asum(long l, long u, long s, long * rv);