Convert the following C program to x86 assembly code Use 808
Convert the following C program to x86 assembly code. Use 8086 instruction set. T define count 2 int y[2]; int main (void) {int A, B; y [0] = A + B - count; y[l] = - B + count; return(0);}
Solution
.file 1 \"\" .section .mdebug.abi32 .previous .gnu_attribute 4, 1 .abicalls .globl y .section .bss,\"aw\",@nobits .align 2 .type y, @object .size y, 8 y: .space 8 .text .align 2 .globl main $LFB0 = . .set nomips16 .ent main .type main, @function main: .frame $fp,24,$31 # vars= 8, regs= 1/0, args= 0, gp= 8 .mask 0x40000000,-4 .fmask 0x00000000,0 .set noreorder .cpload $25 .set nomacro addiu $sp,$sp,-24 $LCFI0: sw $fp,20($sp) $LCFI1: move $fp,$sp movz $31,$31,$0 $LCFI2: .cprestore 0 lw $3,12($fp) lw $2,8($fp) nop addu $2,$3,$2 addiu $3,$2,-2 lw $2,%got(y)($28) nop sw $3,0($2) li $3,2 # 0x2 lw $2,8($fp) nop subu $3,$3,$2 lw $2,%got(y)($28) nop sw $3,4($2) move $2,$0 move $sp,$fp lw $fp,20($sp) addiu $sp,$sp,24 j $31 nop .set macro .set reorder .end main $LFE0: .size main, .-main .ident \"GCC: (Debian 4.4.5-8) 4.4.5\"![Convert the following C program to x86 assembly code. Use 8086 instruction set. T define count 2 int y[2]; int main (void) {int A, B; y [0] = A + B - count; y[ Convert the following C program to x86 assembly code. Use 8086 instruction set. T define count 2 int y[2]; int main (void) {int A, B; y [0] = A + B - count; y[](/WebImages/46/convert-the-following-c-program-to-x86-assembly-code-use-808-1144249-1761614515-0.webp)