// r0 = multiplicand; in this code it is set to 0x41 // r1 = multiplier; in this code it is set to 0x21 movi R0, #0x41 movi R1, #0x21 movi R2, #0xab movi R3, #0xcd movi R4, #0xef movi R5, #0x33 movi R6, #0 movis R6, #0xe0 bl R7, uint8_mult /* * If your PART 3 code works, then data memory will contain: * - at address 0xde is the product (should be 0x0861) * - at address 0x1bc the value 0xe000 * - at address 0xffff the value 0xffff */ stw R0, R2, R5 stw R6, R3, R4 halt #0x7ff uint8_mult: /*** --- DO NOT EDIT THIS LINE OR ANYTHING ABOVE THIS LINE --- ***/ /* YOUR FILE-HEADER COMMENT HERE */ /* * Implement assembly code for this C function: * uint16_t uint8_mult(uint8_t val1, uint8_t val2) ; * This function multiplies val1 with val2, then returns the * product. * * As a reminder, ULNAv2-B uses this calling convention: * R0 - holds first function parameter, and holds return value * R1 - holds second function parameter * R2-R5 - callee saved * R6 - stack pointer * R7 - link register (holds return address) * You are responsible for preserving registers R2-R5, and restoring * the stack when you are done. */ /* YOUR PART 3 CODE HERE */