Part K: Assembly Language, part 2 (16 marks)
We need to extend the MIPS assembler to create the following new pseudo instructions. For each new pseudo-instruction, provide the implementation using real MIPS instructions. Only implementations that use the fewest instructions will get full marks. Do not use existing pseudo-instructions to implement these pseudo-instructions. (16 marks total)
a) swap $s, $t Swap the contents of register $s and register $t. (4 marks)
b) divi $s, i Divide register $s by the immediate value i. (4 marks)
Copyright By PowCoder代写 加微信 powcoder
c) ble $s, $t, label Branch to label if $s ¡Ü $t. (4 marks)
d) clear label Set the memory location at label to zero. (4 marks)
Student Number: __________________ 15 (continued)
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com