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 .s)

How to convert following 32bit assembly code to complie with -nostdlib, option

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!