Question: (a) (10 marks) Write a MipS assembly language function (called Countzero) that accepts a binary number in figgiter kio9 and ietums a value corresponding to
(a) (10 marks) Write a MipS assembly language function (called Countzero) that accepts a binary number in figgiter kio9 and ietums a value corresponding to the number of zero's in the binary number in 5v0. (b) 110 marks| Trandate the following pseudocode expression to MipS assembly language code. Inchude code to inoure that there a ro array bounds yolation when the store word (sw) instruction is executed. Note that the array "rap" is an array containarg 50 warid thes the yalue in register 500 must be in the range from 0 to 196 . Include code to insure that the value in iegster fa0 is a woid asidrss othet into the array "tap" If an array bounds violation is detected or the value in register Sia is not a word address nffiet then tranch to itre Label "Error": data rap space 200 text 2ap[5+0]=510
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
