Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a 32 bit (x86) Linux assembly language program that prints, one per line, the command line arguments used to invoke your program along with

Write a 32 bit (x86) Linux assembly language program that prints, one per line, the command line arguments used to invoke your program along with all of the environment variables in your programs execution environment. You may not use ANY system calls. Your program must consist solely of a main function and may use only the printf and exit functions from the C standard library. Your program MUST NOToutput anything other than argv and envp values (ie, DO NOT prompt for user input or display any other helpful messages). Your main function must adhere to the following prototype (keep in mind that main uses the cdecl calling convention): int main(int argc, char *argv[], char *envp[]);

Example:

# ./assign3_part2 hello world ./assign3_part2 hello world TERM=xterm SHELL=/bin/bash PATH=/bin:/usr/bin:/usr/local/bin PWD=/home/jones HOME=/home/jones

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

More Books

Students also viewed these Databases questions

Question

Differentiate 3sin(9x+2x)

Answered: 1 week ago

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago

Question

6. How would you design your ideal position?

Answered: 1 week ago