-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Substituindo x0 por zer nos codigos e inclementando testes sltu e sltiu
- Loading branch information
Showing
38 changed files
with
159 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.global _start | ||
|
||
_start: | ||
addi a1, x0, 10 # Carrega o primeiro número (10) em a1 | ||
addi a2, x0, 20 # Carrega o segundo número (20) em a2 | ||
addi a1, zero, 10 # Carrega o primeiro número (10) em a1 | ||
addi a2, zero, 20 # Carrega o segundo número (20) em a2 | ||
|
||
add a3, a1, a2 # Soma a1 e a2, armazena o resultado em a3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x10, x0, 5; | ||
addi x10, zero, 5; | ||
|
||
andi x9, x10, 5; | ||
andi x8, x10, 3; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x12, x0, 1; | ||
addi x9, x0, 1; | ||
addi x12, zero, 1; | ||
addi x9, zero, 1; | ||
|
||
beq x12, x9, desvio; | ||
|
||
addi x13, x0, 5; | ||
addi x13, zero, 5; | ||
add x14, x12, x13; | ||
sw x14, 0(x12); | ||
lw x14, 0(x12); | ||
sub x11, x13, x12; | ||
addi x10, x0, 25; | ||
addi x10, zero, 25; | ||
addi x10, x10, -15; | ||
and x15, x12, x13; | ||
or x15, x12, x13; | ||
addi x10, x0, 100; | ||
addi x10, zero, 100; | ||
|
||
desvio: | ||
addi x16, x0, 17; | ||
addi x16, zero, 17; | ||
andi x16, x16, 17; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x12, x0, 1; | ||
addi x9, x0, 2; | ||
addi x12, zero, 1; | ||
addi x9, zero, 2; | ||
|
||
beq x12, x9, desvio; | ||
|
||
addi x13, x0, 5; | ||
addi x13, zero, 5; | ||
add x14, x12, x13; | ||
sw x14, 0(x12); | ||
lw x14, 0(x12); | ||
sub x11, x13, x12; | ||
addi x10, x0, 25; | ||
addi x10, zero, 25; | ||
addi x10, x10, -15; | ||
and x15, x12, x13; | ||
or x15, x12, x13; | ||
addi x10, x0, 100; | ||
addi x10, zero, 100; | ||
|
||
desvio: | ||
addi x16, x0, 17; | ||
addi x16, zero, 17; | ||
andi x16, x16, 17; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
beq x1, x1, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
beq x1, x2, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
bge x1, x2, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
bge x2, x1, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
bgeu x1, x2, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
bgeu x2, x1, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
blt x1, x2, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
blt x2, x1, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
bltu x1, x2, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
bltu x2, x1, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
bne x2, x1, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi x1, x0, 1 | ||
addi x2, x0, 2 | ||
addi x1, zero, 1 | ||
addi x2, zero, 2 | ||
|
||
bne x1, x1, desvio | ||
|
||
addi x3, x0, 10 | ||
addi x3, zero, 10 | ||
|
||
desvio: | ||
addi x4, x0, 15 | ||
addi x4, zero, 15 | ||
add x4, x4, x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
.global _start | ||
|
||
_start: | ||
addi a3, x0, 3; | ||
addi a3, zero, 3; | ||
|
||
jal subrotina | ||
|
||
addi a4, x0, 5; | ||
addi a4, zero, 5; | ||
|
||
|
||
subrotina: | ||
addi a5, x0, 10; | ||
addi a5, zero, 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
.global _start | ||
|
||
_start: | ||
addi a3, x0, 3; | ||
addi a3, zero, 3; | ||
add a3, a3, a3; | ||
|
||
la x1, subrotina; | ||
|
||
jalr a2, x1, 0; | ||
|
||
addi a4, x0, 7; | ||
addi a4, zero, 7; | ||
|
||
subrotina: | ||
addi a5, x0, 10; | ||
addi a5, zero, 10; | ||
jalr zero, ra, 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.global _start | ||
|
||
_start: | ||
addi a3, x0, 3; | ||
addi a3, zero, 3; | ||
add a3, a3, a3; | ||
|
||
jal ra, subrotina; | ||
|
||
addi a4, x0, 7; | ||
addi a4, zero, 7; | ||
|
||
subrotina: | ||
addi a5, x0, 10; | ||
addi a5, zero, 10; | ||
jalr zero, ra, 0; |
Oops, something went wrong.