If you read that question again carefully, you'll notice that the user has written an application to load this code, which has been previously compiled into it's binary representation, at runtime. The code itself is not a full application. This code as it is, cannot generate a valid binary (executable) application.
When writing assembly code you have a few options as for what compiler and syntax you can use to write your programs. If you are interested in learning assembly, I recommend reading Programming from the Ground Up.
The example below came from here:
.section .data
hello:
.ascii "Hello, World!\n\0"
.section .text
.globl _start
_start:
movl $4, %eax
movl $14, %edx
movl $hello, %ecx
movl $1, %ebx
int $0x80
movl $1, %eax
movl $0, %ebx
int $0x80
Compiled with:
as hello.s -o hello.o
ld hello.o -o hello
./hello
Hello, World!