assembly language

i am new to assembly language coding. so can you explain what is use of file descriptor(mov ebx 1)???

and difference between file descriptor and system call number(sys_write)

in linux all operating system calls are accessed by executing interrupt 80h

When the os catches int 80h it reads the contents of register eax to see which call you want to make and then reads the parameters to that call (if any) from registers ebx (ecx, edx…)

The fd argument to write is the same as the number you’d use in fprintf in C to write to stdout (1) or stderr (2) or with fscanf read from stdin (0)

So executing int 80h with a value of decimal 4 stored in eax tells the OS to write, the value stored in ebx tells it where you want it to write to, the value in ecx is a pointer to the string you want to write and the value in edx is the number of chars to write.

Futher info

//