Skip to content

MIPS Program: Creates a search function that searches a given array of bytes for a given value and returns its location in the array.

Notifications You must be signed in to change notification settings

jordantbui/HW-4-CS-2640

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Homework 4 Search Program(MIPS) - CS2640

10/30/2020
Jordan Bui (BroncoID: 011821368)
CPP Fall 2020
CS 2640 Computer Organization and Assembly Programming

Homework 4 MIPS Code Implementation

Implementation for Search program.

  • Main declares an array of bytes with value "MIPS assemblt language!"
  • Use search to find the "!" letter and output the location in the array
  • Use search to find the "z" letter and output the location in the array
  • MIPS file saved as search.s
  • Tested using QTSpim program

Search.s

This program creates a search function that sequentially searches array x of N bytes for the relatinve location L of a value V.

  • Array x, number of bytes N, and value V are all passed into the function.
  • Location L is returned. (number from 1 to N)
  • Returns -1 for L if V is not found.

Required Output: Output Must Be Exactly as Shown

Search by F. Last

MIPS assembly language!

!:23
z:-1

About

MIPS Program: Creates a search function that searches a given array of bytes for a given value and returns its location in the array.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published