Question: How to convert following 32bit assembly code to complie with -nostdlib, option meaning use own read and write. (e.g. gcc -nostdlib -o .s) globl _main
How to convert following 32bit assembly code to complie with -nostdlib, option meaning use own read and write. (e.g. gcc -nostdlib -o

globl _main main pushL %ebp movl %esp, %ebp subl $24,%esp movl $0, -4(9sebp) LBB0 1: ????? -getchar mov %eax,-8(%ebp) cmpl $-1, seax je LBB0 3 8(%ebp), movl movl %eax ,(%esp) calll _putchar mov %eax,-12(%ebp) jmp LBB0 1 %eax LBB0 3 xorL %eax, %eax addl $24, esp popl %ebp retl globl _main main pushL %ebp movl %esp, %ebp subl $24,%esp movl $0, -4(9sebp) LBB0 1: ????? -getchar mov %eax,-8(%ebp) cmpl $-1, seax je LBB0 3 8(%ebp), movl movl %eax ,(%esp) calll _putchar mov %eax,-12(%ebp) jmp LBB0 1 %eax LBB0 3 xorL %eax, %eax addl $24, esp popl %ebp retl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
