Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assuming the variables are declared as .byte, write assembly language instructio

ID: 3599190 • Letter: A

Question

Assuming the variables are declared as .byte, write assembly language instructions to implement the following C statements: d = 'z'; a=d; b = a; Only a single assembly statement should be entered for each fill- in-the-blank answer. A fill-in-the-blank answer can be left blankif an assembly statement is not needed, but you will need to write in the work blank. Please use all lower case characters in your answers and single spaces to separate items, other than commas, on each line. If a register is needed, please use one of the eax, ax, or al registers.

Explanation / Answer

Have written e statement through a whole structure

main:

addiu $sp,$sp,-24

sw $fp,20($sp)

move $fp,$sp

li $2,122 # 0x7a

sb $2,8($fp)

lbu $2,8($fp)

nop

sb $2,9($fp)

lbu $2,9($fp)

nop

sb $2,10($fp)

move $2,$0

move $sp,$fp

lw $fp,20($sp)

addiu $sp,$sp,24

j $31

nop

__static_initialization_and_destruction_0(int, int):

addiu $sp,$sp,-32

sw $31,28($sp)

sw $fp,24($sp)

move $fp,$sp

sw $4,32($fp)

sw $5,36($fp)

lw $3,32($fp)

li $2,1 # 0x1

bne $3,$2,$L5

nop

lw $3,36($fp)

li $2,65535 # 0xffff

bne $3,$2,$L5

nop

lui $2,%hi(std::__ioinit)

addiu $4,$2,%lo(std::__ioinit)

jal std::ios_base::Init::Init()

nop

lui $2,%hi(__dso_handle)

addiu $6,$2,%lo(__dso_handle)

lui $2,%hi(std::__ioinit)

addiu $5,$2,%lo(std::__ioinit)

lui $2,%hi(std::ios_base::Init::~Init())

addiu $4,$2,%lo(std::ios_base::Init::~Init())

jal __cxa_atexit

nop

nop

move $sp,$fp

lw $31,28($sp)

lw $fp,24($sp)

addiu $sp,$sp,32

j $31

nop

_GLOBAL__sub_I_main:

addiu $sp,$sp,-32

sw $31,28($sp)

sw $fp,24($sp)

move $fp,$sp

li $5,65535 # 0xffff

li $4,1 # 0x1

jal __static_initialization_and_destruction_0(int, int)

nop

move $sp,$fp

lw $31,28($sp)

lw $fp,24($sp)

addiu $sp,$sp,32

j $31

nop

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote