编程代写 Part K: Assembly Language, part 2 (16 marks)

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 pre-existing pseudo-instructions to implement these pseudo-instructions. (16 marks total)
a) abs $d, $s
b) bev $s, label

Copyright By PowCoder代写 加微信 powcoder

c) green $d, $s
Set $d to the absolute value of the number stored in $s. (4 marks)
Branch to label if the number stored in $s is even. (4 marks)
Set $d to a value between 0 and 0xFF that represents the green component of the pixel colour stored in $s. (4 marks)
Store the contents of $s into memory address stored in $d, with an offset value that is stored in $t. (4 marks)
d) sw $s, $t($d)
Student Number: __________________ 15 (continued)

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com