# Your name:
# Your student id:
# Your email address:
# output messages
initMsgA: .asciiz “Please enter integers in array A[] one by one, use [Enter] to split:\n”
EnterNumberMsgA1: .asciiz “A[”
EnterNumberMsgA2: .asciiz “]: ”
OutputMsgB: .asciiz “Here is the 3-Cumulative Sum result:\n”
space: .asciiz” ”
newLine: .asciiz”\n”
# array A[] has 10 elements, array B[] has 10 elements, each element is of the size of one word, 32 bits.
# we could change the size of A[] and B[] when we mark. The size values will be in b_size, a_size below
A: .word 0:10
B: .word 0:10
# size: the number of elements in arrays A[] and B[]
# we could change the size of A[] and B[] when we mark. The size values will be in b_size, a_size below
a_size: .word 10
b_size: .word 10
.globl main
# $s0,$s1 : base address,size of A
# $s4,$s5 : base address,size of B
la $s0,A #$s0 base address of array A[]
la $s1,a_size
lw $s1,0($s1) #$s1 size of array A[]
la $s4,B #$s4 base address of array B[]
la $s5,b_size
lw $s5,0($s5) #$s5 size of array B[]
# cout << "Please enter integers in array A[] one by one, use [Enter] to split:"<
CumulativeSum:
#TODO Below
#TODO Above