Skip to content

JabariD/assembly_recursion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

117 Commits
 
 
 
 

Repository files navigation

MIPS Recursion Project -- Payton Dennis

To Run:

  1. Download or install "MARS" or "QtSpim".
  2. Copy and paste the code in recursion.s
  3. Run with any input!

@02877343 -- Base: 33

Note: I understand the directions were listed to use the STACK to store the result which would have been an easier method than I chose. But what made sense to me was to STORE my result using .data strings. Besides this change I followed the directions to the best of my ability.

Basic High-level Idea of Algorithm

Preliminary Step: Check tabs/spaces and valid characters.

  1. Recursively call each character in our string; (which I will call c).
  2. Convert c (starting with the rightmost digit; backtrack) to its decimal representation; (which I will call d).
  3. If c does not need to be multiplied go to step 8. If c does:
  4. Multiply d by base (33).
  5. Store in tempAnswer (string in memory) which will be our new d.
  6. Check if multiply again by 33
  7. If yes go to step 4. If not continue:
  8. Add to tempAnswer to finalAnswer.
  9. If done multiplying, check if done with characters: If no go to step 2, if yes continue.
  10. Print finalAnswer.

Note: This took incredibly long to do, with a lot of planning, frustration, and time. But I will say it was a learning experience and taught me how to break a problem down into chunks. It also helped me learn efficient ways to debug a program.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors