diff options
author | Marcel Ribeiro-Dantas <ribeirodantasdm@gmail.com> | 2023-03-25 23:04:10 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 23:04:10 -0300 |
commit | 2505a5efe570c891b96e9c3fe448711ee139ba8d (patch) | |
tree | d66aa45a205b78fc6e1494cd1af559f54296544d /mips.html.markdown | |
parent | e7c25112de210738bb9c342b1559db151b2d5459 (diff) | |
parent | d1d1c4af865fdbcfa23225bc4d3b193f0d399b5f (diff) |
Merge pull request #4627 from xnumad/patch-1
[mips/en] MIPS fixes
Diffstat (limited to 'mips.html.markdown')
-rw-r--r-- | mips.html.markdown | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mips.html.markdown b/mips.html.markdown index 31f735b0..3add0c5b 100644 --- a/mips.html.markdown +++ b/mips.html.markdown @@ -162,7 +162,7 @@ gateways and routers. blt $t0, $t1, t0_gt_t1 # Branches when $t0 < $t1 ble $t0, $t1, t0_gte_t1 # Branches when $t0 <= $t1 bltz $t0, t0_lt0 # Branches when $t0 < 0 - slt $s0, $t0, $t1 # Instruction that sends a signal + slt $s0, $t0, $t1 # "Set on Less Than" # when $t0 < $t1 with result in $s0 # (1 for true) @@ -186,6 +186,7 @@ gateways and routers. # else # max = c; # else + # if (b > c) # max = b; # else # max = c; @@ -212,8 +213,9 @@ gateways and routers. # instruction to continue its execution li $t0, 0 while: - bgt $t0, 10, end_while # While $t0 is less than 10, + bgt $t0, 9, end_while # While $t0 is less than 10, # keep iterating + #actual loop content would go here addi $t0, $t0, 1 # Increment the value j while # Jump back to the beginning of # the loop |