皮皮学,免费搜题
登录
搜题
【单选题】
假设有一 MIPS , 是 单周期的模型机结构和数据通路。该机三种指令格式如表 4 所示 。 表 4 MIPS 指令格式 R 型指令 字段 OP rs rt rd shamt func 位数 6 5 5 5 5 6 I 型 指令 字段 OP rs rt offset/imme 位数 6 5 5 16 J 型 指令 字段 OP address 位数 6 26 已知数组 A 和数据变量 k ,以下程序段 w hile (A[i] == k) i+=1; 假设分别用寄存器 $s0 ( $16) 和 $s1 存放变量 i 和 k 的值,寄存器 $t1 存放取出的数组元素,寄存器 $t0 ( $8 )存放数组 A 的起始地址,则上述循环语句对应的 MIPS 汇编程序为 : add $s0,$zero,$zero in $s 1 , [0] # 输入 k 值 label1 : sll $t3,$s0,2 # 左移: (rt << shamt )→rd add $t3,$t3,$t0 # 算术加,得 A[i] 的地址 lw $t1,0($t3) # 取数: mem(rs +offset)→rt ) bne $t1,$s1,l abel2 # 不 相等转移: if (rs ≠ rt) then PC+4+offset×4→PC addi $s0,$s0,1 # $s0 加 1 , i+1 j label1 # 无条件跳转: {(PC+4) 高 4 位 ,addr,0,0}→PC l abel2 : 。。。 表 5 指令机器代码 地址 6 位 5 位 5 位 5 位 5 位 6 位 40000 0 0 16 11 2 0 40004 0 11 8 11 0 2 40008 35 rs rt 0 40012 5 9 17 offset 40016 8 16 16 1 40020 2 address 40024 。。。。。。 设 label1 指令的地址为 40000 ,表 5 为 label1 开始的各指令的机器代码,则表 5 中的 rs为()
A.
8
B.
9
C.
10
D.
11
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【简答题】所谓物质,就是不依赖于人类的______而存在,并能为人类的意识所反映的客观存在;所谓物质范畴,就是标志_______的哲学范畴。
【简答题】蒲公英善于治疗的病证是()。|鱼腥草善于治疗的病证是()。A. 乳痈B. 肠痈C. 肺痈D. 疔毒E. 大头瘟毒
【简答题】One day a pig went to the stable(马棚)to __1__ a good friend, an old horse, and was going to ___2__ there for the night . Night came and it was time___3___ sleep. The pig went into the straw heap(稻草堆) a...
【简答题】For those who were born in the year of the pig, good luck and much success! This is your year. When talking to a westerner, however, you’ve got to be a little careful when talk about pigs. Chinese peo...
【简答题】蒲公英善于治疗的病证是()|蒲公英善于治疗的病证是()|鱼腥草善于治疗的病证是()A. 乳痈B. 肠痈C. 肺痈D. 疗毒E. 大头瘟毒
【简答题】For those of you who were born in the year of the pig, good luck and much success! This is your year. When talking to a Westerner, how ever, you’ve got to be a little careful when you talk about pigs....
【单选题】听力原文: For those of you who were born in the year of the pig, good luck and much success! This is your year. When talking to a Westerner, however, you've got to be a little careful when you talk about ...
A.
Because they worship pigs best of all.
B.
Because they consider pigs as bad animals.
C.
Because they aren't used to talking about pigs.
D.
Because they don' t like the topic about pigs at all.
【判断题】心律失常的心机电生理机制是冲动形成异常和(或)冲动传导异常。
A.
正确
B.
错误
【简答题】阅读理解。 For those of you who where born in the year of the pig, good luck and much success! This is your year. When talking to a Westerner, however, you've got to be a little careful when you talk about...
【简答题】蒲公英善于治疗的病证是( );鱼腥草善于治疗的病证是( )。
相关题目: