代做AST10201作业、代做Computer Organization作业、代写Java/C++语言作业

代做AST10201作业、代做Computer Organization作业、代写Java/C++语言作业
AST10201 Computer Organization - Tutorial 7
Name: Student ID:


Submission deadline: 21 October 2018 for LB1, LB2 and LB3
22 October 2018 for LA1, LA2, LA4, LA5, LC1 and LC2
22 October 2018 for LB4

1.Try to use different instructions to calculate the value of mySum = arrA[0]*arrB[0]+ arrA[1]*arrB[1]+ arrA[2]*arrB[2]+ arrA[3]*arrB[3]+ arrA[4]*arrB[4].
Complete the code in T7_1_v1.s and T7_1_v2.s.

2.Use the Loop instruction to calculate the value of mySum = sum(arrA[i]*arrB[i]), i from 0 to 4. Complete the code in T7_2.s. The following instructions may be used:
bne $s0, $s1, Lbl #go to Lbl if $s0=?$s1
beq $s0, $s1, Lbl #go to Lbl if $s0=$s1
j Lbl #jump to Lbl
slt $t0, $s0, $s1 # if $s0 < $s1 then $t0 = 1 (set on less than)
# else $t0 = 0
slti $t0,$s0,25 # if $s0 < 25 then $t0 = 1 else $t0 = 0
blt $s1,$s2,Lbl #go to Lbl if $s1 < $s2 (less than)
ble $s1,$s2,Lbl #go to Lbl if $s1 ≤ $s2 (less than or equal to)
bgt $s1,$s2,Lbl #go to Lbl if $s1 > $s2 (greater than)
bge $s1,$s2,Lbl #go to Lbl if $s1 ≥ $s2 (greater than or equal to)

3.please write an assembly language program with procedure to calculate the value of xy. For example: x = 3, y = 5. The procedure’s name can be “power”. (See T7_3.s)

http://www.6daixie.com/contents/9/2027.html

因为专业,所以值得信赖。如有需要,请加QQ99515681 或邮箱:[email protected] 

微信:codinghelp

猜你喜欢

转载自www.cnblogs.com/rrrrrrrrrrrrrr/p/9858276.html