Program 3
Program 3
Purpose:
Resources:
Learning Objectives:
You should be able to perform the following activities at the end of this
assignment:
5.
Specific Tasks:
Write and test a RISC-V assembly language program to perform the following
actions in order:
2. Print a welcome message that include: your name, a title, and a brief
description of the program.
3. Prompt the user to enter the hexadecimal date from a FAT16 directory
entry
4. Use the decoding information for the FAT filesystem to convert this
hexadecimal value to a string representation of the date for the file
table entry. (Decoding information can be found here).
1. Convert to big-endian
2. Decode the month, day and year, using a procedure for each
and remember to print the whole month name, not an
abbreviation.
Your program should follow these loosely outlined steps in its implementation
(i.e., write the code for step 1, then for step2, etc.).
You will also need to include comments, whitespace, and blank lines in your
code to make it easy to read and to follow the implementation of the
pseudocode. While one comment per line is not required, you are
encouraged to include enough comments in you code to allow easy tracing
of the pseudocode logic through your assembly implementation (see the
Fibonacci example provided on Canvas).
Sample Execution
Here is sample output from my solution program (your output may vary).
Try 4259 and 6559 as input values (October 2, 2024 and November 5, 2024).
Additional Information:
There are several system calls that are available for use in the RISC-V
assembly language. These system calls must be used for input and output in
your programs.
4. Use the returned values, if any, from the registers designated in the
command description
Example:
A partial list available system calls and codes including the ones needed
for this assignment:
Code
ecall name Arguments Results
in a7
fa0 = double to
print double 3
print
a0 = address of
print string 4 null-terminated
string to print
exit (terminate
10
execution)
Arithmetic:
Memory Access:
Other commands:
The one hour rule... If you have been working on a problem for over an
hour with no progress, contact me, usually with a copy of your code as an
attachment to an email. Please use the email address in the syllabus:
markhuson@weber.edu.
Criteria Ratings
20 pts
Assembles with no
problems
15 pts
Minor typographical
or transfer errors
Program assembles without errors prevent assembly
without modification
0 pts
Major modifications
required or only a
shell of the
complete program is
present
12 pts
Comments do not
Array and Bitmask with Date Decoding Rubric
Criteria Ratings
8 pts
Program heading
comments
incomplete, do not
match template
0 pts
Token commenting
or no comment, just
author name or
other similar
comments in
program
5 pts
0 pts
Criteria Ratings
performed correctly
5 pts
Output is neatly
formated, labeled
and clear to follow
3 pts
Some labels or
User interface formatting. requirements
missing, or
formatted
inappropriately
0 pts
Output not
formated, no labels,
only values printed.
Appropriate system
calls and registers
used to read in
hexadecimal value
3.34 pts
1.67 pts
Array and Bitmask with Date Decoding Rubric
Criteria Ratings
0 pts
We needed numeric
values to compute
the power of a
number?
10 pts
One or more
procedures has side
effects from call as
used registers are
not protected.
5 pts
Procedures created
but not properly
called/implemented/
used resulting in
Array and Bitmask with Date Decoding Rubric
Criteria Ratings
program errors.
0 pts
No procedures
implemented for this
problem.
10 pts
5 pts
One or more
portions of the date
Date value computed correctly are computed
incorrectly.
0 pts
10 pts
Criteria Ratings
correctly, though
month value is
extracted from a
string (array of
characters).
0 pts
Display completely
incorrect or month is
determined solely
with a massive
"case" statement
implemnetation...
bummer.
5 pts
Byte order is
reversed
2.5 pts
Conversion from little endian to big endian is performed Bytes are moved,
correctly but do not end in
contiguous bytes.
0 pts
No coversion
attempted.