Skip to content

Add stubs #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions exercises/practice/atbash-cipher/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write a zero-terminated string representing the return value to address given in a1

.globl atbash_cipher

atbash_cipher:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/binary/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl binary_convert

binary_convert:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/difference-of-squares/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it wants to use s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl difference_of_squares

difference_of_squares:
jr $ra
7 changes: 6 additions & 1 deletion exercises/practice/grains/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it wants to use s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write low word of integer result to v0
# - write high word of integer result to v1
# - write high word of integer result to v1

.globl square

square:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/hamming/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl hamming_distance

hamming_distance:
jr $ra
5 changes: 2 additions & 3 deletions exercises/practice/hello-world/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ msg: .asciiz "Goodbye, Mars!"
.text

hello:
la $v0, msg

jr $ra
la $v0, msg
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/hexadecimal/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl hex_convert

hex_convert:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/isbn-verifier/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write boolean result to v0

.globl is_valid

is_valid:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/isogram/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write boolean result to v0

.globl is_isogram

is_isogram:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/leap/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it wants to use s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write boolean result to v0

.globl is_leap_year

is_leap_year:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/luhn/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write boolean result to v0

.globl valid

valid:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/nth-prime/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl nth_prime

nth_prime:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/nucleotide-count/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write counts for A,C,G,T to the word array with address given in a1
# - write -1 values to the array if the input is invalid

.globl nucleotide_counts

nucleotide_counts:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/octal/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl octal_convert

octal_convert:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/pop-count/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it wants to use s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl egg_count

egg_count:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/raindrops/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write a zero-terminated string representing the return value to address given in a1

.globl raindrops

raindrops:
jr $ra
9 changes: 9 additions & 0 deletions exercises/practice/resistor-color-duo/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl value
.globl color_code

value:
jr $ra

color_code:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/resistor-color/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl color_code

color_code:
jr $ra
7 changes: 6 additions & 1 deletion exercises/practice/rna-transcription/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
# - read input address of string from a0
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write a zero-terminated string representing the return value to address given in a1
# - write a zero-terminated string representing the return value to address given in a1# Perform RNA transcription with the rules:

.globl transcribe_rna

transcribe_rna:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/rotational-cipher/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write a zero-terminated string representing the return value to address given in a2

.globl rotate

rotate:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/scrabble-score/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl scrabble_score

scrabble_score:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/square-root/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl square_root

square_root:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/triangle/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@
# 1 - isoceles
# 2 - equilateral
# 3 - invalid triangle

.globl triangle

triangle:
jr $ra
5 changes: 5 additions & 0 deletions exercises/practice/trinary/impl.mips
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# - follow the convention of using the t0-9 registers for temporary storage
# - (if it uses s0-7 then it is responsible for pushing existing values to the stack then popping them back off before returning)
# - write integer result to v0

.globl trinary_convert

trinary_convert:
jr $ra