Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# File: mlModulusAND.asm # Author: ************ # Date: mm/dd/yyyy # Purpose: Practice using AND for modulus #---------------------------------------------- # WRITE MIPS CODE FOR THE FOLLOWING C++

# File: mlModulusAND.asm # Author: ************ # Date: mm/dd/yyyy # Purpose: Practice using AND for modulus #---------------------------------------------- # WRITE MIPS CODE FOR THE FOLLOWING C++ CODE: #include #include #using namespace std; # void main() # { # //declare variables # int x = 0; # # //loop 3 times thru 0..3 # for(int i=0; i<=12; i++) # { # cout << x; # x++; # x = x & 0x03; //modulus 4 # } # # }//end main() # # OUTPUT: 0 1 2 3 0 1 2 3 0 1 2 3 #

.data .eqv SYS_PRINT_WORD 1 #word, byte, character .eqv SYS_PRINT_FLOAT 2 #float .eqv SYS_PRINT_DOUBLE 3 #double .eqv SYS_PRINT_TEXT 4 #text (zero terminated) .eqv SYS_INPUT_WORD 5 #input word .eqv SYS_EXIT 10 #terminate

# //declare variables # int x = 0; x: .word 0 endl: .asciiz " " blank: .asciiz " " .text .globl main main:

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

Modern Datalog Engines In Databases

Authors: Bas Ketsman ,Paraschos Koutris

1st Edition

1638280428, 978-1638280422

More Books

Students also viewed these Databases questions