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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started