I need in details explanation how to find what values are stored in each of the
ID: 3727538 • Letter: I
Question
I need in details explanation how to find what values are stored in each of the registers
thanks
Explanation / Answer
.data
aChar: .byte 'z', 'y', 'x' #address of aChar at 0x1001 0000 to 0x1001 0002
array1: .word 0x1234, 0x5678, 0xff, 0xee, 0xdd #address of array1 at 0x1001 0003 to 0x1001 0013
array2: .word 0xf, 0xe, 0xd #address of array2 at 0x1001 0017 to 0x1001 001F
myChar: .byte 'e' #address of myChar at 0x1001 0023
array3: .byte 'a', 'b', 'c' #address of array3 at 0x1001 0024
val01: .word 0x73, #address of val01 at 0x1001 0027 to 0x1001 0031
.space 7
val02: .wor 0x23 #address of val02 at 0x1001 0032
.text
.globl main
main:
la $t1, array1 #load address of array1 to t1 register= 0x1001 0003
la $t2, array2 #load address of array2 to t2 register= 0x1001 0017
lw $s4, 4($t1) #load value of 4th element of array1 in s4 register=0xdd
lw $s5, 8($t2) #load a word value from 8th location of array2 in s5 register= undefined
la $s2, array2 #load address of array2 to s2 register= 0x1001 0017
la $s3, val02 #load address of val2 to s3 register= 0x1001 0032
a) What value is stored in $t1= 0x1001 0003
b) What value is stored in $s4= 0xdd
c) What value is stored in $s2= 0x1001 0017
d) What value is stored in $s3= 0x1001 0032