# sctest1.s - an example of passing input values to a system call
.section .data
output:
.ascii "This is a test message.\n"
#
output_end: 
#declares the location immediately after the end of the string
.equ len, output_end - output # subtraction 
# len is a constant 
# used to define the length value 
# by subtracting the two labels
#
.section .text
.globl _start
_start:
#
movl $4, %eax # system call value for the write() is 4
#
#
movl $1, %ebx # file descriptor value for the output location = 1
# STDOUT: The standard output for the terminal device
# (normally the terminal screen)
#
movl $output, %ecx # pointer (memory address) of the string to display
movl $len, %edx # size of the string to display
# all ABCD registers are loaded
int $0x80
movl $1, %eax
movl $0, %ebx
int $0x80 # again


