Question: Assembly language program using MIPS #/*# Start of file logic7.a */ # #/*# MIPSMARK 1.0 1/5/98 Copyright 1998 J. Waldron. */ # ## Question: ##

Assembly language program using MIPS

#/*# Start of file logic7.a */ # #/*# MIPSMARK 1.0 1/5/98 Copyright 1998 J. Waldron. */ # ## Question: ## "number" is a word. ## If bit 0 is set then set bits 1, 2 ## and 3 and print out the result. ## If bit 0 is cleared then clear bits 1, 2 ## and 3 and print out the result. ## #/*# Output format must be: */ #/*# "result is = 1088" */

#/*############################################## # # # text segment # # # #################################################

.text .globl __start __start: # execution starts here */

## You may un-comment these lines to input your own number:

# la $a0, prompt # li $v0, 4 # syscall # li $v0, 5 # input integer # syscall # sw $v0, number

#/* Any changes above this line will be discarded by # mipsmark. Put your answer between dashed lines. */ #/*-------------- start cut ----------------------- */

#/* Student's Name: Account: */

#/*-------------- end cut ----------------------- # Any changes below this line will be discarded by # mipsmark. Put your answer between dashed lines.

################################################# # # # data segment # # # #################################################

.data #*/ number: .word 0x448 ans: .asciiz "result is = " endl: .asciiz " " prompt: .asciiz "type a number: " # #/*# End of file logic7.a */

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!