# sysca.s
# passing input values to a system call



.section .data

uscita:
.ascii " SUCCESSFUL TEST, THE SYSTEM CALL WORKS RIGHT \n"

fineuscita: 
# location immediately after the end of string
# nothing is stored

.equ len, fineuscita - uscita 
# subtraction
# len is a constant 



.section .text
.globl _start
_start:

movl $4, %eax # system call of 'write()' = 4
movl $1, %ebx # standard output to terminal
movl $uscita, %ecx
movl $len, %edx

int $0x80
# Linux system calls are located at interrupt 0x80



movl $1, %eax # exit system call = 1
movl $0, %ebx # standard input from keyboard

int $0x80 # again
