x86 Linux assembler get program parameters from _start

I'm trying to create a program to just write the param on the screen.
I created some programs to get the C function parameter, or i used C to send the parameter to my asm program.
Is there a way to get the program parameter using only assembler

EX:

./Program "text"

I'm using as (Gnu Assembler)

Usually i get those parameters using

[esp+4]

Because the esp is the program/function call pointer, but in pure asm it don't get the command line parameter.

On Linux, the familiar argc and argv variables from C are always passed on the stack by the kernel, available even to assembly programs that are completely standalone and don't link with the startup code in the C library. This is documented in the i386 System V ABI, along with other details of the process startup environment (register values, stack alignment).

At the ELF entry point (a.k.a. _start) of an x86 Linux executable:

ESP points to argc

ESP + 4 points to argv[0], the start of the array. i.e. the value you should pass to main as char **argv is lea eax, [esp+4], not mov eax, [esp+4])

cmdline.gdb

How Regular C Programs Obtain argc and argv

You can disassemble _start from a regular C program to see how it obtains argc and argv from the stack and passes them as it calls __libc_start_main. Using the /bin/true program on my x86-64 machine as an example: