What MIPS code would be best to use express the following…
What MIPS code would be best to use express the following idea (assume that a macro files includes a “System_out_print” and a “nextInt” macro): System.out.print(“Enter a value for $t2:”); int t2 = keyboard.nextInt(); while ( t2 > 0) { System.out.print(“Enter a value for $t2:”); t2 = keyboard.nextInt(); } —————————————————————————————————————— A) System_out_print(“Enter a value for $t2:”) nextInt($t2) bgtu $t2, $t2,while b skip_it while: System_out_print(“Enter a value for $t2:”) nextInt($t2) bgtu $t2, $t2,while skip_it: —————————————————————————————————————— B) li $t0, 5 looptop: System_out_print(“Enter a value for $t2:”) nextInt($t2) sub $t2, $t2, 1 bnez $t2,looptop —————————————————————————————————————— C) System_out_print(“Enter a value for $t2:”) nextInt($t2) bgtz $t2,while b skip_it bgtz $t2,while System_out_print(“Enter a value for $t2:”) nextInt($t2) while: skip_it: —————————————————————————————————————— D) System_out_print(“Enter a value for $t2:”) nextInt($t2) bgtz $t2,while b skip_it while: System_out_print(“Enter a value for $t2:”) nextInt($t2) bgtz $t2,while skip_it: