Computations to be performed by procs defined in "PROJECT6.ASM"
Write your code for these function in the file "PROJECT6.ASM"
and use "calc.asm" to call and test your code.
NOTE: Arguments "A" and "B" are in registers AX and BX.
Do not use memory for "A" and "B".
(All values are integers.)
Result is returned in register AX.
- CalcA: Return whichever value is greater.
- CalcB: Compute the mean average of the two values.
- Skip the letter "C" in this set of procs.
- CalcD: Compute A 3
(A cubed = A * A * A).
- CalcE: Compute A B
(A raised to the B power).
Use a loop to multiply A by itself, B times.
- CalcF: Compute the sum of all integers from A to B, inclusive.
(For example, the sum from 10 to 14 is 60, the sum from 2 to 100 is 5049)
- CalcG: Swap the high and low bytes of each value,
and return whichever value is greater.
- CalcH: Swap the high bytes of each value,
and return whichever value is greater.
- CalcI: Return the value 100 if any of the four bytes is identical to
the ASCII value of one of your initials (in UPPER case); otherwise return zero.
- CalcJ: Return the value 100 if any of the four bytes is identical to
the ASCII value of one of your initials (regardless of case); otherwise return zero.
- CalcK: If any two bytes of the four bytes are identical,
then return its value; otherwise return zero.
- CalcL: Add the complement of A to the value of B.
- CalcM: Compute the number of times that the smaller value can be
subtracted from the larger value.
|