Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.57 KB

File metadata and controls

41 lines (27 loc) · 1.57 KB

SimpleRISC Assembly Program

This repository contains a SimpleRISC assembly program written as part of a computer architecture or microprocessor coursework.

📌 Overview

The program demonstrates:

  • Use of registers and arithmetic instructions (add, mul, cmp)
  • Nested loop structures (.Loop1, .loop2, .loop3)
  • Conditional branching with labels (beq, bgt, h)
  • Computation of powers (e.g., square, cube) using multiplication
  • Basic control flow in SimpleRISC assembly

📝 Program Structure

  • Outer loop (.Loop1): Controls the main iterations.
  • Inner loops: Perform computations of powers and compare with target values.
  • Branching: Conditional jumps to labels based on comparison results.

⚙ Sample functionality (inferred)

Although the exact objective of the program is not documented, based on analysis:

  • It likely calculates powers (squares, cubes) and compares them to values in registers.
  • It demonstrates nested loop control and conditional branching in assembly.

🚀 How to run

  1. Use a SimpleRISC simulator (e.g., provided in academic labs or open-source SimpleRISC emulators).
  2. Load the assembly code from this repository.
  3. Step through the code or run to completion to observe register values and branching behavior.

🔑 Notes

  • This code is kept here as an example of low-level programming practice.
  • No warranty on correctness — it was an academic exercise.
  • Feel free to fork or build upon this if you're exploring assembly programming!

📂 File

  • SimpleRisc Assembly Program — Contains the assembly code.