Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started