// r0 = multiplicand; in this code it is set to 0x4110 // r1 = multiplier; in this code it is set to 0x0421 // r2 = address to store upper half of product // r3 = address to store lower half of product movi R0, #0x10 movis R0, #0x41 movi R1, #0x21 movis R1, #0x04 movi R2, #32 movi R3, #33 uint16_mult: /*** --- DO NOT EDIT THIS LINE OR ANYTHING ABOVE THIS LINE --- ***/ /* YOUR FILE-HEADER COMMENT HERE */ /* YOUR PART 3 CODE HERE */ /* * This code assumes the product's half is in register R0, and * lower half is in register R1, and that registers R2 and R3 * are unmodified. If this not true, then update the next two * lines. */ stwi R0, R2, #0 stwi R1, R3, #0 /*** --- DO NOT EDIT THIS LINE OR ANYTHING BELOW THIS LINE --- ***/ /* * if your PART 3 code works, then data memory should contain: * - at address 0x20 the value 0x010c * - at address 0x21 the value 0xa310 * - at address 0xffff the value 0xffff */ halt