# HW6 # This is the skeleton assembly file that you need to fill in. # # IMPORTANT: return values are expected to be found in %rax # declare the function names available in this file .globl avg .globl maxabs .globl lookup .globl checksum # avg - computes the integer average of two numbers avg: # your code goes here ret # maxabs - returns the number whose absolute value is the largest maxabs: # your code goes here ret # lookup - returns the character found in string str at location x (str[x]) # # IMPORTANT: characters are one byte long and are tightly packed in # memory. You will need to use the byte length registers and movb # (otherwise you will grab more than one character). This hold for all # of the string functions lookup: # your code goes here ret # checksum - performs a simple parity checksum, xoring all of the # characters in the string and then summing the 1s. checksum: # your code goes here ret