Show work for full credit
jr $ra addi $a0, $s0, -4 mult $t0, $t1 mflo $s3
ori $a1, $t4, 0x0bbb add $s1, $s2, $s3 lw $t0, -12($sp) jr $ra
Address | Hex Contents | TAL Instruction |
[0x00400000] | 0x3c011001 | . |
[0x00400004] | 0x34280190 | . |
[0x00400008] | 0x3c081001 | . |
[0x0040000c] | 0xad080000 | . |
[0x00400010] | 0x2108fff9 | . |
[0x00400014] | 0x0128502a | . |
[0x00400018] | 0x1540fff9 | . |
[0x0040001c] | 0x3402000a | . |
[0x00400020] | 0x0000000c | . |
(A) Decode the bits stored in memory to determine which TAL instructions are stored in each location. Write legal TAL code to the right of each memory location in the table above.
(B) The linker and loader placed the data segment at address 0x10010000. Which instructions, if any, would change if the data were relocated to begin at address 0x20000000? If any changed, write the hex contents and corresponding TAL instructions in the table below. ONLY FILL IN ENTRYS THAT HAVE CHANGED. For entries that do NOT change, write "N/C".
Address | Hex Contents | TAL Instruction |
[0x00400000] | . | . |
[0x00400004] | . | . |
[0x00400008] | . | . |
[0x0040000c] | . | . |
[0x00400010] | . | . |
[0x00400014] | . | . |
[0x00400018] | . | . |
[0x0040001c] | . | . |
[0x00400020] | . | . |
(C) The linker and loader placed the text segment at address 0x00400000. What instructions, if any, would change if the text were relocated to begin at address 0x00801000? If any changed, write the hex contents, and corresponding TAL instructions below. ONLY FILL IN ENTRYS THAT HAVE CHANGED. For entries that do NOT change, write "N/C".
Address | Hex Contents | TAL Instruction |
[0x00400000] | . | . |
[0x00400004] | . | . |
[0x00400008] | . | . |
[0x0040000c] | . | . |
[0x00400010] | . | . |
[0x00400014] | . | . |
[0x00400018] | . | . |
[0x0040001c] | . | . |
[0x00400020] | . | . |
beq $t4, $s3, loopis placed at address 0x0080abc0 by the assembler. The symbol loop is already in the symbol table, and has been assigned address 0x00800004. Give machine code for the beq instruction.
jal procXis placed at address 0x0080e040 by the assembler. The symbol procX is assigned address 0x00820c0c. Give machine code for the jal instruction.
__start:
la $8, foo
foo: lw $9, 0($8)
done
What is the contents of register $9 after this program executes?
(A) How many bits can be stored on the innermost track? (B) How many bits can be stored on the innermost cylinder? (C) If the same density of bits is stored on every track, how many total bits can be store on the outermost cylinder of the disk?
$12: 0x00000000 $13: 0x00000014 $14: 0x00400024 The memory for the text segment looks like this: [0x00400000] 0x3402000c 0x0000000c0x00404020 0x310800fe [0x00400010] 0x01280018 0x3c0110010xac290000 0x01094820 [0x00400020] 0x3c011001 0xac2900010x21090001 0x3c011001 [0x00400030] 0x80290000 0x3c0110010x802a0001 0x012a4820 [0x00400040] 0x3c011001 0xac2a00000x3402000a 0x0000000c (A) What was the reason for entering the kernel? (B) What was the address of the instruction that caused the error? (C) Give a reasonable TAL description of the instruction.