Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

arp8-dev/SimpleRISC_PowerCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

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.

About

SimpleRISC assembly program demonstrating nested loops, arithmetic operations, and power calculations.

Topics

Resources

Readme

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors