Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

=+6. What need does it fulfill?

Answered: 1 week ago