Using assembly language programming and gdb Write an assembl
Using assembly language programming and gdb..
Write an assembly program to find the maximum of x^3 + 14 x^2 + 56 x - 64 where x is in the range of (-2 =Solution
.file 1 \"\" .section .mdebug.abi32 .previous .gnu_attribute 4, 1 .abicalls .section .rodata.str1.4,\"aMS\",@progbits,1 .align 2 $LC0: .ascii \"Max = %d\\000\" .text .align 2 .globl main $LFB12 = . .set nomips16 .ent main .type main, @function main: .frame $sp,32,$31 # vars= 0, regs= 1/0, args= 16, gp= 8 .mask 0x80000000,-4 .fmask 0x00000000,0 .set noreorder .cpload $25 .set nomacro addiu $sp,$sp,-32 $LCFI0: sw $31,28($sp) $LCFI1: .cprestore 16 li $2,-2 # 0xfffffffffffffffe move $5,$0 li $3,9 # 0x9 addiu $4,$2,14 $L6: mult $4,$2 mflo $4 addiu $4,$4,56 nop mult $4,$2 mflo $4 addiu $4,$4,-64 slt $6,$5,$4 beq $6,$0,$L2 nop move $5,$4 $L2: addiu $2,$2,1 bne $2,$3,$L6 addiu $4,$2,14 lw $4,%got($LC0)($28) lw $25,%call16(printf)($28) nop jalr $25 addiu $4,$4,%lo($LC0) move $2,$0 lw $31,28($sp) nop j $31 addiu $sp,$sp,32 .set macro .set reorder .end main $LFE12: .size main, .-main .section .eh_frame,\"aw\",@progbits $Lframe1: .4byte $LECIE1-$LSCIE1 $LSCIE1: .4byte 0x0 .byte 0x1 .globl __gxx_personality_v0 .ascii \"zP\\000\" .uleb128 0x1 .sleb128 -4 .byte 0x1f .uleb128 0x5 .byte 0x0 .4byte __gxx_personality_v0 .byte 0xc .uleb128 0x1d .uleb128 0x0 .align 2 $LECIE1: $LSFDE1: .4byte $LEFDE1-$LASFDE1 $LASFDE1: .4byte $LASFDE1-$Lframe1 .4byte $LFB12 .4byte $LFE12-$LFB12 .uleb128 0x0 .byte 0x4 .4byte $LCFI0-$LFB12 .byte 0xe .uleb128 0x20 .byte 0x4 .4byte $LCFI1-$LCFI0 .byte 0x11 .uleb128 0x1f .sleb128 1 .align 2