summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLiu Yihua <yihuajack@live.cn>2021-01-02 19:06:49 +0800
committerGitHub <noreply@github.com>2021-01-02 19:06:49 +0800
commit1f8cad3260b1a2f266007cb8a09120e69d607923 (patch)
treef6f95d3f98e8ff7c053c1f482dde30038b0ace0b
parent214f4cff02120262e4ba2098d7570cbb9452b3cf (diff)
Update mips-cn.html.markdown
Correct small errors
-rw-r--r--zh-cn/mips-cn.html.markdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/zh-cn/mips-cn.html.markdown b/zh-cn/mips-cn.html.markdown
index 86b70eb5..83888338 100644
--- a/zh-cn/mips-cn.html.markdown
+++ b/zh-cn/mips-cn.html.markdown
@@ -158,13 +158,13 @@ MIPS(Microprocessor without Interlocked Pipeline Stages)汇编语言是为
# max = c;
# 让 $s0 = a, $s1 = b, $s2 = c, $v0 = 返回寄存器
- ble $s0, $s1, a_LTE_b # 如果 (a <= b) 跳转 (a_LTE_b)
- ble $s0, $s2, max_C # 如果 (a > b && a <= c) 跳转 (max_C)
+ ble $s0, $s1, a_LTE_b # 如果 (a <= b) 跳转到 (a_LTE_b)
+ ble $s0, $s2, max_C # 如果 (a > b && a <= c) 跳转到 (max_C)
move $v0, $s1 # 否则 [a > b && a > c] max = a
j done # 跳转到程序结束
a_LTE_b: # 当 a <= b 时的标签
- ble $s1, $s2, max_C # 如果 (a <= b && b <= c) 跳转 (max_C)
+ ble $s1, $s2, max_C # 如果 (a <= b && b <= c) 跳转到 (max_C)
move $v0, $s1 # 如果 (a <= b && b > c) max = b
j done # 跳转到 done
@@ -178,7 +178,7 @@ MIPS(Microprocessor without Interlocked Pipeline Stages)汇编语言是为
# 循环的基本结构是一个退出条件和一个继续执行的跳转指令
li $t0, 0
while:
- bgt $t0, 10, end_while # 当 $t0 is 小于 10,不停迭代
+ bgt $t0, 10, end_while # 当 $t0 小于 10,不停迭代
addi $t0, $t0, 1 # 累加值
j while # 跳转回循环开始
end_while: