It can be done, but it seems like an incredibly tedious and slow way to develop assembly software these days.
Assuming you are using the i386 platform (syscall ABI is used for each platform), look at uClibcs ββlibc / sysdeps / linux / i386 / syscall.S:
.text
.global syscall
.type syscall,%function
syscall:
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
movl 44(%esp),%ebp /* Load the 6 syscall argument registers */
movl 40(%esp),%edi
movl 36(%esp),%esi
movl 32(%esp),%edx
movl 28(%esp),%ecx
movl 24(%esp),%ebx
movl 20(%esp),%eax /* Load syscall number into %eax. */
int $0x80
popl %ebx
popl %esi
popl %edi
popl %ebp
cmpl $-4095,%eax
jae __syscall_error
ret /* Return to caller. */
.size syscall,.-syscall
This assumes that all syscall arguments as well as the syscall number were loaded onto the stack.
Linux, /asm -generic/unistd.h.
, , , , , . Linux Framebuffer. X .