Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Leap-year/MIPS-Assembly/leap-year.mips
Normal file
13
Task/Leap-year/MIPS-Assembly/leap-year.mips
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
IsLeap: andi $a1, $a0, 3 #a0 is year to test
|
||||
bnez $a1 NotLeap
|
||||
li $a1, 100
|
||||
div $a0, $a1
|
||||
mfhi $a1
|
||||
bnez $a1, Leap
|
||||
mflo $a1
|
||||
andi $a1, $a1, 3
|
||||
bnez $a1, NotLeap
|
||||
Leap: li $v0, 1
|
||||
jr $ra
|
||||
NotLeap:li $v0, 0
|
||||
jr $ra
|
||||
Loading…
Add table
Add a link
Reference in a new issue