#File: PeerEvalOfISASpecsTestProgram #Written By: James Jordan (Team 1-2) #This is a program to multiply an unsigned 8-bit number with the unsigned value 255(0xFF). #This will be done with commands from team 2-1's ISA. .text #text section of the code .global main main: lc $temp0, 65534 #loads the address of the interupt into $temp0 lv $temp0, 0($temp0) #loads the input into $temp0 lc $temp1, 255 #loads the constant 255 into $temp1 lc $temp2, 65535 #loads the address of the output into $temp2 lv $store0, 0($temp3) #loads the outputs value into $store0 move $temp3, $0 #sets the counter to 0 lc $temp4, 1 #value to be added to the counter loop: ceq $temp1, $temp3, check #checks to see if counter equals 255 add $store0, $store0, $temp0 #adds outout to 255 loaded value add $temp3, $temp3, $temp4 #increments the counter j loop; #jumps to the begining of loop check: lc $store1, 65535 #loads the value 65535 into $store1 slt $store2, $store0, $store1 #checks to see if output is larger than 0xFFFF ceq $store2, $temp4, exit #checks to see if the slt indicator is equal to one and goes to exit if it is lc $store0, 0 #clears the output to zero exit: sv $store0, 0($temp2) #saves $store0's value into the output spot in memory