Skip to content

CS2640Assignments/Basic_Assembly_Operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Basic_Assembly_Operations

Contains files for the Program1 Assignment

Instructions:

There are three tasks that you will need to complete to be eligible for full points on this assignment. Read the instructions carefully and think critically about the information and components you have and need, and why you are using them. Each task has their own requirements that need to be fulfilled. Use any additional instructions and registers as necessary.

Task 1: User Input and Output

In this task, you will practice getting user input, moving them to registers, and printing them back to the user. Below are the specific requirements for this task:

Use "main: " label for this task Get 2 int values from the user The two user values should be held in registers $s0 and $s1, respectively Output the user inputs in the "Run I/O" section in MARS environment back to the user

Task 2: Arithmetic Operation Practice

Using the user input values in registers $s0 and $s1, write MIPS Assembly code to complete the arithmetic operations below:

add two values (use instruction "add") subtract two values (use instruction "sub") multiply two values (use instruction "mul") divide two values (use instruction "div") Output the arithmetic results in the "Run I/O" section in MARS environment back to the user

Task 3: Conditions

In this final task, you will practice how to do conditions in Assembly:

If the two user inputs from Task 1 are equal to each other, output "User inputs are the same" If the two user inputs from Task 1 are not equal to each other, output "User inputs are different"

About

Contains files for the Program1 Assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •