See e.g. this answer and that answer to similar questions. Read also more about syscalls, the linux kernel, an overview of linux syscalls, and the assembly howto
The write function from glibc is not the true syscall. It is a wrapper (doing the sycall thru e.g. sysenter machine instruction, perhaps with the VDSO, and setting errno).
You can use strace to understand the system calls done by some program.
For example, the MUSL libc has this write.c implementation for write. For GNU libc, look at its write.c.