diff options
author | xnumad <34810600+xnumad@users.noreply.github.com> | 2023-03-24 21:43:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-24 21:43:38 +0100 |
commit | d1d1c4af865fdbcfa23225bc4d3b193f0d399b5f (patch) | |
tree | 782e84d25797bb9b0e41abe1bfea67172e582624 /mips.html.markdown | |
parent | f1a149c86036a7686ac1cfae3983370e9347d6e6 (diff) |
Fix off-by-one error
Iterate from 0..9, i.e. while $t0 is < 10
Diffstat (limited to 'mips.html.markdown')
-rw-r--r-- | mips.html.markdown | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mips.html.markdown b/mips.html.markdown index 6f48dc33..3add0c5b 100644 --- a/mips.html.markdown +++ b/mips.html.markdown @@ -213,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 |