Bellow is the example that I am going to use.


The bellow code should compile on GNU assembler. Syntax is AT&T incase any numbies are curious.
Code:
.data 


HelloWorldString:
	.asciz "Hello"


.text 


.globl _start 


_start:
	# Load all the arguments for write () 


	movl $4, %eax
	movl $1, %ebx
	movl $HelloWorldString, %ecx
	movl $6, %edx #<-- This is where the number matters.
	int $0x80


	# Irrelivant. Just the exit syscall
	movl $1, %eax
	movl $0, %ebx
	int $0x80
Okay, I am using the write syscall. Did I do it correctly? Would I have to allocate 6 bytes of space(like I did), instead of just five? Because of the NUL? Thanks.