Skip to content

Rtulpe/RISC-V_Playground

Repository files navigation

ECOAR — RISC-V Assembly Examples

A collection of RISC-V assembly programs for the RARS simulator. Each file is a standalone program that demonstrates a specific concept or algorithm.

Assembly Programs

  • 3_low_to_cap.asm: Reads a string and converts every third lowercase letter to uppercase.
  • biggest_unsigned_decimal_number.asm: Finds the largest unsigned decimal number in a string.
  • capitalize_from_string.asm: Capitalizes characters in the first string if they are present in the second string.
  • digit_complement.asm: Replaces all digits in a string with their complement to 9 (e.g., 0 becomes 9, 1 becomes 8).
  • flipstring.asm: Reverses the order of digits within a string, leaving other characters in place.
  • longest_string_sequence.asm: Finds and prints the longest sequence of consecutive digits in a string.
  • num_dec_nums.asm: Counts the number of decimal numbers in a string.
  • rem_all_but_first_up.asm: Removes all uppercase letters from a string except the first one in a consecutive sequence.
  • rem_char_prec_dig.asm: Removes any character that is preceded by a digit.
  • remove_char_sequence.asm: Removes a sequence of characters from a string between two user-specified indices.
  • remove_digits.asm: Removes all digits from a string.

Requirements

  • A RISC-V simulator, such as RARS.

Usage

  1. Open any .asm file in a RISC-V simulator (e.g., RARS).
  2. Assemble and run the program using the simulator's controls.

About

Just a collection of simple RISC-V programs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors