0

So I was reading this example on the Wiki Books about x86 Assembly/Interfacing with Linux which has the following code.

.data
msg: .ascii "Hello World\n"

.text
.global _start
_start:
    movl $4, %eax   # use the `write` [interrupt-flavor] system call
    movl $1, %ebx   # write to stdout
    movl $msg, %ecx # use string "Hello World"
    movl $12, %edx  # write 12 characters
    int $0x80       # make system call
    
    movl $1, %eax   # use the `_exit` [interrupt-flavor] system call
    movl $0, %ebx   # error code 0
    int $0x80       # make system call

What I want to know is where can I find documentation or information about what each register does when calling a specific system call.

For example how do I know that movl $1, %ebx writes to stdout or that movl $12, %edx sets the number of characters to write to the buffer.

Parker
  • 351
  • 2
  • 9

0 Answers0