Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

4. I give a fair hearing to fellow members ideas.

Answered: 1 week ago