计算机系统I 第五章.ppt

计算机系统I 第五章

* * * If all zero, no CC is tested, so branch is never taken. (See Appendix B.) If all one, then all are tested. Since at least one of the CC bits is set to one after each operate/load instruction, then branch is always taken. (Assumes some instruction has set CC before branch instruction, otherwise undefined.) * * * * * * * 应用-discussion 5-* 1 判断 r0的值是否为5, 等于5则跳转。 判断R0的值5,=5,5 ,=跳转 判断R0的值40跳转 比较R0,R1是否相等跳转 5-* 跳转指令的应用:循环控制 计算12个整数的和: 整数存放的起始地址:x3100. 程序起始地址: x3000。 R1 ? x3100 R3 ? 0 R2 ? 12 R2=0? R4 ? M[R1] R3 ? R3+R4 R1 ? R1+1 R2 ? R2-1 NO YES 5-* Sample Program Address Instruction Comm

文档评论(0)

1亿VIP精品文档

相关文档