; CS 333 - findMax.asm ; The code from .org 0x1000-16 to Ret: stop ; is provided to help you test your findMax function ; It sets up some values on the stack which ; findMax should read and perform its comparison on ; You may change the values to test your function ; It is NOT a valid Main function for the post-lab submission .org 0x1000-16 ; start at address 0x1000 - 16(decimal) .dc 0 ; set retval spot in stack to 0 .dc 30 ; arg3 .dc -9900 ; arg2 .dc 60 ; arg1 .org 0x1000 ; set next inst at mem addr 0x1000 Main: addi r30, r30, 0x1000-16 ; initialize SP to address as if ; findMax were about to be called la r29, findMax ; load the address of findMax la r31, Ret ; load Ret to the link register br r29 ; call to findMax Ret: stop ; halt findMax: ; write the body of findMax here