C - print args without stdlibs
C - print args without stdlibs I just wrote a C program that prints its command line argument without using the standard library or a main() function. My motivation is simply curiosity and to understand how to play with inline assembly. I am using Ubuntu 17.10 x86_64 with the 4.13.0-39-generic kernel and GCC 7.2.0. main() Below is my code which I have tried to comment as much as I understood. The functions print , print_1 , my_exit , and _start() are required by the system to run the executable. Actually, without _start() the linker will emit a warning and the program will segfault. print print_1 my_exit _start() _start() Functions print and print_1 are different. The first one prints out a string to the console, measuring the length of the string internally. The second function needs the string length passed as an argument. The my_exit() function just exits the program, returning the required value, which in my case is the string length or the number of command line arguments. ...