This project implements a RISC-V assembly program that processes a series of list manipulation commands provided as a single input string. The input string, declared as listInput
in the .data
section, contains commands separated by the ~
character (ASCII 126). The main function and associated functions handle commands to add, delete, print, sort, and reverse elements in a list.
DATA=char
to the end of the list.DATA=char
from the list.listInput
, can contain up to 30 commands.~
character.ADD(a)
or DEL(b)
). Commands with zero or multiple characters in parentheses are considered malformed and are discarded.PRINT
is valid, but print
is not).SORT
is valid, but SO RT
is not). However, spaces adjacent to the ~
separators are tolerated.ADD(a)~DEL(b)~PRINT~SORT~REV
AD D(a)~DE L(b)~print~SO RT~REV
listInput
string in the .data
section of the RISC-V assembly code.listInput
.listInput: .string "ADD(a)~ADD(b)~PRINT~SORT~PRINT~REV~PRINT"
ADD(a)~ADD(b)~PRINT~SORT~PRINT~REV~PRINT
a
b
-----
a
b
-----
b
a
This README description outlines the functionality, input handling, command format, and usage of the RISC-V assembly project for processing list commands.
You can download the complete documentation here. The repository is available here for browsing all the project resources.